Skip to content

Commit

Permalink
Rewritten to satisfy stricter variable rules for or operator
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Sep 15, 2024
1 parent 2089367 commit 5bba6e4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ list[Symbol] intermix(list[Symbol] syms, Symbol l, set[Symbol] others) {
return syms;
}
private bool sepInOthers(Symbol sep, set[Symbol] others) // TODO: factored out due to compiler issue
= sep in others || (seq([a,_,b]) := sep && (a in others || b in others));
private bool sepInOthers(Symbol sep, set[Symbol] others)
// TODO: factored out due to compiler issue
// TODO: rewritten to satisfy stricter variable rules for or operator
{ if(sep in others) return true;
if(seq([a,_,b]) := sep) return (a in others || b in others);
return false;
}
private Symbol regulars(Symbol s, Symbol l, set[Symbol] others) {
return visit(s) {
Expand Down

0 comments on commit 5bba6e4

Please sign in to comment.