enum Drizzle::TokenType
Overview
Enum of the various types of Tokens in the Drizzle language.
This enum is used for the creation of Token instances, and will use its helper methods to help in the parsing stages also.
Defined in:
drizzle/token.crEnum Members
-
ILLEGAL =
0 -
Token is generated from a string that Drizzle does not recognise
-
EOL =
1 -
End of line token (usually ignored except for certain cases)
-
EOF =
2 -
End of file token
-
IDENTIFIER =
3 -
Name of variable, function, type, etc
-
INTEGER =
4 -
Integer literal
-
ASSIGN =
5 -
Assignment operator for assigning value to a variable
-
RETURN_TYPE =
6 -
Return type operator for specifying a functions return type
-
PLUS =
7 -
Addition operator for adding two values together
-
MINUS =
8 -
Subtraction operator for subtracting numbers. Also the unary negation operator.
-
ASTERISK =
9 -
Star operator used for multiplication, among other potential stuff later on too
-
SLASH =
10 -
Slash operator used for division
-
LT =
11 -
Less than logical operator
-
GT =
12 -
Greater than logical operator
-
EQ =
13 -
Equality logical operator
-
NOT_EQ =
14 -
Inequality logical operator
-
LT_EQ =
15 -
Less than or equal to
-
GT_EQ =
16 -
Greater than or equal to
-
COMMA =
17 -
Separating of items in a data structure / parameter list / etc.
-
COLON =
18 -
Separating of identifier from type in the case of variables and parameters
-
LEFT_PAREN =
19 -
Opening of parameter lists and tuples, and of general brackets
-
RIGHT_PAREN =
20 -
Closing of parameter lists and tuples, and of general brackets
-
LEFT_BRACE =
21 -
Opening of code blocks i.e. functions, as well as opening of set and dict literals
-
RIGHT_BRACE =
22 -
CLosing of code blocks i.e. functions, as well as closing of set and dict literals
-
LET =
23 -
Declaration of a variable
-
FUNCTION =
24 -
Definition of a function
-
RETURN =
25 -
Return value from a function
-
IF =
26 -
Conditional statement
-
ELSIF =
27 -
Elsif
-
ELSE =
28 -
Else
-
NOT =
29 -
Logical negation
-
TRUE =
30 -
True
-
FALSE =
31 -
False
Instance Method Summary
- #assign?
- #asterisk?
- #colon?
- #comma?
- #else?
- #elsif?
- #eof?
- #eol?
- #eq?
- #false?
- #function?
- #gt?
- #gt_eq?
- #identifier?
- #if?
- #illegal?
- #integer?
- #left_brace?
- #left_paren?
- #let?
- #lt?
- #lt_eq?
- #minus?
- #not?
- #not_eq?
- #plus?
- #return?
- #return_type?
- #right_brace?
- #right_paren?
- #slash?
- #true?