ProgramNode

class ProgramNode : Node, List<TopLevelDeclarationNode>

Represents a surface level program which is a sequence of top level declarations.

Instances are usually created by parse.

Constructors

ProgramNode
Link copied to clipboard
fun ProgramNode(declarations: List<TopLevelDeclarationNode>, sourceLocation: SourceLocation)

Functions

contains
Link copied to clipboard
open operator override fun contains(element: TopLevelDeclarationNode): Boolean
containsAll
Link copied to clipboard
open override fun containsAll(elements: Collection<TopLevelDeclarationNode>): Boolean
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in TopLevelDeclarationNode>)
get
Link copied to clipboard
open operator override fun get(index: Int): TopLevelDeclarationNode
indexOf
Link copied to clipboard
open override fun indexOf(element: TopLevelDeclarationNode): Int
isEmpty
Link copied to clipboard
open override fun isEmpty(): Boolean
iterator
Link copied to clipboard
open operator override fun iterator(): Iterator<TopLevelDeclarationNode>
lastIndexOf
Link copied to clipboard
open override fun lastIndexOf(element: TopLevelDeclarationNode): Int
listIterator
Link copied to clipboard
open override fun listIterator(): ListIterator<TopLevelDeclarationNode>
open override fun listIterator(index: Int): ListIterator<TopLevelDeclarationNode>
parallelStream
Link copied to clipboard
open fun parallelStream(): Stream<TopLevelDeclarationNode>
spliterator
Link copied to clipboard
open override fun spliterator(): Spliterator<TopLevelDeclarationNode>
stream
Link copied to clipboard
open fun stream(): Stream<TopLevelDeclarationNode>
subList
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<TopLevelDeclarationNode>
toArray
Link copied to clipboard
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>
toDocument
Link copied to clipboard
override fun toDocument(): Document
toString
Link copied to clipboard
open override fun toString(): String

Properties

comment
Link copied to clipboard
open override val comment: String?
declarations
Link copied to clipboard
val declarations: PersistentList<TopLevelDeclarationNode>
size
Link copied to clipboard
open override val size: Int
sourceLocation
Link copied to clipboard
open override val sourceLocation: SourceLocation

Extensions

elaborated
Link copied to clipboard
fun ProgramNode.elaborated(): ProgramNode

Elaborates this surface program into a program in the intermediate representation.