Documentation
¶
Index ¶
Constants ¶
View Source
const ( ILLEGAL = "ILLEGAL" EOF = "EOF" COMMENT = "COMMENT" IDENT = "IDENT" INT = "INT" FLOAT = "FLOAT" STRING = "STRING" ADD = "+" SUB = "-" MUL = "*" QUO = "/" REM = "%" ADD_ASSIGN = "+=" SUB_ASSIGN = "-=" MUL_ASSIGN = "*=" QUO_ASSIGN = "/=" REM_ASSIGN = "%=" EQL = "==" LSS = "<" GTR = ">" NEQ = "!=" LEQ = "<=" GEQ = ">=" ASSIGN = "=" NOT = "!" NOTSTR = "not" LPAREN = "(" LBRACK = "[" LBRACE = "{" RPAREN = ")" RBRACK = "]" RBRACE = "}" COMMA = "," PERIOD = "." SEMICOLON = ";" COLON = ":" LAND = "and" LOR = "or" LXOR = "xor" CONTAINS = "contains" NOTCONTAINS = "not contains" IN = "in" NOTIN = "not in" MATCHES = "matches" NOTMATCHES = "not matches" IS = "is" ISNOT = "is not" IMPORT = "import" PARAM = "param" AS = "as" DEFAULT = "default" WHEN = "when" FUNC = "func" RULE = "rule" RETURN = "return" BREAK = "break" CONTINUE = "continue" IF = "if" ELSE = "else" ANY = "any" ALL = "all" FOR = "for" FILTER = "filter" MAP = "map" CASE = "case" EMPTY = "empty" ISEMPTY = "is empty" ISNOTEMPTY = "is not empty" DEFINED = "defined" ISDEFINED = "is defined" ISNOTDEFINED = "is not defined" )
View Source
const NoPos = -1
Variables ¶
This section is empty.
Functions ¶
func SingleWordKeyword ¶
Types ¶
type Locator ¶
type Locator interface { PositionOf(int) SourcePosition AddLine(int) Filename() string }
func NewContentLocator ¶
func NewProgressiveLocator ¶
func NewProgressiveLocator() Locator
type SourcePosition ¶
type SourcePosition struct { Filename string Line int // Line number starting at 0 Column int // Column starting at 0 }
func (SourcePosition) IsValid ¶
func (o SourcePosition) IsValid() bool
Click to show internal directories.
Click to hide internal directories.