enum Crylox::TokenType

Defined in:

crylox/token_type.cr

Enum Members

LEFT_PAREN = 0

Single-character tokens

RIGHT_PAREN = 1
LEFT_BRACE = 2
RIGHT_BRACE = 3
COMMA = 4
DOT = 5
MINUS = 6
PLUS = 7
SEMICOLON = 8
SLASH = 9
STAR = 10
BANG = 11

One or two character tokens

BANG_EQUAL = 12
EQUAL = 13
EQUAL_EQUAL = 14
GREATER = 15
GREATER_EQUAL = 16
LESS = 17
LESS_EQUAL = 18
IDENTIFIER = 19

Literals

STRING = 20
NUMBER = 21
COMMENT = 22
AND = 23

Keywords

CLASS = 24
ELSE = 25
FALSE = 26
FUN = 27
FOR = 28
IF = 29
NIL = 30
OR = 31
PRINT = 32
RETURN = 33
SUPER = 34
THIS = 35
TRUE = 36
VAR = 37
WHILE = 38
NAND = 39

Add-on keywords

NOR = 40
XOR = 41
XNOR = 42
BREAK = 43
NEXT = 44
MODULUS = 45
LAMBDA = 46
MINUS_GREATER = 47
PLUS_EQUAL = 48
MINUS_EQUAL = 49
SLASH_EQUAL = 50
STAR_EQUAL = 51
MOD_EQUAL = 52
ERROR = 53
EOF = 54

Instance Method Summary

Instance Method Detail

def and? #

[View source]
def bang? #

[View source]
def bang_equal? #

[View source]
def break? #

[View source]
def class? #

[View source]
def comma? #

[View source]
def comment? #

[View source]
def dot? #

[View source]
def else? #

[View source]
def eof? #

[View source]
def equal? #

[View source]
def equal_equal? #

[View source]
def error? #

[View source]
def false? #

[View source]
def for? #

[View source]
def fun? #

[View source]
def greater? #

[View source]
def greater_equal? #

[View source]
def identifier? #

[View source]
def if? #

[View source]
def lambda? #

[View source]
def left_brace? #

[View source]
def left_paren? #

[View source]
def less? #

[View source]
def less_equal? #

[View source]
def minus? #

[View source]
def minus_equal? #

[View source]
def minus_greater? #

[View source]
def mod_equal? #

[View source]
def modulus? #

[View source]
def nand? #

[View source]
def next? #

[View source]
def nil? #

[View source]
def nor? #

[View source]
def number? #

[View source]
def or? #

[View source]
def plus? #

[View source]
def plus_equal? #

[View source]
def print? #

[View source]
def return? #

[View source]
def right_brace? #

[View source]
def right_paren? #

[View source]
def semicolon? #

[View source]
def slash? #

[View source]
def slash_equal? #

[View source]
def star? #

[View source]
def star_equal? #

[View source]
def string? #

[View source]
def super? #

[View source]
def this? #

[View source]
def true? #

[View source]
def var? #

[View source]
def while? #

[View source]
def xnor? #

[View source]
def xor? #

[View source]