This commit is contained in:
agra
2026-02-10 22:47:43 +02:00
parent ef14144d49
commit 70435d3c85
11 changed files with 443 additions and 5 deletions

View File

@@ -50,6 +50,10 @@ pub const Node = struct {
parameterized_type_expr: ParameterizedTypeExpr,
index_expr: IndexExpr,
slice_expr: SliceExpr,
pointer_type_expr: PointerTypeExpr,
many_pointer_type_expr: ManyPointerTypeExpr,
deref_expr: DerefExpr,
null_literal: void,
while_expr: WhileExpr,
for_expr: ForExpr,
spread_expr: SpreadExpr,
@@ -156,6 +160,7 @@ pub const UnaryOp = struct {
negate,
not,
xx,
address_of,
};
};
@@ -306,6 +311,18 @@ pub const SliceExpr = struct {
end: ?*Node = null,
};
pub const PointerTypeExpr = struct {
pointee_type: *Node,
};
pub const ManyPointerTypeExpr = struct {
element_type: *Node,
};
pub const DerefExpr = struct {
operand: *Node,
};
pub const WhileExpr = struct {
condition: *Node,
body: *Node,