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,
|
||||
"assert": TokenType.Assert, "or": TokenType.LogicalOr,
|
||||
"and": TokenType.LogicalAnd, "del": TokenType.Del,
|
||||
"async": TokenType.Async, "await": TokenType.Await
|
||||
"async": TokenType.Async, "await": TokenType.Await,
|
||||
"dynamyc": TokenType.Dynamic
|
||||
})
|
||||
|
||||
type
|
||||
|
|
|
@ -35,7 +35,8 @@ type
|
|||
Function, Break, Lambda,
|
||||
Continue, Var, Let, Const, Is,
|
||||
Return, Async, Class, Import, From,
|
||||
IsNot, Raise, Assert, Del, Await
|
||||
IsNot, Raise, Assert, Del, Await,
|
||||
Dynamic
|
||||
|
||||
# Basic types
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@ proc statement(self: Parser): ASTNode =
|
|||
of TokenType.Assert:
|
||||
discard self.step()
|
||||
result = self.assertStmt()
|
||||
of TokenType.Async, TokenType.Await:
|
||||
of TokenType.Async, TokenType.Await, TokenType.Dynamic:
|
||||
discard # TODO
|
||||
of TokenType.LeftBrace:
|
||||
discard self.step()
|
||||
|
|
Loading…
Reference in New Issue