Added support for the dynamic keyword, reserved for future use
This commit is contained in:
parent
15774586f8
commit
00dda45e48
|
@ -79,7 +79,8 @@ const reserved = to_table({
|
||||||
"let": TokenType.Let, "const": TokenType.Const,
|
"let": TokenType.Let, "const": TokenType.Const,
|
||||||
"assert": TokenType.Assert, "or": TokenType.LogicalOr,
|
"assert": TokenType.Assert, "or": TokenType.LogicalOr,
|
||||||
"and": TokenType.LogicalAnd, "del": TokenType.Del,
|
"and": TokenType.LogicalAnd, "del": TokenType.Del,
|
||||||
"async": TokenType.Async, "await": TokenType.Await
|
"async": TokenType.Async, "await": TokenType.Await,
|
||||||
|
"dynamyc": TokenType.Dynamic
|
||||||
})
|
})
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
@ -35,7 +35,8 @@ type
|
||||||
Function, Break, Lambda,
|
Function, Break, Lambda,
|
||||||
Continue, Var, Let, Const, Is,
|
Continue, Var, Let, Const, Is,
|
||||||
Return, Async, Class, Import, From,
|
Return, Async, Class, Import, From,
|
||||||
IsNot, Raise, Assert, Del, Await
|
IsNot, Raise, Assert, Del, Await,
|
||||||
|
Dynamic
|
||||||
|
|
||||||
# Basic types
|
# Basic types
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,7 @@ proc statement(self: Parser): ASTNode =
|
||||||
of TokenType.Assert:
|
of TokenType.Assert:
|
||||||
discard self.step()
|
discard self.step()
|
||||||
result = self.assertStmt()
|
result = self.assertStmt()
|
||||||
of TokenType.Async, TokenType.Await:
|
of TokenType.Async, TokenType.Await, TokenType.Dynamic:
|
||||||
discard # TODO
|
discard # TODO
|
||||||
of TokenType.LeftBrace:
|
of TokenType.LeftBrace:
|
||||||
discard self.step()
|
discard self.step()
|
||||||
|
|
Loading…
Reference in New Issue