diff --git a/schala-lang/language/src/ast.rs b/schala-lang/language/src/ast.rs index bf77ef1..01cab96 100644 --- a/schala-lang/language/src/ast.rs +++ b/schala-lang/language/src/ast.rs @@ -160,17 +160,18 @@ pub enum Variant { #[derive(Debug, PartialEq, Clone)] pub struct Expression { + pub id: ItemId, pub kind: ExpressionKind, pub type_anno: Option } impl Expression { - pub fn new(kind: ExpressionKind) -> Expression { - Expression { kind, type_anno: None } + pub fn new(id: ItemId, kind: ExpressionKind) -> Expression { + Expression { id, kind, type_anno: None } } - pub fn with_anno(kind: ExpressionKind, type_anno: TypeIdentifier) -> Expression { - Expression { kind, type_anno: Some(type_anno) } + pub fn with_anno(id: ItemId, kind: ExpressionKind, type_anno: TypeIdentifier) -> Expression { + Expression { id, kind, type_anno: Some(type_anno) } } }