Skip to content

Commit

Permalink
Fixed error discovered by new check
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Mar 14, 2024
1 parent bf0be87 commit 0bfabdc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import util::Maybe;
@synopsis{adds an attribute to all productions it can find}
Production attribute(Production p, Attr a) = p[attributes=p.attributes+{a}];

set[Attr] mods2attrs(ProdModifier* mods) = {x | ProdModifier m <- mods, just(x) := mod2attr(m)};
set[Attr] mods2attrs(ProdModifier* mods) = {x | ProdModifier m <- mods, just(Attr x) := mod2attr(m)};

Maybe[Attr] mod2attr(ProdModifier m) {
switch (m) {
Expand All @@ -41,7 +41,7 @@ Maybe[Attr] mod2attr(ProdModifier m) {

public Maybe[Associativity] testAssoc(str m) = mod2assoc([ProdModifier] m);

Maybe[Associativity] mods2assoc(ProdModifier* mods) = (nothing() | just(x) | ProdModifier m <- mods, just(x) := mod2assoc(m));
Maybe[Associativity] mods2assoc(ProdModifier* mods) = (nothing() | just(x) | ProdModifier m <- mods, just(Associativity x) := mod2assoc(m));

Maybe[Associativity] mod2assoc(ProdModifier _:\associativity(\left())) = just(Associativity::\left());
Maybe[Associativity] mod2assoc(ProdModifier _:\associativity(\right())) = just(Associativity::\right());
Expand Down

0 comments on commit 0bfabdc

Please sign in to comment.