#each parser fix
parent
82cb0ed267
commit
dae2111d90
|
@ -76,7 +76,7 @@ function processTree(tree: AST): AST {
|
||||||
switch (blockType) {
|
switch (blockType) {
|
||||||
case "each": {
|
case "each": {
|
||||||
const eachExpr = blockTextContent.trim();
|
const eachExpr = blockTextContent.trim();
|
||||||
const eachVarMatch = eachExpr.match(/@(\w+)\s*in\s*(.+)$/s);
|
const eachVarMatch = eachExpr.match(/^@(\w+)\s*in\s*(.+)$/s);
|
||||||
if (!eachVarMatch) {
|
if (!eachVarMatch) {
|
||||||
// Not a each var declaration, just an expression
|
// Not a each var declaration, just an expression
|
||||||
const expressionTree = parseTreeToAST(parse(
|
const expressionTree = parseTreeToAST(parse(
|
||||||
|
|
Loading…
Reference in New Issue