1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

b2/: meta-variable $ for "previously matched variable"

We need this for iterative processing of FN.
This commit is contained in:
Werner Almesberger
2012-05-22 13:01:39 -03:00
parent 2946b830f1
commit 3d2eca34ff
7 changed files with 52 additions and 17 deletions

View File

@@ -356,10 +356,14 @@ static void recurse_fin(struct subst *sub, const struct parent *parent)
sub->prev = prev;
switch (sub->type) {
case st_match:
if (!parent && sub->u.match.src == dollar)
yyerror("$ without match");
next.sub = sub;
recurse_fin(sub->u.match.block, &next);
break;
case st_assign:
if (!parent && sub->u.assign.dst == dollar)
yyerror("$ without match");
check_chunks(sub->u.assign.pat, parent, prev);
break;
case st_end: