File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
ruby/ql/lib/codeql/ruby/controlflow Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -751,4 +751,23 @@ module ExprNodes {
751
751
/** Gets a pair of this hash literal. */
752
752
PairCfgNode getAKeyValuePair ( ) { result = this .getAnArgument ( ) }
753
753
}
754
+
755
+ private class CallableExprChildMapping extends ExprChildMapping , Callable {
756
+ // TODO: parameters?, callable body?
757
+ override predicate relevantChild ( AstNode n ) { none ( ) }
758
+ }
759
+
760
+ /** A control-flow node that wraps a `Callable` AST expression. */
761
+ class CallableCfgNode extends ExprCfgNode {
762
+ override CallableExprChildMapping e ;
763
+
764
+ override Callable getExpr ( ) { result = super .getExpr ( ) }
765
+ }
766
+
767
+ /** A control-flow node that wraps a `MethodBase` AST expression. */
768
+ class MethodBaseCfgNode extends CallableCfgNode {
769
+ MethodBaseCfgNode ( ) { super .getExpr ( ) instanceof MethodBase }
770
+
771
+ override MethodBase getExpr ( ) { result = super .getExpr ( ) }
772
+ }
754
773
}
You can’t perform that action at this time.
0 commit comments