All original parser tests pass

This commit is contained in:
Tangent Wantwight 2024-06-08 14:03:31 -04:00
parent 6b1c2c48ef
commit d220993236

View file

@ -234,7 +234,7 @@ class Parser {
case "backslash": {
this.advance();
this.parseBackslashEscape(wip, "bare");
this.parseBackslashEscape(wip, pos, "bare");
break;
}
@ -280,7 +280,7 @@ class Parser {
case "backslash": {
this.advance();
this.parseBackslashEscape(wip, "quote");
this.parseBackslashEscape(wip, pos, "quote");
break;
}
@ -298,8 +298,12 @@ class Parser {
}
}
parseBackslashEscape(wip: WipScript, wordType: "bare" | "quote") {
const [type, chars, pos] = this.next;
parseBackslashEscape(
wip: WipScript,
pos: number,
wordType: "bare" | "quote"
) {
const [type, chars] = this.next;
switch (type) {
case "newline":
if (wordType == "bare") {