Skip to content

Commit

Permalink
feat: require startsExpr on modulo for v8intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jul 1, 2019
1 parent bd7550c commit 66f9216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/babel-parser/src/tokenizer/types.js
Expand Up @@ -148,7 +148,8 @@ export const types: { [name: string]: TokenType } = {
relational: createBinop("</>/<=/>=", 7),
bitShift: createBinop("<</>>/>>>", 8),
plusMin: new TokenType("+/-", { beforeExpr, binop: 9, prefix, startsExpr }),
modulo: createBinop("%", 10),
// startsExpr: required by v8intrinsic plugin
modulo: new TokenType("%", { beforeExpr, binop: 10, startsExpr }),
star: createBinop("*", 10),
slash: createBinop("/", 10),
exponent: new TokenType("**", {
Expand Down

0 comments on commit 66f9216

Please sign in to comment.