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": {
|
case "backslash": {
|
||||||
this.advance();
|
this.advance();
|
||||||
this.parseBackslashEscape(wip, "bare");
|
this.parseBackslashEscape(wip, pos, "bare");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ class Parser {
|
||||||
|
|
||||||
case "backslash": {
|
case "backslash": {
|
||||||
this.advance();
|
this.advance();
|
||||||
this.parseBackslashEscape(wip, "quote");
|
this.parseBackslashEscape(wip, pos, "quote");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,8 +298,12 @@ class Parser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parseBackslashEscape(wip: WipScript, wordType: "bare" | "quote") {
|
parseBackslashEscape(
|
||||||
const [type, chars, pos] = this.next;
|
wip: WipScript,
|
||||||
|
pos: number,
|
||||||
|
wordType: "bare" | "quote"
|
||||||
|
) {
|
||||||
|
const [type, chars] = this.next;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "newline":
|
case "newline":
|
||||||
if (wordType == "bare") {
|
if (wordType == "bare") {
|
||||||
|
|
Loading…
Reference in a new issue