StatementHolder

This interface denotes an AST node that can contain code. This code is stored as statements. This includes Translation units namespaces and classes as some languages, mainly scripting languages allow code placement outside explicit functions.

The reason for not only using a statement property that encapsulates all code in an implicit compound statements is that code can be distributed between functions and an encapsulating compound statement would imply a block of code with a code region containing only the statements.

Inheritors

Functions

Link copied to clipboard
open fun addStatement(s: Statement)

Adds the specified statement to this statement holder. The statements have to be stored as a list of statements as we try to avoid adding new AST-nodes that do not exist, e.g. a code body to hold statements

Link copied to clipboard

Inserts the statement s before the statement specified in before.

Link copied to clipboard
open operator override fun plusAssign(node: Statement)

Adds a Node to the list of "held" nodes.

Properties

Link copied to clipboard

List of statements as property edges.

Link copied to clipboard

Virtual property to access statementEdges without property edges.