mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
JavaScript: Introduce DataFlow::ExprNode and exprNode for consistency with other languages.
This commit is contained in:
@@ -980,6 +980,11 @@ module DataFlow {
|
||||
*/
|
||||
ValueNode valueNode(ASTNode nd) { result.getAstNode() = nd }
|
||||
|
||||
/**
|
||||
* Gets the data flow node corresponding to `e`.
|
||||
*/
|
||||
ExprNode exprNode(Expr e) { result = valueNode(e) }
|
||||
|
||||
/** Gets the data flow node corresponding to `ssa`. */
|
||||
SsaDefinitionNode ssaDefinitionNode(SsaDefinition ssa) { result = TSsaDefNode(ssa) }
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
|
||||
import javascript
|
||||
|
||||
/** A data flow node corresponding to an expression. */
|
||||
class ExprNode extends DataFlow::ValueNode {
|
||||
override Expr astNode;
|
||||
}
|
||||
|
||||
/** A data flow node corresponding to a parameter. */
|
||||
class ParameterNode extends DataFlow::SourceNode {
|
||||
Parameter p;
|
||||
|
||||
Reference in New Issue
Block a user