summaryrefslogtreecommitdiff
path: root/Lexer.l
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-31 04:03:00 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-31 04:03:00 +0800
commitbd44c9eaef1f4dcbbd98d4489885566b6c7e5138 (patch)
treed664ec481b99e04386c47526b56085320edd9cde /Lexer.l
parentfd21f31e654a97027799f0fdf3518fd639415121 (diff)
support for type alias
Diffstat (limited to 'Lexer.l')
-rw-r--r--Lexer.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lexer.l b/Lexer.l
index 63808f9..39603e2 100644
--- a/Lexer.l
+++ b/Lexer.l
@@ -99,8 +99,9 @@ white [\t\f\r ]
"end" {return Parser::make_ENDS(loc);}
"program" {return Parser::make_PROGRAM(loc);}
"function" {return Parser::make_FUNCTION(loc);}
-"const" {return Parser::make_CONST(loc);}
"var" {return Parser::make_VAR(loc);}
+"const" {return Parser::make_CONST(loc);}
+"type" {return Parser::make_TYPE(loc);}
"if" {return Parser::make_IF(loc);}
"then" {return Parser::make_THEN(loc);}
"else" {return Parser::make_ELSE(loc);}