Support [] interpolation in new parser
This commit is contained in:
parent
63d6fa836a
commit
ab91d71170
1 changed files with 8 additions and 1 deletions
|
@ -147,6 +147,14 @@ class Parser {
|
||||||
wip.addWordPiece({ bare: chars }, pos);
|
wip.addWordPiece({ bare: chars }, pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "[": {
|
||||||
|
this.advance();
|
||||||
|
const script = this.parseScript();
|
||||||
|
wip.addWordPiece({ script });
|
||||||
|
this.expect("]");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "whitespace":
|
case "whitespace":
|
||||||
wip.finishWord();
|
wip.finishWord();
|
||||||
break;
|
break;
|
||||||
|
@ -162,7 +170,6 @@ class Parser {
|
||||||
|
|
||||||
case "{":
|
case "{":
|
||||||
case "}":
|
case "}":
|
||||||
case "[":
|
|
||||||
case "quote":
|
case "quote":
|
||||||
case "backslash":
|
case "backslash":
|
||||||
case "comment":
|
case "comment":
|
||||||
|
|
Loading…
Reference in a new issue