All original parser tests pass
This commit is contained in:
parent
6b1c2c48ef
commit
d220993236
1 changed files with 8 additions and 4 deletions
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue