Lex async token

This commit is contained in:
Pranav Gaddamadugu 2022-09-21 12:20:05 -07:00
parent 2abfe06c9d
commit 0782c03bf9
2 changed files with 3 additions and 1 deletions

View File

@ -394,6 +394,7 @@ impl Token {
match &*identifier {
x if x.starts_with("aleo1") => Token::AddressLit(identifier),
"address" => Token::Address,
"async" => Token::Async,
"bool" => Token::Bool,
"circuit" => Token::Circuit,
"console" => Token::Console,

View File

@ -83,6 +83,7 @@ mod tests {
test_ident
12345
address
async
bool
const
else
@ -157,7 +158,7 @@ mod tests {
assert_eq!(
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 */ // "#
);
});