Skip to content

Commit

Permalink
Explicit labels for tokenTypes (#9761)
Browse files Browse the repository at this point in the history
* Explicit labels for tokenTypes

* Fix test

* Fix test
  • Loading branch information
danez committed Mar 25, 2019
1 parent aaefc83 commit d720c6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/babel-parser/src/tokenizer/types.js
Expand Up @@ -144,9 +144,9 @@ export const types: { [name: string]: TokenType } = {
bitwiseOR: createBinop("|", 3),
bitwiseXOR: createBinop("^", 4),
bitwiseAND: createBinop("&", 5),
equality: createBinop("==/!=", 6),
relational: createBinop("</>", 7),
bitShift: createBinop("<</>>", 8),
equality: createBinop("==/!=/===/!==", 6),
relational: createBinop("</>/<=/>=", 7),
bitShift: createBinop("<</>>/>>>", 8),
plusMin: new TokenType("+/-", { beforeExpr, binop: 9, prefix, startsExpr }),
modulo: createBinop("%", 10),
star: createBinop("*", 10),
Expand Down
@@ -1,4 +1,3 @@
{
"presets": [["react", {}, "before"], "typescript", ["react", {}, "after"]],
"throws": "Unexpected token, expected \"</>\" (1:6)"
"throws": "Unexpected token, expected \"</>/<=/>=\" (1:6)"
}

0 comments on commit d720c6c

Please sign in to comment.