-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor rule parsing #4699
Refactor rule parsing #4699
Conversation
Such rules only seem to be generated when KORE anti-left is enabled.
1d6f27c
to
d71f6f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
case And(ops=(In(right=x), y)): | ||
return (x,) + FunctionRule._get_patterns(y) | ||
case And(ops=(In(left=EVar(), right=arg), rest)): | ||
return (arg,) + FunctionRule._extract_args(rest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course this relies on the order of arguments being consistent with the order of \in
clauses... (before and after your change), but that's probably OK...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. But since everything else also relies on a particular structure of terms, I'll just keep it this way until it causes issues.
AppRule
,CeilRule
,EqualsRule