Support [] interpolation in new parser

This commit is contained in:
Tangent Wantwight 2024-06-05 20:02:47 -04:00
parent 63d6fa836a
commit ab91d71170

View file

@ -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":