Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner holds the state of the scanner.
type Token ¶
type Token struct { Type Type // The type of this item. Line int // The line number on which this token appears Text string // The text of this item. }
Token represents a token or text string returned from the scanner.
type Type ¶
type Type int
Type identifies the type of lex items.
const ( EOF Type = iota Error // error occurred; value is text of error Newline // Interesting things Assign // '=' Char // printable ASCII character; grab bag for comma etc. Identifier // alphanumeric identifier LeftBrack // '[' LeftParen // '(' Number // simple number Operator // known operator Op // "op", operator definition keyword OpDelete // "opdelete", operator undefinition keyword Rational // rational number like 2/3 Complex // complex number like 3j2 RightBrack // ']' RightParen // ')' Semicolon // ';' String // quoted string (includes quotes) Colon // ':' )
Click to show internal directories.
Click to hide internal directories.