parser

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryExpression

type BinaryExpression struct {
	Left     Expression
	Operator *token.Token
	Right    Expression
}

Binary expression (e.g. type=pe AND tag=upx)

func (*BinaryExpression) TokenLiteral

func (be *BinaryExpression) TokenLiteral() string

type ComparisonExpression

type ComparisonExpression struct {
	Left     string
	Operator *token.Token
	Right    string
}

Comparison expression (e.g. type=pe)

func (*ComparisonExpression) TokenLiteral

func (ce *ComparisonExpression) TokenLiteral() string

type Expression

type Expression interface {
	Node
	// contains filtered or unexported methods
}

type Node

type Node interface {
	TokenLiteral() string
}

AST node types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser structure

func New

func New(tokens []*token.Token) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (Expression, error)

func (*Parser) ParseExpression

func (p *Parser) ParseExpression() (Expression, error)

func (*Parser) ParseOr

func (p *Parser) ParseOr() (Expression, error)

Jump to

Keyboard shortcuts

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