mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-17 23:02:47 +03:00
Add inline keyword
This commit is contained in:
parent
b70ce72305
commit
c71ed3429c
@ -425,9 +425,10 @@ impl Token {
|
||||
"i64" => Token::I64,
|
||||
"i128" => Token::I128,
|
||||
"if" => Token::If,
|
||||
"import" => Token::Import,
|
||||
"in" => Token::In,
|
||||
"increment" => Token::Increment,
|
||||
"import" => Token::Import,
|
||||
"inline" => Token::Inline,
|
||||
"let" => Token::Let,
|
||||
"leo" => Token::Leo,
|
||||
"mapping" => Token::Mapping,
|
||||
|
@ -103,6 +103,7 @@ mod tests {
|
||||
i8
|
||||
if
|
||||
in
|
||||
inline
|
||||
input
|
||||
let
|
||||
mut
|
||||
@ -167,7 +168,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
output,
|
||||
r#""test" "test{}test" "test{}" "{}test" "test{" "test}" "test{test" "test}test" "te{{}}" test_ident 12345 address assert assert_eq assert_neq async bool const else false field finalize for function group i128 i64 i32 i16 i8 if in input let mut private program public return scalar self string struct test then transition 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 assert assert_eq assert_neq async bool const else false field finalize for function group i128 i64 i32 i16 i8 if in inline input let mut private program public return scalar self string struct test then transition true u128 u64 u32 u16 u8 console ! != && ( ) * ** + , - -> => _ . .. / : ; < <= = == > >= [ ] { { } } || ? @ // test
|
||||
/* test */ // "#
|
||||
);
|
||||
});
|
||||
|
@ -127,6 +127,7 @@ pub enum Token {
|
||||
Import,
|
||||
In,
|
||||
Increment,
|
||||
Inline,
|
||||
Let,
|
||||
Mapping,
|
||||
Private,
|
||||
@ -177,6 +178,7 @@ pub const KEYWORD_TOKENS: &[Token] = &[
|
||||
Token::Import,
|
||||
Token::In,
|
||||
Token::Increment,
|
||||
Token::Inline,
|
||||
Token::Let,
|
||||
Token::Mapping,
|
||||
Token::Private,
|
||||
@ -231,9 +233,10 @@ impl Token {
|
||||
Token::I64 => sym::i64,
|
||||
Token::I128 => sym::i128,
|
||||
Token::If => sym::If,
|
||||
Token::Import => sym::import,
|
||||
Token::In => sym::In,
|
||||
Token::Increment => sym::increment,
|
||||
Token::Import => sym::import,
|
||||
Token::Inline => sym::inline,
|
||||
Token::Let => sym::Let,
|
||||
Token::Leo => sym::leo,
|
||||
Token::Mapping => sym::mapping,
|
||||
@ -361,6 +364,7 @@ impl fmt::Display for Token {
|
||||
Import => write!(f, "import"),
|
||||
In => write!(f, "in"),
|
||||
Increment => write!(f, "increment"),
|
||||
Inline => write!(f, "inline"),
|
||||
Let => write!(f, "let"),
|
||||
Mapping => write!(f, "mapping"),
|
||||
Private => write!(f, "private"),
|
||||
|
@ -199,6 +199,7 @@ symbols! {
|
||||
In: "in",
|
||||
import,
|
||||
increment,
|
||||
inline,
|
||||
input,
|
||||
Let: "let",
|
||||
leo,
|
||||
|
Loading…
Reference in New Issue
Block a user