File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,17 +48,17 @@ object RedundantAdjacenciesChecker {
4848 case Some ((rule, Rhd )) => isRedundantAdjacency(rule, rul2.lookupRuleRhd)
4949 case Some ((rule, Lhd )) => isRedundantAdjacency(rule, rul2.lookupRuleLhd)
5050 case Some ((rule, RhdAndLhd )) =>
51- val b = isRedundantAdjacency(rule, rul2.lookupRuleRhd)
52- require(
53- b == isRedundantAdjacency(rule, rul2.lookupRuleLhd),
54- s " Redundancies should be the same for RHD and LHD: $rule" // hopefully this will always be the case
55- )
56- b
51+ val b1 = isRedundantAdjacency(rule, rul2.lookupRuleRhd)
52+ val b2 = isRedundantAdjacency(rule, rul2.lookupRuleLhd)
53+ if (b1 != b2) {
54+ println( s " Rule is redundant for ${ if (b1) " RHD" else " LHD" } only : $rule" ) // hopefully this rarely happens
55+ }
56+ b1 && b2
5757 case None => false // comments are not redundant
5858 }
5959
6060 if (redundant) {
61- printer.println(s " ; ${line.stripLineEnd}; redundant-adjacency " ) // comments out the line
61+ printer.println(s " ; ${line.stripLineEnd}; redundant_adjacency " ) // comments out the line
6262 } else {
6363 printer.print(line) // preserving original linebreaks
6464 }
You can’t perform that action at this time.
0 commit comments