mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-13 08:47:17 +03:00
recognize "const" as token
This commit is contained in:
parent
4b01d41d05
commit
38fdb43bd3
@ -386,6 +386,7 @@ impl Token {
|
||||
"block" => Token::Block,
|
||||
"bool" => Token::Bool,
|
||||
"console" => Token::Console,
|
||||
"const" => Token::Const,
|
||||
"constant" => Token::Constant,
|
||||
"else" => Token::Else,
|
||||
"false" => Token::False,
|
||||
|
@ -114,6 +114,7 @@ pub enum Token {
|
||||
AssertEq,
|
||||
AssertNeq,
|
||||
Console,
|
||||
Const,
|
||||
Constant,
|
||||
Else,
|
||||
Finalize,
|
||||
@ -154,6 +155,7 @@ pub const KEYWORD_TOKENS: &[Token] = &[
|
||||
Token::AssertNeq,
|
||||
Token::Bool,
|
||||
Token::Console,
|
||||
Token::Const,
|
||||
Token::Constant,
|
||||
Token::Else,
|
||||
Token::False,
|
||||
@ -210,6 +212,7 @@ impl Token {
|
||||
Token::Block => sym::block,
|
||||
Token::Bool => sym::bool,
|
||||
Token::Console => sym::console,
|
||||
Token::Const => sym::Const,
|
||||
Token::Constant => sym::constant,
|
||||
Token::Else => sym::Else,
|
||||
Token::False => sym::False,
|
||||
@ -343,6 +346,7 @@ impl fmt::Display for Token {
|
||||
AssertEq => write!(f, "assert_eq"),
|
||||
AssertNeq => write!(f, "assert_neq"),
|
||||
Console => write!(f, "console"),
|
||||
Const => write!(f, "const"),
|
||||
Constant => write!(f, "constant"),
|
||||
Else => write!(f, "else"),
|
||||
Finalize => write!(f, "finalize"),
|
||||
|
@ -235,6 +235,7 @@ symbols! {
|
||||
assert_neq,
|
||||
caller,
|
||||
console,
|
||||
Const: "const",
|
||||
constant,
|
||||
decrement,
|
||||
Else: "else",
|
||||
|
Loading…
Reference in New Issue
Block a user