✨ keep track of single equal sign =
This commit is contained in:
parent
d9256b243a
commit
01c3797636
@ -86,8 +86,8 @@ class Juicescript_lexer {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "=":
|
case "=":
|
||||||
if (this.match("=")) this.token_add({type: Juicescript.token_type.EQUAL});
|
if (this.match("=")) this.token_add({type: Juicescript.token_type.EQUAL_EQUAL});
|
||||||
else this.error("unexpected character '" + this.char + "'");
|
else this.token_add({type: Juicescript.token_type.EQUAL});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "<":
|
case "<":
|
||||||
|
12
src/main.js
12
src/main.js
@ -13,8 +13,8 @@ class Juicescript {
|
|||||||
"NULL",
|
"NULL",
|
||||||
|
|
||||||
// operators
|
// operators
|
||||||
"NOT",
|
"EQUAL", "NOT",
|
||||||
"EQUAL", "NOT_EQUAL",
|
"EQUAL_EQUAL", "NOT_EQUAL",
|
||||||
"GREATER", "GREATER_EQUAL",
|
"GREATER", "GREATER_EQUAL",
|
||||||
"LESS", "LESS_EQUAL",
|
"LESS", "LESS_EQUAL",
|
||||||
|
|
||||||
@ -33,6 +33,12 @@ class Juicescript {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ARGUMENT TYPES //
|
||||||
|
static argument_type = new Juicescript_helper_enum(
|
||||||
|
"VARIABLE", "LITERAL"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CONSTRUCTOR: Return new juicescript parser with OPTIONS
|
CONSTRUCTOR: Return new juicescript parser with OPTIONS
|
||||||
@ -103,6 +109,6 @@ class Juicescript {
|
|||||||
Run previously parsed program
|
Run previously parsed program
|
||||||
*/
|
*/
|
||||||
run(){
|
run(){
|
||||||
//*/ TODO
|
/**/console.log(this.program_tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user