CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.12 (changelog, source)
Search

Module AST

Provides classes for working with the AST-based representation of JavaScript programs.

Import path

import semmle.javascript.AST

Imports

javascript

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

Classes

AstNode

A program element corresponding to JavaScript code, such as an expression or a statement.

CodeInAttribute

A code snippet originating from an HTML attribute value.

EventHandlerCode

A code snippet originating from an event handler attribute.

ExprOrStmt

A program element that is either an expression or a statement.

ExternalScript

A stand-alone file or an external script originating from an HTML <script> element.

Externs

A toplevel syntactic entity containing Closure-style externs definitions.

InlineScript

A script embedded inline in an HTML <script> element.

JavaScriptUrl

A code snippet originating from a URL with the javascript: URL scheme.

Script

A stand-alone file or script originating from an HTML <script> element.

StmtContainer

A program element that contains statements, but isn’t itself a statement, in other words a toplevel or a function.

TopLevel

A toplevel syntactic unit; that is, a stand-alone script, an inline script embedded in an HTML <script> tag, a code snippet assigned to an HTML event handler attribute, or a javascript: URL.

Modules

AST

Provides a class ValueNode encompassing all program elements that evaluate to a value at runtime.