@@ -784,18 +784,18 @@ private class PpSwitchCase extends PpAst, SwitchCase {
784
784
785
785
private class PpPatternCase extends PpAst , PatternCase {
786
786
private predicate isAnonymousPattern ( int n ) {
787
- this .getPatternAtIndex ( n ) .asBindingOrUnnamedPattern ( ) .isAnonymous ( )
787
+ this .getPattern ( n ) .asBindingOrUnnamedPattern ( ) .isAnonymous ( )
788
788
}
789
789
790
790
override string getPart ( int i ) {
791
- exists ( int n , int base | exists ( this .getPatternAtIndex ( n ) ) and base = n * 4 |
791
+ exists ( int n , int base | exists ( this .getPattern ( n ) ) and base = n * 4 |
792
792
i = base and
793
793
( if n = 0 then result = "case " else result = ", " )
794
794
or
795
795
i = base + 2 and
796
- this .getPatternAtIndex ( n ) instanceof LocalVariableDeclExpr and
796
+ this .getPattern ( n ) instanceof LocalVariableDeclExpr and
797
797
(
798
- exists ( this .getPatternAtIndex ( n ) .asBindingOrUnnamedPattern ( ) .getTypeAccess ( ) )
798
+ exists ( this .getPattern ( n ) .asBindingOrUnnamedPattern ( ) .getTypeAccess ( ) )
799
799
or
800
800
not this .isAnonymousPattern ( n )
801
801
) and
@@ -805,11 +805,11 @@ private class PpPatternCase extends PpAst, PatternCase {
805
805
(
806
806
if this .isAnonymousPattern ( n )
807
807
then result = "_"
808
- else result = this .getPatternAtIndex ( n ) .asBindingOrUnnamedPattern ( ) .getName ( )
808
+ else result = this .getPattern ( n ) .asBindingOrUnnamedPattern ( ) .getName ( )
809
809
)
810
810
)
811
811
or
812
- exists ( int base | base = ( max ( int n | exists ( this .getPatternAtIndex ( n ) ) ) + 1 ) * 4 |
812
+ exists ( int base | base = ( max ( int n | exists ( this .getPattern ( n ) ) ) + 1 ) * 4 |
813
813
i = base and result = ":" and not this .isRule ( )
814
814
or
815
815
i = base and result = " -> " and this .isRule ( )
@@ -819,14 +819,14 @@ private class PpPatternCase extends PpAst, PatternCase {
819
819
}
820
820
821
821
override PpAst getChild ( int i ) {
822
- exists ( int n , int base | exists ( this .getPatternAtIndex ( n ) ) and base = n * 4 |
822
+ exists ( int n , int base | exists ( this .getPattern ( n ) ) and base = n * 4 |
823
823
i = base + 1 and
824
- result = this .getPatternAtIndex ( n ) .asBindingOrUnnamedPattern ( ) .getTypeAccess ( )
824
+ result = this .getPattern ( n ) .asBindingOrUnnamedPattern ( ) .getTypeAccess ( )
825
825
or
826
- i = base + 1 and result = this .getPatternAtIndex ( n ) .asRecordPattern ( )
826
+ i = base + 1 and result = this .getPattern ( n ) .asRecordPattern ( )
827
827
)
828
828
or
829
- exists ( int base | base = ( max ( int n | exists ( this .getPatternAtIndex ( n ) ) ) + 1 ) * 4 |
829
+ exists ( int base | base = ( max ( int n | exists ( this .getPattern ( n ) ) ) + 1 ) * 4 |
830
830
i = base + 1 and result = this .getRuleExpression ( )
831
831
or
832
832
i = base + 1 and result = this .getRuleStatement ( )
0 commit comments