variableDeclaration

Coverity Documentation

Version
latest

Matches variable declarations.

This pattern only matches nodes of type statement.

Properties

variableDeclaration does not expose any new properties.

Inherits properties from:

Example

Matches the declaration of the variable a in the following function:

JavaScript code follows
    function f() {
        var a = 0;
    };

In this instance, the .variable property is the symbol representing a, and the .initializer property is the initializer 0.