diff options
Diffstat (limited to 'src/parse/ast/nodes.rs')
| -rw-r--r-- | src/parse/ast/nodes.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/parse/ast/nodes.rs b/src/parse/ast/nodes.rs index 617a01c..bffaea3 100644 --- a/src/parse/ast/nodes.rs +++ b/src/parse/ast/nodes.rs @@ -57,14 +57,14 @@ impl UnaryOperator { } #[derive(Debug, Clone)] -pub enum Literal { +pub enum SimpleLiteral { Int(u32), Float(f32), Str(String), Bool(bool), } -impl Literal { +impl SimpleLiteral { pub fn from_token(token: Token) -> Self { match token.variant { Int(int) => Self::Int(int), @@ -112,6 +112,11 @@ pub struct FnNode { } #[derive(Debug, Clone)] +pub struct ArrayNode { + pub elements: Vec<Expression>, +} + +#[derive(Debug, Clone)] pub struct FnHeader { pub has_self_receiver: bool, pub parameters: Vec<TypedIdentifier>, |
