mirror of
https://github.com/github/codeql.git
synced 2026-01-31 07:12:57 +01:00
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
/**
|
|
* INTERNAL: Do not use outside the data flow library.
|
|
*
|
|
* Contains the raw data type underlying `DataFlow::Node`.
|
|
*/
|
|
|
|
private import javascript
|
|
|
|
/**
|
|
* The raw data type underlying `DataFlow::Node`.
|
|
*/
|
|
cached
|
|
newtype TNode =
|
|
TValueNode(AST::ValueNode nd) or
|
|
TSsaDefNode(SsaDefinition d) or
|
|
TCapturedVariableNode(LocalVariable v) { v.isCaptured() } or
|
|
TPropNode(@property p) or
|
|
TRestPatternNode(DestructuringPattern dp, Expr rest) { rest = dp.getRest() } or
|
|
TElementPatternNode(ArrayPattern ap, Expr p) { p = ap.getElement(_) } or
|
|
TElementNode(ArrayExpr arr, Expr e) { e = arr.getAnElement() } or
|
|
TReflectiveCallNode(MethodCallExpr ce, string kind) {
|
|
ce.getMethodName() = kind and
|
|
(kind = "call" or kind = "apply")
|
|
} or
|
|
TThisNode(StmtContainer f) { f.(Function).getThisBinder() = f or f instanceof TopLevel } or
|
|
TDestructuredModuleImportNode(ImportDeclaration decl) {
|
|
exists(decl.getASpecifier().getImportedName())
|
|
} or
|
|
THtmlAttributeNode(HTML::Attribute attr) or
|
|
TFunctionReturnNode(Function f) or
|
|
TExceptionalFunctionReturnNode(Function f) or
|
|
TExceptionalInvocationReturnNode(InvokeExpr e) or
|
|
TGlobalAccessPathRoot() or
|
|
TTemplatePlaceholderTag(Templating::TemplatePlaceholderTag tag)
|