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
}
func NewScanner ¶
func NewScanner(source string, log *zap.SugaredLogger) *Scanner
func (*Scanner) ScanTokens ¶
ScanTokens scans all text in source of scanner and returns them as tokens
type Token ¶
func (*Token) GenerateTokenError ¶
type TokenType ¶
type TokenType int
const ( LEFT_PAREN TokenType = iota RIGHT_PAREN LEFT_BRACE RIGHT_BRACE COMMA DOT MINUS PLUS SEMICOLON SLASH STAR // One or two character tokens. BANG BANG_EQUAL EQUAL EQUAL_EQUAL GREATER GREATER_EQUAL LESS LESS_EQUAL // Literals. IDENTIFIER STRING NUMBER // Keywords. AND CLASS ELSE FALSE FUN FOR IF NIL OR PRINT RETURN SUPER THIS TRUE VAR WHILE EOF )
Click to show internal directories.
Click to hide internal directories.