aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTravis Staloch <twostepted@gmail.com>2021-09-08 15:58:37 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-28 17:03:43 -0700
commitdcbc52ec85d00fbd3603c314aaaab98fb3866892 (patch)
treecda1709af1515d51ada13319119f9f79544ff4f3 /src
parentb9a95f2dd94e6175322d3388c3936eb600ec90ea (diff)
downloadzig-dcbc52ec85d00fbd3603c314aaaab98fb3866892.tar.gz
zig-dcbc52ec85d00fbd3603c314aaaab98fb3866892.zip
sat-arithmetic: correctly tokenize <<|, <<|=
- set state rather than result.tag in tokenizer.zig - add test to tokenizer.zig for <<, <<|, <<|=
Diffstat (limited to 'src')
-rw-r--r--src/Air.zig6
-rw-r--r--src/stage1/tokenizer.cpp1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/Air.zig b/src/Air.zig
index b7d3938352..00f223ad21 100644
--- a/src/Air.zig
+++ b/src/Air.zig
@@ -44,7 +44,7 @@ pub const Inst = struct {
/// is the same as both operands.
/// Uses the `bin_op` field.
addwrap,
- /// Saturating integer addition.
+ /// Saturating integer addition.
/// Both operands are guaranteed to be the same type, and the result type
/// is the same as both operands.
/// Uses the `bin_op` field.
@@ -59,7 +59,7 @@ pub const Inst = struct {
/// is the same as both operands.
/// Uses the `bin_op` field.
subwrap,
- /// Saturating integer subtraction.
+ /// Saturating integer subtraction.
/// Both operands are guaranteed to be the same type, and the result type
/// is the same as both operands.
/// Uses the `bin_op` field.
@@ -74,7 +74,7 @@ pub const Inst = struct {
/// is the same as both operands.
/// Uses the `bin_op` field.
mulwrap,
- /// Saturating integer multiplication.
+ /// Saturating integer multiplication.
/// Both operands are guaranteed to be the same type, and the result type
/// is the same as both operands.
/// Uses the `bin_op` field.
diff --git a/src/stage1/tokenizer.cpp b/src/stage1/tokenizer.cpp
index 3560193927..47e324c933 100644
--- a/src/stage1/tokenizer.cpp
+++ b/src/stage1/tokenizer.cpp
@@ -995,7 +995,6 @@ void tokenize(const char *source, Tokenization *out) {
t.state = TokenizeState_start;
break;
case '|':
- // t.out->ids.last() = TokenIdBitShiftLeftPipe;
t.state = TokenizeState_angle_bracket_angle_bracket_left_pipe;
break;
default: