JavaScript: Add predicate DataFlow::Node.getTopLevel().

This commit is contained in:
Max Schaefer
2018-07-19 12:23:38 +02:00
parent 3e56e9eaf9
commit 7e7899faba

View File

@@ -88,6 +88,9 @@ module DataFlow {
/** Gets the container in which this node occurs. */
StmtContainer getContainer() { result = getBasicBlock().getContainer() }
/** Gets the toplevel in which this node occurs. */
TopLevel getTopLevel() { result = getContainer().getTopLevel() }
/**
* Holds if this data flow node accesses the global variable `g`, either directly
* or through the `window` object.