Module DefUse

Provides classes and predicates for working with variable definitions and uses.

Import path

semmle.javascript.DefUse

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

definitionReaches

Holds if the definition of v in def reaches use along some control flow path without crossing another definition of v.

localDefinitionOverwrites

Holds if the later definition of v could overwrite its earlier definition.

localDefinitionReaches

Holds if the definition of local variable v in def reaches use along some control flow path without crossing another definition of v.

Classes

LValue

A variable reference or property access that is written to.

RValue

A variable reference or property access that is read from.

RefExpr

An expression that can be evaluated to a reference, that is, a variable reference or a property access.

VarDef

A ControlFlowNode that defines (that is, initializes or updates) variables or properties.

VarUse

A ControlFlowNode that uses (that is, reads from) a single variable.