Class: ScopeParameterDeclaration
compiler.ScopeParameterDeclaration
Represents the definition of a parameter inside a function.
Since
0.10.0
Hierarchy
-
↳
ScopeParameterDeclaration
Table of contents
Constructors
Properties
Accessors
Constructors
constructor
• new ScopeParameterDeclaration(node
)
Parameters
Name | Type |
---|---|
node |
ParameterDeclaration |
Overrides
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:23
Properties
_node
• Private
Readonly
_node: ParameterDeclaration
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:21
Accessors
func
• get
func(): LambdaExpression
| FunctionDeclaration
Returns the function this parameter is defined in.
Since
0.10.0
Returns
LambdaExpression
| FunctionDeclaration
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:84
hasValue
• get
hasValue(): boolean
Returns whether the parameter declaration has a value.
This is always true, since a parameter declaration always has a value, even if it is not set or is set to 'undefined'.
Since
0.10.0
Returns
boolean
Overrides
ScopeDeclaration.hasValue
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:106
identifier
• get
identifier(): string
The identifier of this parameter.
Since
0.10.0
Returns
string
Overrides
ScopeDeclaration.identifier
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:60
isCallable
• get
isCallable(): boolean
Returns whether the declaration has a callable value (function).
Since
0.10.0
Returns
boolean
Overrides
ScopeDeclaration.isCallable
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:114
isDefined
• get
isDefined(): boolean
Returns whether the parameter declaration is defined and has a value set during declaration.
This will always be true, since a parameter declaration always has a value, even if it is not set or is set to 'undefined'.
Since
0.10.0
Returns
boolean
Overrides
ScopeDeclaration.isDefined
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:95
node
• get
node(): ParameterDeclaration
Returns the AST node this scope parameter declaration bases on.
Since
0.10.0
Returns
Overrides
ScopeDeclaration.node
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:52
programCtx
• get
programCtx(): KipperProgramContext
Fetches the program context instance for this token.
Returns
Inherited from
ScopeDeclaration.programCtx
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-declaration.ts:25
scope
• get
scope(): LocalScope
Returns the scope associated with this ScopeDeclaration.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:76
semanticData
• Private
get
semanticData(): ParameterDeclarationSemantics
The semantic data of this declaration.
Throws
UndefinedSemanticsError If this is accessed, before semantic analysis was performed.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:34
type
• get
type(): CheckedType
The type of this parameter.
Since
0.10.0
Returns
Overrides
ScopeDeclaration.type
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:68
typeData
• Private
get
typeData(): ParameterDeclarationTypeSemantics
The type data of this declaration.
Throws
UndefinedSemanticsError If this is accessed, before type checking was performed.
Since
0.10.0
Returns
ParameterDeclarationTypeSemantics
Defined in
kipper/core/src/compiler/analysis/symbol-table/entry/scope-parameter-declaration.ts:44