JS: Drive-by fixes in ComposedFunctions.qll

This commit is contained in:
Asger Feldthaus
2021-06-30 15:07:59 +02:00
parent 7e2871bfdf
commit 780453008a

View File

@@ -6,7 +6,7 @@ import javascript
/**
* A call to a function that constructs a function composition `f(g(h(...)))` from a
* series functions `f, g, h, ...`.
* series of functions `f, g, h, ...`.
*/
class FunctionCompositionCall extends DataFlow::CallNode {
FunctionCompositionCall::Range range;
@@ -35,7 +35,7 @@ class FunctionCompositionCall extends DataFlow::CallNode {
}
/** Gets any of the functions being composed. */
final DataFlow::Node getAnOperandFunction() { result = getOperandFunction(_) }
final DataFlow::FunctionNode getAnOperandFunction() { result = getOperandFunction(_) }
/** Gets the number of functions being composed. */
int getNumOperand() { result = range.getNumOperand() }
@@ -96,7 +96,7 @@ module FunctionCompositionCall {
override DataFlow::Node getOperandNode(int i) { result = getEffectiveArgument(i) }
}
/** A call whose arguments are functions `f,g,h` which are composed into `f(g(h(...))` */
/** A call whose arguments are functions `f,g,h` which are composed into `h(g(f(...))` */
private class LeftToRight extends WithArrayOverloading {
LeftToRight() {
this = DataFlow::moduleImport("just-compose").getACall()