Documentation ¶
Overview ¶
Package token defines constants representing the lexical tokens for pg.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pos ¶
type Pos struct { Filename string // filename, if any Offset int // offset, starting at 0 Line int // line number, starting at 1 Column int // column number, starting at 1 (character count) }
Pos describes an arbitrary source position including the file, line, and column location. A position is valid if the line number is > 0.
type Type ¶
type Type int
Type is the set of lexical tokens of pg.
const ( ILLEGAL Type = iota EOF IDENT // Foo STRING // "abc" ARROW // -> or → PERIOD // . PIPE // | EPSILON // e or ε )
Token constants
func (Type) IsLiteral ¶
IsLiteral returns true for tokens corresponding to literals; it returns false otherwise.
func (Type) IsOperator ¶
IsOperator returns true for tokens corresponding to operators and delimiters; it returns false otherwise.
Click to show internal directories.
Click to hide internal directories.