Documentation
¶
Index ¶
- type ChoiceExpr
- type Expr
- type Grammar
- type NamedExpr
- type NodeExpr
- type OptionalExpr
- type Parser
- func (p *Parser) Errorf(format string, args ...interface{}) error
- func (p *Parser) Expect(tokenType string) (stringParsing.ParsedNode, error)
- func (p *Parser) Parse(code string, opts ...*parsing.ParseOption) ([]stringParsing.ParsedNode, error)
- func (p *Parser) Peek() (stringParsing.ParsedNode, error)
- func (p *Parser) String() string
- type RepeatExpr
- type Rule
- type SequenceExpr
- type TokenExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChoiceExpr ¶
type ChoiceExpr struct {
Alternatives []Expr
}
func (ChoiceExpr) Parse ¶
func (c ChoiceExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
type Expr ¶
type Expr interface {
Parse(p *Parser) ([]stringParsing.ParsedNode, error)
}
type NamedExpr ¶
type NamedExpr struct {
RuleName string
}
func (NamedExpr) Parse ¶
func (n NamedExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
type NodeExpr ¶
func (NodeExpr) Parse ¶
func (n NodeExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
type OptionalExpr ¶
type OptionalExpr struct {
Expr Expr
}
func (OptionalExpr) Parse ¶
func (o OptionalExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) Expect ¶
func (p *Parser) Expect(tokenType string) (stringParsing.ParsedNode, error)
func (*Parser) Parse ¶
func (p *Parser) Parse(code string, opts ...*parsing.ParseOption) ([]stringParsing.ParsedNode, error)
func (*Parser) Peek ¶
func (p *Parser) Peek() (stringParsing.ParsedNode, error)
type RepeatExpr ¶
func (RepeatExpr) Parse ¶
func (r RepeatExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
type SequenceExpr ¶
type SequenceExpr struct {
Exprs []Expr
}
func (SequenceExpr) Parse ¶
func (s SequenceExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
type TokenExpr ¶
type TokenExpr struct {
TokenType string
}
func (TokenExpr) Parse ¶
func (t TokenExpr) Parse(p *Parser) ([]stringParsing.ParsedNode, error)
Click to show internal directories.
Click to hide internal directories.