✨ add token type 'enum'
This commit is contained in:
parent
43d31b2880
commit
988b45fdb4
25
src/main.js
25
src/main.js
@ -1,4 +1,29 @@
|
|||||||
class Juicescript {
|
class Juicescript {
|
||||||
|
// TOKEN TYPES //
|
||||||
|
static token_type = new Enum(
|
||||||
|
// keywords
|
||||||
|
"FUN", "GLOBAL",
|
||||||
|
|
||||||
|
// literals
|
||||||
|
"IDENTIFIER", "VARIABLE", "STRING", "NUMBER",
|
||||||
|
|
||||||
|
// language constants
|
||||||
|
"TRUE", "FALSE",
|
||||||
|
"NULL",
|
||||||
|
|
||||||
|
// operators
|
||||||
|
"NOT",
|
||||||
|
"EQUAL", "NOT_EQUAL",
|
||||||
|
"STRICT_EQUAL", "STRICT_NOT_EQUAL",
|
||||||
|
"GREATER", "GREATER_EQUAL",
|
||||||
|
"LESS", "LESS_EQUAL"
|
||||||
|
|
||||||
|
// meta stuff
|
||||||
|
"EOF"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CONSTRUCTOR: Return new juicescript parser with OPTIONS
|
CONSTRUCTOR: Return new juicescript parser with OPTIONS
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user