diff --git a/README.md b/README.md index 6e56756..6668162 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Usage: ```typescript import {parse} from '@anpete/fastexpr'; -const expr = (s: string) => `hello from ${s}!`; +const expr = (s) => `hello from ${s}!`; const ast = parse(expr.toString()); diff --git a/parser.ts b/parser.ts index 9bcf063..67e48ce 100644 --- a/parser.ts +++ b/parser.ts @@ -877,22 +877,6 @@ function lexNumber(cp: number, expr: string, i: number, seenDot = false) { return lexOctal("", expr, i + 1); } } - - if ((cp === 0x2d || cp === 0x2b) && cp1 === 0x30) { - const cp2 = expr.charCodeAt(i + 2); - - if (cp2 === 0x78 || cp2 === 0x58) { - return lexHex(value, expr, i + 2); - } - - if (cp2 === 0x62 || cp2 === 0x42) { - return lexOctal(value, expr, i + 2); - } - - if (cp2 === 0x6f || cp2 === 0x4f) { - return lexBinary(value, expr, i + 2); - } - } } let seenE = false;