mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-21 20:18:09 +03:00
Lex async token
This commit is contained in:
parent
2abfe06c9d
commit
0782c03bf9
@ -394,6 +394,7 @@ impl Token {
|
|||||||
match &*identifier {
|
match &*identifier {
|
||||||
x if x.starts_with("aleo1") => Token::AddressLit(identifier),
|
x if x.starts_with("aleo1") => Token::AddressLit(identifier),
|
||||||
"address" => Token::Address,
|
"address" => Token::Address,
|
||||||
|
"async" => Token::Async,
|
||||||
"bool" => Token::Bool,
|
"bool" => Token::Bool,
|
||||||
"circuit" => Token::Circuit,
|
"circuit" => Token::Circuit,
|
||||||
"console" => Token::Console,
|
"console" => Token::Console,
|
||||||
|
@ -83,6 +83,7 @@ mod tests {
|
|||||||
test_ident
|
test_ident
|
||||||
12345
|
12345
|
||||||
address
|
address
|
||||||
|
async
|
||||||
bool
|
bool
|
||||||
const
|
const
|
||||||
else
|
else
|
||||||
@ -157,7 +158,7 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
output,
|
output,
|
||||||
r#""test" "test{}test" "test{}" "{}test" "test{" "test}" "test{test" "test}test" "te{{}}" test_ident 12345 address bool const else false field finalize for function group i128 i64 i32 i16 i8 if in input let mut return scalar self string test true u128 u64 u32 u16 u8 console ! != && ( ) * ** + , - -> => _ . .. / : ; < <= = == > >= [ ] { { } } || ? @ // test
|
r#""test" "test{}test" "test{}" "{}test" "test{" "test}" "test{test" "test}test" "te{{}}" test_ident 12345 address async bool const else false field finalize for function group i128 i64 i32 i16 i8 if in input let mut return scalar self string test true u128 u64 u32 u16 u8 console ! != && ( ) * ** + , - -> => _ . .. / : ; < <= = == > >= [ ] { { } } || ? @ // test
|
||||||
/* test */ // "#
|
/* test */ // "#
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user