Skip to content

Commit

Permalink
Fix lexer (WebAssembly#245)
Browse files Browse the repository at this point in the history
In WebAssembly#243 I accepted some changes without pulling and running locally. My
laziness is rewarded with compilation errors. This fixes the issue.
  • Loading branch information
ngzhian authored Jun 5, 2020
1 parent 5d6ac62 commit 90e9f14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions interpreter/text/lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ rule token = parse
| (simd_shape as s)".neg"
{ if s <> "i32x4" && s <> "f32x4" then error lexbuf "unknown operator";
UNARY (simdop s unreachable unreachable i32x4_neg unreachable f32x4_neg unreachable) }
| (simd_float as s)".sqrt"
| (simd_float_shape as s)".sqrt"
{ if s <> "f32x4" then error lexbuf "unknown operator";
UNARY (simdfloatop s f32x4_sqrt unreachable) }
UNARY (simd_float_op s f32x4_sqrt unreachable) }
| (simd_shape as s)".add"
{ if s <> "i32x4" && s <> "f32x4" then error lexbuf "unknown operator";
BINARY (simdop s unreachable unreachable i32x4_add unreachable f32x4_add unreachable) }
Expand All @@ -415,9 +415,9 @@ rule token = parse
| (simd_shape as s)".mul"
{ if s <> "i32x4" && s <> "f32x4" then error lexbuf "unknown operator";
BINARY (simdop s unreachable unreachable i32x4_mul unreachable f32x4_mul unreachable) }
| (simd_float as s)".div"
| (simd_float_shape as s)".div"
{ if s <> "f32x4" then error lexbuf "unknown operator";
BINARY (simdfloatop s f32x4_div unreachable) }
BINARY (simd_float_op s f32x4_div unreachable) }
| (simd_shape as s)".min"
{ if s <> "f32x4" && s <> "f64x2" then error lexbuf "unknown operator";
BINARY (simdop s unreachable unreachable unreachable unreachable f32x4_min f64x2_min) }
Expand Down

0 comments on commit 90e9f14

Please sign in to comment.