pointers
This commit is contained in:
17
src/ast.zig
17
src/ast.zig
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user