@@ -68,21 +68,6 @@ private module Impl {
6868 )
6969 }
7070
71- private Element getImmediateChildOfUnresolvedElement (
72- UnresolvedElement e , int index , string partialPredicateCall
73- ) {
74- exists ( int b , int bElement , int n |
75- b = 0 and
76- bElement = b + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfElement ( e , i , _) ) | i ) and
77- n = bElement and
78- (
79- none ( )
80- or
81- result = getImmediateChildOfElement ( e , index - b , partialPredicateCall )
82- )
83- )
84- }
85-
8671 private Element getImmediateChildOfAstNode ( AstNode e , int index , string partialPredicateCall ) {
8772 exists ( int b , int bLocatable , int n |
8873 b = 0 and
@@ -180,6 +165,21 @@ private module Impl {
180165 )
181166 }
182167
168+ private Element getImmediateChildOfUnresolvedElement (
169+ UnresolvedElement e , int index , string partialPredicateCall
170+ ) {
171+ exists ( int b , int bLocatable , int n |
172+ b = 0 and
173+ bLocatable = b + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfLocatable ( e , i , _) ) | i ) and
174+ n = bLocatable and
175+ (
176+ none ( )
177+ or
178+ result = getImmediateChildOfLocatable ( e , index - b , partialPredicateCall )
179+ )
180+ )
181+ }
182+
183183 private Element getImmediateChildOfUnspecifiedElement (
184184 UnspecifiedElement e , int index , string partialPredicateCall
185185 ) {
@@ -1842,18 +1842,21 @@ private module Impl {
18421842 private Element getImmediateChildOfUnresolvedSpecializeExpr (
18431843 UnresolvedSpecializeExpr e , int index , string partialPredicateCall
18441844 ) {
1845- exists ( int b , int bExpr , int bUnresolvedElement , int n |
1845+ exists ( int b , int bExpr , int bUnresolvedElement , int n , int nSubExpr |
18461846 b = 0 and
18471847 bExpr = b + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfExpr ( e , i , _) ) | i ) and
18481848 bUnresolvedElement =
18491849 bExpr + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfUnresolvedElement ( e , i , _) ) | i ) and
18501850 n = bUnresolvedElement and
1851+ nSubExpr = n + 1 and
18511852 (
18521853 none ( )
18531854 or
18541855 result = getImmediateChildOfExpr ( e , index - b , partialPredicateCall )
18551856 or
18561857 result = getImmediateChildOfUnresolvedElement ( e , index - bExpr , partialPredicateCall )
1858+ or
1859+ index = n and result = e .getImmediateSubExpr ( ) and partialPredicateCall = "SubExpr()"
18571860 )
18581861 )
18591862 }
0 commit comments