diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-05-04 00:38:51 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-05-04 13:55:11 +0200 |
commit | 48854e2321a59329cb3ac4dfdbf640b2aa43b294 (patch) | |
tree | 9563255bbcbcfded6fd284a4a822b5b043de58ec /crates/rebel-parse | |
parent | 3ac52564f990c074462cd92e4787eb65c6005bb0 (diff) | |
download | rebel-48854e2321a59329cb3ac4dfdbf640b2aa43b294.tar rebel-48854e2321a59329cb3ac4dfdbf640b2aa43b294.zip |
rebel-parse, rebel-lang: use struct keyword for struct types and literals
Diffstat (limited to 'crates/rebel-parse')
-rw-r--r-- | crates/rebel-parse/src/grammar/recipe.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rebel-parse/src/grammar/recipe.rs b/crates/rebel-parse/src/grammar/recipe.rs index 5f6adbc..3ce06c1 100644 --- a/crates/rebel-parse/src/grammar/recipe.rs +++ b/crates/rebel-parse/src/grammar/recipe.rs @@ -75,7 +75,7 @@ peg::parser! { / p('[') typ:typ() p(']') { typ::Literal::Array(Box::new(typ)) } - / p('{') entries:delimited(<struct_field_typ()>, <p(',')>) p('}') { + / [Token::Keyword(Keyword::Struct)] p('{') entries:delimited(<struct_field_typ()>, <p(',')>) p('}') { typ::Literal::Struct(entries) } @@ -168,7 +168,7 @@ peg::parser! { / p('[') elements:delimited(<expr()>, <p(',')>) p(']') { expr::Literal::Array(elements) } - / p('{') entries:delimited(<struct_field()>, <p(',')>) p('}') { + / [Token::Keyword(Keyword::Struct)] p('{') entries:delimited(<struct_field()>, <p(',')>) p('}') { expr::Literal::Struct(entries) } |