Skip to content

Commit

Permalink
Fix bug in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Peters committed Jul 30, 2024
1 parent 8d11536 commit 6e282f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
16 changes: 0 additions & 16 deletions parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6e282f0

Please sign in to comment.