Merge pull request #399 from travisstaloch/sat-arithmetic
support new ast token changes and saturating operators
This commit is contained in:
commit
779cfac82e
@ -1681,8 +1681,8 @@ fn addOutlineNodes(allocator: *std.mem.Allocator, tree: Analysis.Tree, child: as
|
|||||||
.assign,
|
.assign,
|
||||||
.assign_bit_and,
|
.assign_bit_and,
|
||||||
.assign_bit_or,
|
.assign_bit_or,
|
||||||
.assign_bit_shift_left,
|
.assign_shl,
|
||||||
.assign_bit_shift_right,
|
.assign_shr,
|
||||||
.assign_bit_xor,
|
.assign_bit_xor,
|
||||||
.assign_div,
|
.assign_div,
|
||||||
.assign_sub,
|
.assign_sub,
|
||||||
@ -1695,8 +1695,8 @@ fn addOutlineNodes(allocator: *std.mem.Allocator, tree: Analysis.Tree, child: as
|
|||||||
.bang_equal,
|
.bang_equal,
|
||||||
.bit_and,
|
.bit_and,
|
||||||
.bit_or,
|
.bit_or,
|
||||||
.bit_shift_left,
|
.shl,
|
||||||
.bit_shift_right,
|
.shr,
|
||||||
.bit_xor,
|
.bit_xor,
|
||||||
.bool_and,
|
.bool_and,
|
||||||
.bool_or,
|
.bool_or,
|
||||||
@ -3262,14 +3262,18 @@ fn makeScopeInternal(
|
|||||||
.assign_mod,
|
.assign_mod,
|
||||||
.assign_add,
|
.assign_add,
|
||||||
.assign_sub,
|
.assign_sub,
|
||||||
.assign_bit_shift_left,
|
.assign_shl,
|
||||||
.assign_bit_shift_right,
|
.assign_shr,
|
||||||
.assign_bit_and,
|
.assign_bit_and,
|
||||||
.assign_bit_xor,
|
.assign_bit_xor,
|
||||||
.assign_bit_or,
|
.assign_bit_or,
|
||||||
.assign_mul_wrap,
|
.assign_mul_wrap,
|
||||||
.assign_add_wrap,
|
.assign_add_wrap,
|
||||||
.assign_sub_wrap,
|
.assign_sub_wrap,
|
||||||
|
.assign_mul_sat,
|
||||||
|
.assign_add_sat,
|
||||||
|
.assign_sub_sat,
|
||||||
|
.assign_shl_sat,
|
||||||
.assign,
|
.assign,
|
||||||
.merge_error_sets,
|
.merge_error_sets,
|
||||||
.mul,
|
.mul,
|
||||||
@ -3277,13 +3281,17 @@ fn makeScopeInternal(
|
|||||||
.mod,
|
.mod,
|
||||||
.array_mult,
|
.array_mult,
|
||||||
.mul_wrap,
|
.mul_wrap,
|
||||||
|
.mul_sat,
|
||||||
.add,
|
.add,
|
||||||
.sub,
|
.sub,
|
||||||
.array_cat,
|
.array_cat,
|
||||||
.add_wrap,
|
.add_wrap,
|
||||||
.sub_wrap,
|
.sub_wrap,
|
||||||
.bit_shift_left,
|
.add_sat,
|
||||||
.bit_shift_right,
|
.sub_sat,
|
||||||
|
.shl,
|
||||||
|
.shl_sat,
|
||||||
|
.shr,
|
||||||
.bit_and,
|
.bit_and,
|
||||||
.bit_xor,
|
.bit_xor,
|
||||||
.bit_or,
|
.bit_or,
|
||||||
|
16
src/ast.zig
16
src/ast.zig
@ -391,14 +391,18 @@ pub fn lastToken(tree: Tree, node: ast.Node.Index) ast.TokenIndex {
|
|||||||
.assign_mod,
|
.assign_mod,
|
||||||
.assign_add,
|
.assign_add,
|
||||||
.assign_sub,
|
.assign_sub,
|
||||||
.assign_bit_shift_left,
|
.assign_shl,
|
||||||
.assign_bit_shift_right,
|
.assign_shr,
|
||||||
.assign_bit_and,
|
.assign_bit_and,
|
||||||
.assign_bit_xor,
|
.assign_bit_xor,
|
||||||
.assign_bit_or,
|
.assign_bit_or,
|
||||||
.assign_mul_wrap,
|
.assign_mul_wrap,
|
||||||
.assign_add_wrap,
|
.assign_add_wrap,
|
||||||
.assign_sub_wrap,
|
.assign_sub_wrap,
|
||||||
|
.assign_mul_sat,
|
||||||
|
.assign_add_sat,
|
||||||
|
.assign_sub_sat,
|
||||||
|
.assign_shl_sat,
|
||||||
.assign,
|
.assign,
|
||||||
.merge_error_sets,
|
.merge_error_sets,
|
||||||
.mul,
|
.mul,
|
||||||
@ -406,13 +410,17 @@ pub fn lastToken(tree: Tree, node: ast.Node.Index) ast.TokenIndex {
|
|||||||
.mod,
|
.mod,
|
||||||
.array_mult,
|
.array_mult,
|
||||||
.mul_wrap,
|
.mul_wrap,
|
||||||
|
.mul_sat,
|
||||||
.add,
|
.add,
|
||||||
.sub,
|
.sub,
|
||||||
.array_cat,
|
.array_cat,
|
||||||
.add_wrap,
|
.add_wrap,
|
||||||
.sub_wrap,
|
.sub_wrap,
|
||||||
.bit_shift_left,
|
.add_sat,
|
||||||
.bit_shift_right,
|
.sub_sat,
|
||||||
|
.shl,
|
||||||
|
.shl_sat,
|
||||||
|
.shr,
|
||||||
.bit_and,
|
.bit_and,
|
||||||
.bit_xor,
|
.bit_xor,
|
||||||
.bit_or,
|
.bit_or,
|
||||||
|
@ -474,8 +474,8 @@ fn symbolReferencesInternal(
|
|||||||
.assign,
|
.assign,
|
||||||
.assign_bit_and,
|
.assign_bit_and,
|
||||||
.assign_bit_or,
|
.assign_bit_or,
|
||||||
.assign_bit_shift_left,
|
.assign_shl,
|
||||||
.assign_bit_shift_right,
|
.assign_shr,
|
||||||
.assign_bit_xor,
|
.assign_bit_xor,
|
||||||
.assign_div,
|
.assign_div,
|
||||||
.assign_sub,
|
.assign_sub,
|
||||||
@ -488,8 +488,8 @@ fn symbolReferencesInternal(
|
|||||||
.bang_equal,
|
.bang_equal,
|
||||||
.bit_and,
|
.bit_and,
|
||||||
.bit_or,
|
.bit_or,
|
||||||
.bit_shift_left,
|
.shl,
|
||||||
.bit_shift_right,
|
.shr,
|
||||||
.bit_xor,
|
.bit_xor,
|
||||||
.bool_or,
|
.bool_or,
|
||||||
.div,
|
.div,
|
||||||
|
@ -815,27 +815,33 @@ fn writeNodeTokens(
|
|||||||
},
|
},
|
||||||
.add,
|
.add,
|
||||||
.add_wrap,
|
.add_wrap,
|
||||||
|
.add_sat,
|
||||||
.array_cat,
|
.array_cat,
|
||||||
.array_mult,
|
.array_mult,
|
||||||
.assign,
|
.assign,
|
||||||
.assign_bit_and,
|
.assign_bit_and,
|
||||||
.assign_bit_or,
|
.assign_bit_or,
|
||||||
.assign_bit_shift_left,
|
.assign_shl,
|
||||||
.assign_bit_shift_right,
|
.assign_shl_sat,
|
||||||
|
.assign_shr,
|
||||||
.assign_bit_xor,
|
.assign_bit_xor,
|
||||||
.assign_div,
|
.assign_div,
|
||||||
.assign_sub,
|
.assign_sub,
|
||||||
.assign_sub_wrap,
|
.assign_sub_wrap,
|
||||||
|
.assign_sub_sat,
|
||||||
.assign_mod,
|
.assign_mod,
|
||||||
.assign_add,
|
.assign_add,
|
||||||
.assign_add_wrap,
|
.assign_add_wrap,
|
||||||
|
.assign_add_sat,
|
||||||
.assign_mul,
|
.assign_mul,
|
||||||
.assign_mul_wrap,
|
.assign_mul_wrap,
|
||||||
|
.assign_mul_sat,
|
||||||
.bang_equal,
|
.bang_equal,
|
||||||
.bit_and,
|
.bit_and,
|
||||||
.bit_or,
|
.bit_or,
|
||||||
.bit_shift_left,
|
.shl,
|
||||||
.bit_shift_right,
|
.shl_sat,
|
||||||
|
.shr,
|
||||||
.bit_xor,
|
.bit_xor,
|
||||||
.bool_and,
|
.bool_and,
|
||||||
.bool_or,
|
.bool_or,
|
||||||
@ -850,9 +856,11 @@ fn writeNodeTokens(
|
|||||||
.mod,
|
.mod,
|
||||||
.mul,
|
.mul,
|
||||||
.mul_wrap,
|
.mul_wrap,
|
||||||
|
.mul_sat,
|
||||||
.switch_range,
|
.switch_range,
|
||||||
.sub,
|
.sub,
|
||||||
.sub_wrap,
|
.sub_wrap,
|
||||||
|
.sub_sat,
|
||||||
.@"orelse",
|
.@"orelse",
|
||||||
=> {
|
=> {
|
||||||
try await @asyncCall(child_frame, {}, writeNodeTokens, .{ builder, arena, store, node_data[node].lhs });
|
try await @asyncCall(child_frame, {}, writeNodeTokens, .{ builder, arena, store, node_data[node].lhs });
|
||||||
|
Loading…
Reference in New Issue
Block a user