Add Syntax.clone() method and '\\' token

This commit is contained in:
Sam Vervaeck 2023-02-06 11:50:38 +01:00
parent 80e907d3e2
commit f995d887e7
2 changed files with 657 additions and 8 deletions

File diff suppressed because it is too large Load diff

View file

@ -44,6 +44,7 @@ import {
ModKeyword,
ClassKeyword,
InstanceKeyword,
Backslash,
} from "./cst"
import { Diagnostics, UnexpectedCharDiagnostic } from "./diagnostics"
import { Stream, BufferedStream, assert } from "./util";
@ -220,6 +221,7 @@ export class Scanner extends BufferedStream<Token> {
return new EndOfFile(startPos);
}
case '\\': return new Backslash(startPos);
case '(': return new LParen(startPos);
case ')': return new RParen(startPos);
case '[': return new LBracket(startPos);