You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment inline rule names' underscore is removed and the subsequent character capitalized when searching for methods in semantic actions. Both rules would therefore try to lookup the method RuleOne. Due to differing arities, only one of the rules can be acted upon.
This duplication of rules is not detected, since the inline rule name conforms to the Ohm/JS implementation (Rule_one) and is only later converted.
The text was updated successfully, but these errors were encountered:
Personally, I prefer the underscore in inline rule names. Since I never use underscores as normal rule names, it becomes much easier to distinguish between inline and normal definitions.
@stlutz Maybe you have an oppinion on #68 ? As the dispatch can not be mixed safely, I opted for a configuration. For your attributes you can now decide on whether you want the original rule names or the converted ones. As the converted ones are the default, you have to explicitly opt-in for the underscore preservation.
Inline rule names do not match with the message that is sent to semantic actions. It is therefore possible to do the following:
At the moment inline rule names' underscore is removed and the subsequent character capitalized when searching for methods in semantic actions. Both rules would therefore try to lookup the method
RuleOne
. Due to differing arities, only one of the rules can be acted upon.This duplication of rules is not detected, since the inline rule name conforms to the Ohm/JS implementation (
Rule_one
) and is only later converted.The text was updated successfully, but these errors were encountered: