parser

package
v0.0.0-...-2144169 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Plaintext TokenType = "Plaintext"
	Newline             = "Newline"
	Command             = "Command"
	Body                = "Body"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseCommand

type ParseCommand struct {
	Command string
	Args    string
	Body    string
}

func (ParseCommand) String

func (p ParseCommand) String() string

type ParseResult

type ParseResult struct {
	Chat     string
	Commands []ParseCommand
}

func Parse

func Parse(input string) ParseResult

func ParseTokens

func ParseTokens(tokens []Token) ParseResult

type Token

type Token struct {
	Typ TokenType
	Val string
}

func Lex

func Lex(input string) []Token

type TokenType

type TokenType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL