diff --git a/src/parser2.ts b/src/parser2.ts index 513f563..92c7233 100644 --- a/src/parser2.ts +++ b/src/parser2.ts @@ -147,6 +147,14 @@ class Parser { wip.addWordPiece({ bare: chars }, pos); break; + case "[": { + this.advance(); + const script = this.parseScript(); + wip.addWordPiece({ script }); + this.expect("]"); + break; + } + case "whitespace": wip.finishWord(); break; @@ -162,7 +170,6 @@ class Parser { case "{": case "}": - case "[": case "quote": case "backslash": case "comment":