CodeQL library for Go
codeql/go-all 2.1.4-dev (changelog, source)
Search

Class PrintAstNode

A node in the output tree.

Import path

import semmle.go.PrintAst

Direct supertypes

Known direct subtypes

Predicates

getAChild

Gets a child of this node.

getChild

Gets the child node at index childIndex. Child indices must be unique, but need not be contiguous.

getChildEdgeLabel

Gets the label for the edge from this node to the specified child. By default, this is just the index of the child, but subclasses can override this.

getEnclosingFunction

Gets the FuncDef that contains this node.

getLocation

Gets the location of this node in the source code.

getProperty

Gets the value of the property of this node, where the name of the property is key.

shouldPrint

Holds if this node should be printed in the output. By default, all nodes within a function are printed, but the query can override PrintAstConfiguration.shouldPrintFunction to filter the output.

toString

Gets a textual representation of this node.