CodeQL library for Swift
codeql/swift-all 6.8.0 (changelog, source)
Search

Module PrintAstNode

Provides classes used to pretty-print a Swift AST as a graph. This is factored out of PrintAst.qll for testing purposes.

Import path

import codeql.swift.printast.PrintAstNode

Imports

ParentChild

This module provides the generated parent/child relationship.

swift

Top-level import for the Swift language pack

Classes

PrintAstConfiguration

The hook to customize the files and functions printed by this module.

PrintAstNode

A node in the output tree.

PrintFunction

A specialization of graph node for Function, to add typing information.

PrintLocatable

A graph node representing a real Locatable node.

PrintPatternBindingDecl

A specialization of graph node for PatternBindingDecl, to solve ambiguity on getInit. When a property wrapper is involved, getInit may become shared between the explicit binding and the implicit compiler synthesized one.

PrintUnresolved

A specialization of graph node for “unresolved” children, that is nodes in the parallel conversion AST.

PrintVarDecl

A specialization of graph node for VarDecl, to add typing information and deal with ambiguity over property wrapper children.