Teach front-end about simple, first-cut version of const items.
This commit is contained in:
parent
43ec78636f
commit
7287d3aaa0
10 changed files with 46 additions and 0 deletions
|
|
@ -137,6 +137,7 @@ fn new_reader(stdio_reader rdr, str filename) -> reader
|
|||
keywords.insert("export", token.EXPORT());
|
||||
|
||||
keywords.insert("let", token.LET());
|
||||
keywords.insert("const", token.CONST());
|
||||
|
||||
keywords.insert("log", token.LOG());
|
||||
keywords.insert("spawn", token.SPAWN());
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ tag token {
|
|||
|
||||
/* Value / stmt declarators */
|
||||
LET();
|
||||
CONST();
|
||||
|
||||
/* Magic runtime services */
|
||||
LOG();
|
||||
|
|
@ -261,6 +262,7 @@ fn to_str(token t) -> str {
|
|||
|
||||
/* Value / stmt declarators */
|
||||
case (LET()) { ret "let"; }
|
||||
case (CONST()) { ret "const"; }
|
||||
|
||||
/* Magic runtime services */
|
||||
case (LOG()) { ret "log"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue