mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
JS: Drive-by fixes in ComposedFunctions.qll
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user