Skip to content
Permalink
Browse files

#154. Lexes AS keyword.

  • Loading branch information...
AZHenley committed Oct 2, 2019
1 parent ac8b3f6 commit 5e881a14f4089b8bd6a9da172d300ee2ee496310
Showing with 3 additions and 0 deletions.
  1. +1 −0 ast/ast.go
  2. +2 −0 token/token.go
@@ -29,6 +29,7 @@ const (
// TODO: Consider making this a binaryop.
DOTOP = "DOTOP" // Two children.
// TODO: Consider making this a binaryop.
CAST = "CAST" // Twp children.
VARDECL = "VARDECL" // Variable children. Name and type for each variable, then expression.
// TODO: Consider making the third child a VARASSIGN.
VARTYPE = "VARTYPE" // Variable children. Name and optionally a child for each inner type.
@@ -34,6 +34,7 @@ const (
GTEQ = ">="
AND = "&&"
OR = "||"
AS = "AS"
LPAREN = "("
RPAREN = ")"
LBRACE = "{"
@@ -75,6 +76,7 @@ var keywords = map[string]TokenType{
"return": RETURN,
"break": BREAK,
"continue": CONTINUE,
"as": AS,
"for": FOR,
"in": IN,
"while": WHILE,

0 comments on commit 5e881a1

Please sign in to comment.
You can’t perform that action at this time.