Tag
The FooComma/FooSemicolon variants exist to ease the implementation of
Ast.lastToken()
Fields of this type
Fields
- root:root
- The root node which is guaranteed to be at `Node.Index.root`.
- test_decl:test_decl
- `test {}`,
- global_var_decl:global_var_decl
- The `data` field is a `.extra_and_opt_node`:
- local_var_decl:local_var_decl
- `var a: b align(c) = d`.
- simple_var_decl:simple_var_decl
- `var a: b = c`.
- aligned_var_decl:aligned_var_decl
- `var a align(b) = c`.
- @"errdefer":@"errdefer"
- `errdefer expr`,
- @"defer":@"defer"
- `defer expr`.
- @"catch":@"catch"
- `lhs catch rhs`,
- field_access:field_access
- `lhs.a`.
- unwrap_optional:unwrap_optional
- `lhs.?`.
- equal_equal:equal_equal
- `lhs == rhs`.
- bang_equal:bang_equal
- `lhs != rhs`.
- less_than:less_than
- `lhs < rhs`.
- greater_than:greater_than
- `lhs > rhs`.
- less_or_equal:less_or_equal
- `lhs <= rhs`.
- greater_or_equal:greater_or_equal
- `lhs >= rhs`.
- assign_mul:assign_mul
- `lhs *= rhs`.
- assign_div:assign_div
- `lhs /= rhs`.
- assign_mod:assign_mod
- `lhs %= rhs`.
- assign_add:assign_add
- `lhs += rhs`.
- assign_sub:assign_sub
- `lhs -= rhs`.
- assign_shl:assign_shl
- `lhs <<= rhs`.
- assign_shl_sat:assign_shl_sat
- `lhs <<|= rhs`.
- assign_shr:assign_shr
- `lhs >>= rhs`.
- assign_bit_and:assign_bit_and
- `lhs &= rhs`.
- assign_bit_xor:assign_bit_xor
- `lhs ^= rhs`.
- assign_bit_or:assign_bit_or
- `lhs |= rhs`.
- assign_mul_wrap:assign_mul_wrap
- `lhs *%= rhs`.
- assign_add_wrap:assign_add_wrap
- `lhs +%= rhs`.
- assign_sub_wrap:assign_sub_wrap
- `lhs -%= rhs`.
- assign_mul_sat:assign_mul_sat
- `lhs *|= rhs`.
- assign_add_sat:assign_add_sat
- `lhs +|= rhs`.
- assign_sub_sat:assign_sub_sat
- `lhs -|= rhs`.
- assign:assign
- `lhs = rhs`.
- assign_destructure:assign_destructure
- `a, b, ...
- merge_error_sets:merge_error_sets
- `lhs || rhs`.
- mul:mul
- `lhs * rhs`.
- div:div
- `lhs / rhs`.
- mod:mod
- `lhs % rhs`.
- array_mult:array_mult
- `lhs ** rhs`.
- mul_wrap:mul_wrap
- `lhs *% rhs`.
- mul_sat:mul_sat
- `lhs *| rhs`.
- add:add
- `lhs + rhs`.
- sub:sub
- `lhs - rhs`.
- array_cat:array_cat
- `lhs ++ rhs`.
- add_wrap:add_wrap
- `lhs +% rhs`.
- sub_wrap:sub_wrap
- `lhs -% rhs`.
- add_sat:add_sat
- `lhs +| rhs`.
- sub_sat:sub_sat
- `lhs -| rhs`.
- shl:shl
- `lhs << rhs`.
- shl_sat:shl_sat
- `lhs <<| rhs`.
- shr:shr
- `lhs >> rhs`.
- bit_and:bit_and
- `lhs & rhs`.
- bit_xor:bit_xor
- `lhs ^ rhs`.
- bit_or:bit_or
- `lhs | rhs`.
- @"orelse":@"orelse"
- `lhs orelse rhs`.
- bool_and:bool_and
- `lhs and rhs`.
- bool_or:bool_or
- `lhs or rhs`.
- bool_not:bool_not
- `!expr`.
- negation:negation
- `-expr`.
- bit_not:bit_not
- `~expr`.
- negation_wrap:negation_wrap
- `-%expr`.
- address_of:address_of
- `&expr`.
- @"try":@"try"
- `try expr`.
- optional_type:optional_type
- `?expr`.
- array_type:array_type
- `[lhs]rhs`.
- array_type_sentinel:array_type_sentinel
- `[lhs:a]b`.
- ptr_type_aligned:ptr_type_aligned
- `[*]align(lhs) rhs`,
- ptr_type_sentinel:ptr_type_sentinel
- `[*:lhs]rhs`,
- ptr_type:ptr_type
- The `data` field is a `.extra_and_node`:
- ptr_type_bit_range:ptr_type_bit_range
- The `data` field is a `.extra_and_node`:
- slice_open:slice_open
- `lhs[rhs..]`
- slice_sentinel:slice_sentinel
- `sliced[start..end :sentinel]`,
- deref:deref
- `expr.*`.
- array_access:array_access
- `lhs[rhs]`.
- array_init_one:array_init_one
- `lhs{rhs}`.
- array_init_one_comma:array_init_one_comma
- Same as `array_init_one` except there is known to be a trailing
- array_init_dot_two:array_init_dot_two
- `.{a}`,
- array_init_dot_two_comma:array_init_dot_two_comma
- Same as `array_init_dot_two` except there is known to be a trailing
- array_init_dot:array_init_dot
- `.{a, b, c}`.
- array_init_dot_comma:array_init_dot_comma
- Same as `array_init_dot` except there is known to be a trailing
- array_init:array_init
- `a{b, c}`.
- array_init_comma:array_init_comma
- Same as `array_init` except there is known to be a trailing comma
- struct_init_one:struct_init_one
- `a{.x = b}`, `a{}`.
- struct_init_one_comma:struct_init_one_comma
- Same as `struct_init_one` except there is known to be a trailing comma
- struct_init_dot_two:struct_init_dot_two
- `.{.x = a, .y = b}`.
- struct_init_dot_two_comma:struct_init_dot_two_comma
- Same as `struct_init_dot_two` except there is known to be a trailing
- struct_init_dot:struct_init_dot
- `.{.x = a, .y = b, .z = c}`.
- struct_init_dot_comma:struct_init_dot_comma
- Same as `struct_init_dot` except there is known to be a trailing
- struct_init:struct_init
- `a{.x = b, .y = c}`.
- struct_init_comma:struct_init_comma
- Same as `struct_init` except there is known to be a trailing comma
- call_one:call_one
- `a(b)`, `a()`.
- call_one_comma:call_one_comma
- Same as `call_one` except there is known to be a trailing comma
- call:call
- `a(b, c, d)`.
- call_comma:call_comma
- Same as `call` except there is known to be a trailing comma before
- @"switch":@"switch"
- `switch(a) {}`.
- switch_comma:switch_comma
- Same as `switch` except there is known to be a trailing comma before
- switch_case_one:switch_case_one
- `a => b`,
- switch_case_inline_one:switch_case_inline_one
- Same as `switch_case_one` but the case is inline.
- switch_case:switch_case
- `a, b, c => d`.
- switch_case_inline:switch_case_inline
- Same as `switch_case` but the case is inline.
- switch_range:switch_range
- `lhs...rhs`.
- while_simple:while_simple
- `while (a) b`,
- while_cont:while_cont
- `while (a) : (b) c`,
- @"while":@"while"
- `while (a) : (b) c else d`,
- for_simple:for_simple
- `for (a) b`.
- @"for":@"for"
- `for (lhs[0..inputs]) lhs[inputs + 1] else lhs[inputs + 2]`.
- for_range:for_range
- `lhs..rhs`, `lhs..`.
- if_simple:if_simple
- `if (a) b`.
- @"if":@"if"
- `if (a) b else c`.
- @"suspend":@"suspend"
- `suspend expr`.
- @"resume":@"resume"
- `resume expr`.
- @"continue":@"continue"
- `continue :label expr`,
- @"break":@"break"
- `break :label expr`,
- @"return":@"return"
- `return expr`, `return`.
- fn_proto_simple:fn_proto_simple
- `fn (a: type_expr) return_type`.
- fn_proto_multi:fn_proto_multi
- `fn (a: b, c: d) return_type`.
- fn_proto_one:fn_proto_one
- `fn (a: b) addrspace(e) linksection(f) callconv(g) return_type`.
- fn_proto:fn_proto
- `fn (a: b, c: d) addrspace(e) linksection(f) callconv(g) return_type`.
- fn_decl:fn_decl
- Extern function declarations use the fn_proto tags rather than this one.
- anyframe_type:anyframe_type
- `anyframe->return_type`.
- anyframe_literal:anyframe_literal
- The `data` field is unused.
- char_literal:char_literal
- The `data` field is unused.
- number_literal:number_literal
- The `data` field is unused.
- unreachable_literal:unreachable_literal
- The `data` field is unused.
- identifier:identifier
- The `data` field is unused.
- enum_literal:enum_literal
- `.foo`.
- string_literal:string_literal
- The `data` field is unused.
- multiline_string_literal:multiline_string_literal
- The `data` field is a `.token_and_token`:
- grouped_expression:grouped_expression
- `(expr)`.
- builtin_call_two:builtin_call_two
- `@a(b, c)`.
- builtin_call_two_comma:builtin_call_two_comma
- Same as `builtin_call_two` except there is known to be a trailing comma
- builtin_call:builtin_call
- `@a(b, c, d)`.
- builtin_call_comma:builtin_call_comma
- Same as `builtin_call` except there is known to be a trailing comma
- error_set_decl:error_set_decl
- `error{a, b}`.
- container_decl:container_decl
- `struct {}`, `union {}`, `opaque {}`, `enum {}`.
- container_decl_trailing:container_decl_trailing
- Same as `container_decl` except there is known to be a trailing
- container_decl_two:container_decl_two
- `struct {lhs, rhs}`, `union {lhs, rhs}`, `opaque {lhs, rhs}`, `enum {lhs, rhs}`.
- container_decl_two_trailing:container_decl_two_trailing
- Same as `container_decl_two` except there is known to be a trailing
- container_decl_arg:container_decl_arg
- `struct(arg)`, `union(arg)`, `enum(arg)`.
- container_decl_arg_trailing:container_decl_arg_trailing
- Same as `container_decl_arg` except there is known to be a trailing
- tagged_union:tagged_union
- `union(enum) {}`.
- tagged_union_trailing:tagged_union_trailing
- Same as `tagged_union` except there is known to be a trailing comma
- tagged_union_two:tagged_union_two
- `union(enum) {lhs, rhs}`.
- tagged_union_two_trailing:tagged_union_two_trailing
- Same as `tagged_union_two` except there is known to be a trailing
- tagged_union_enum_tag:tagged_union_enum_tag
- `union(enum(arg)) {}`.
- tagged_union_enum_tag_trailing:tagged_union_enum_tag_trailing
- Same as `tagged_union_enum_tag` except there is known to be a
- container_field_init:container_field_init
- `a: lhs = rhs,`,
- container_field_align:container_field_align
- `a: lhs align(rhs),`.
- container_field:container_field
- `a: lhs align(c) = d,`.
- @"comptime":@"comptime"
- `comptime expr`.
- @"nosuspend":@"nosuspend"
- `nosuspend expr`.
- block_two:block_two
- `{lhs rhs}`.
- block_two_semicolon:block_two_semicolon
- Same as `block_two` except there is known to be a trailing
- block:block
- `{a b}`.
- block_semicolon:block_semicolon
- Same as `block` except there is known to be a trailing comma before
- asm_simple:asm_simple
- `asm(a)`.
- asm_legacy:asm_legacy
- `asm(lhs, a)`.
- @"asm":@"asm"
- `asm(a, b)`.
- asm_output:asm_output
- `[a] "b" (c)`.
- asm_input:asm_input
- `[a] "b" (lhs)`.
- error_value:error_value
- `error.a`.
- error_union:error_union
- `lhs!rhs`.
Functions in this namespace