Explicit labels for tokenTypes (#9761)
* Explicit labels for tokenTypes * Fix test * Fix test
This commit is contained in:
parent
aaefc83a6c
commit
d720c6cfff
@ -144,9 +144,9 @@ export const types: { [name: string]: TokenType } = {
|
|||||||
bitwiseOR: createBinop("|", 3),
|
bitwiseOR: createBinop("|", 3),
|
||||||
bitwiseXOR: createBinop("^", 4),
|
bitwiseXOR: createBinop("^", 4),
|
||||||
bitwiseAND: createBinop("&", 5),
|
bitwiseAND: createBinop("&", 5),
|
||||||
equality: createBinop("==/!=", 6),
|
equality: createBinop("==/!=/===/!==", 6),
|
||||||
relational: createBinop("</>", 7),
|
relational: createBinop("</>/<=/>=", 7),
|
||||||
bitShift: createBinop("<</>>", 8),
|
bitShift: createBinop("<</>>/>>>", 8),
|
||||||
plusMin: new TokenType("+/-", { beforeExpr, binop: 9, prefix, startsExpr }),
|
plusMin: new TokenType("+/-", { beforeExpr, binop: 9, prefix, startsExpr }),
|
||||||
modulo: createBinop("%", 10),
|
modulo: createBinop("%", 10),
|
||||||
star: createBinop("*", 10),
|
star: createBinop("*", 10),
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["react", {}, "before"], "typescript", ["react", {}, "after"]],
|
"throws": "Unexpected token, expected \"</>/<=/>=\" (1:6)"
|
||||||
"throws": "Unexpected token, expected \"</>\" (1:6)"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user