Skip to content

Commit

Permalink
fixed dynamic post-parse filtering test
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed May 8, 2024
1 parent 448a6bc commit 046b09c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ syntax Aas
| aas: [a][a][a]*
;

&T <:Tree ambFilter(amb(set[&T <:Tree] alternatives)) {
set[&T <:Tree] result = {a | &T a <- alternatives, !(a is nil)};
if ({&T <: Tree oneTree} := result) {
Aas ambFilter(amb(set[Aas] alternatives)) {
set[Aas] result = {a | Aas a <- alternatives, !(a is nil)};

if ({oneTree} := result) {
return oneTree;
}

return ParseTree::amb(result);
}

Expand Down

0 comments on commit 046b09c

Please sign in to comment.