FunctionDeclarationNode

class FunctionDeclarationNode(name: FunctionNameNode, pcLabel: LabelNode?, parameters: Arguments<ParameterNode>, body: BlockNode, sourceLocation: SourceLocation, comment: String?) : TopLevelDeclarationNode

A function declaration associating a name with code.

Parameters

name

A name identifying the function.

pcLabel

Value of the program control label at the beginning of body.

parameters

A list of formal parameters.

body

Code to run when the function is called.

Constructors

FunctionDeclarationNode
Link copied to clipboard
fun FunctionDeclarationNode(name: FunctionNameNode, pcLabel: LabelNode?, parameters: Arguments<ParameterNode>, body: BlockNode, sourceLocation: SourceLocation, comment: String? = null)

Functions

toDocument
Link copied to clipboard
override fun toDocument(): Document

Properties

body
Link copied to clipboard
val body: BlockNode
comment
Link copied to clipboard
open override val comment: String? = null
name
Link copied to clipboard
val name: FunctionNameNode
parameters
Link copied to clipboard
val parameters: Arguments<ParameterNode>
pcLabel
Link copied to clipboard
val pcLabel: LabelNode?
sourceLocation
Link copied to clipboard
open override val sourceLocation: SourceLocation