changed equals to assign
This commit is contained in:
parent
87695ebb20
commit
6a66b63680
3 changed files with 5 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ in { return yy::parser::token::TOK_KW_IF;}
|
||||||
\( { return yy::parser::token::TOK_L_PAREN; }
|
\( { return yy::parser::token::TOK_L_PAREN; }
|
||||||
\) { return yy::parser::token::TOK_R_PAREN; }
|
\) { return yy::parser::token::TOK_R_PAREN; }
|
||||||
\: { return yy::parser::token::TOK_COLON; }
|
\: { return yy::parser::token::TOK_COLON; }
|
||||||
\= { return yy::parser::token::TOK_EQUALS; }
|
\= { return yy::parser::token::TOK_ASSIGN; }
|
||||||
\+ { return yy::parser::token::TOK_PLUS; }
|
\+ { return yy::parser::token::TOK_PLUS; }
|
||||||
\- { return yy::parser::token::TOK_MINUS; }
|
\- { return yy::parser::token::TOK_MINUS; }
|
||||||
\" { yymore(); BEGIN(STRING); }
|
\" { yymore(); BEGIN(STRING); }
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
%token <std::string> IDENTIFIER
|
%token <std::string> IDENTIFIER
|
||||||
%token <std::string> STRING
|
%token <std::string> STRING
|
||||||
%token <int> NUMBER
|
%token <int> NUMBER
|
||||||
%token EQUALS PLUS MINUS L_PAREN R_PAREN COLON
|
%token ASSIGN PLUS MINUS L_PAREN R_PAREN COLON
|
||||||
%token KW_DEF KW_IF KW_RETURN KW_FOR KW_IN
|
%token KW_DEF KW_IF KW_RETURN KW_FOR KW_IN
|
||||||
%token EOF NEWLINE INDENT_UP INDENT_DOWN
|
%token EOF NEWLINE INDENT_UP INDENT_DOWN
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
IDENTIFIER hello
|
IDENTIFIER hello
|
||||||
EQUALS
|
ASSIGN
|
||||||
NUMBER 42
|
NUMBER 42
|
||||||
NEWLINE
|
NEWLINE
|
||||||
IDENTIFIER name
|
IDENTIFIER name
|
||||||
EQUALS
|
ASSIGN
|
||||||
STRING "world"
|
STRING "world"
|
||||||
NEWLINE
|
NEWLINE
|
||||||
IDENTIFIER x
|
IDENTIFIER x
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue