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

Class YamlNode

A node in the AST representation of a YAML file, which may either be a YAML value (such as a scalar or a collection) or an alias node referring to some other YAML value.

Examples:

# a mapping
x: 1
<< : *DEFAULTS  # an alias node referring to anchor `DEFAULTS`

Import path

import javascript

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

eval

Gets the YAML value this node corresponds to after resolving aliases and includes.

getAChild

Gets a child of this node, as a YAML value.

getAChildNode

Gets a child node of this node.

getAPrimaryQlClass

Gets the primary QL class for the Locatable.

getAnchor

Gets the anchor associated with this node, if any.

getChild

Gets the ith child of this node, as a YAML value.

getChildNode

Gets the ith child node of this node.

getDocument

Gets the toplevel document to which this node belongs.

getLocation

Gets this element’s location.

getNumChild

Gets the number of child nodes of this node.

getParentNode

Gets the parent node of this node, which is always a collection.

getTag

Gets the tag of this node.

hasStandardTypeTag

Holds if this node is tagged with a standard type tag of the form tag:yaml.org,2002:<t>.

toString

Gets a textual representation of this element.

Inherited predicates

getEndLine

Gets the line on which this element ends.

from Locatable
getFile

Gets the file this program element comes from.

from Locatable
getNumLines

Gets the number of lines covered by this element.

from Locatable
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from Locatable
getStartLine

Gets the line on which this element starts.

from Locatable