Make use of getContainer
This commit is contained in:
parent
d90fca396a
commit
dcd81b5847
1 changed files with 3 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ class ActionDeclaration extends File {
|
||||||
}
|
}
|
||||||
|
|
||||||
Expr getAFunctionChildExpr(Function f) {
|
Expr getAFunctionChildExpr(Function f) {
|
||||||
result = f.getBody().getAChildStmt*().getAChildExpr*()
|
result.getContainer() = f
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -44,6 +44,8 @@ Expr getAFunctionChildExpr(Function f) {
|
||||||
*/
|
*/
|
||||||
Function calledBy(Function f) {
|
Function calledBy(Function f) {
|
||||||
result = getAFunctionChildExpr(f).(InvokeExpr).getResolvedCallee()
|
result = getAFunctionChildExpr(f).(InvokeExpr).getResolvedCallee()
|
||||||
|
or
|
||||||
|
result.getEnclosingContainer() = f // assume outer function causes inner function to be called
|
||||||
}
|
}
|
||||||
|
|
||||||
class GetInputMethodCallExpr extends MethodCallExpr {
|
class GetInputMethodCallExpr extends MethodCallExpr {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue