From 0bfabdce4166bc28eb7505b05b769df9328fd5a1 Mon Sep 17 00:00:00 2001 From: paulklint Date: Thu, 14 Mar 2024 14:50:55 +0100 Subject: [PATCH] Fixed error discovered by new check --- .../library/lang/rascal/grammar/definition/Attributes.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/rascalmpl/library/lang/rascal/grammar/definition/Attributes.rsc b/src/org/rascalmpl/library/lang/rascal/grammar/definition/Attributes.rsc index 6b98524756b..9a03402b0d1 100644 --- a/src/org/rascalmpl/library/lang/rascal/grammar/definition/Attributes.rsc +++ b/src/org/rascalmpl/library/lang/rascal/grammar/definition/Attributes.rsc @@ -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) { @@ -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());