• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • 0.11.0 /
      • Kipper API /
      • Module /
      • @kipper/core /
      • compiler
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Comments

    • Built-in Functions

      • 0.11.0 /
      • Kipper API /
      • Module /
      • @kipper/core /
      • compiler
    • 0.11.0 /
    • Kipper API /
    • Module /
    • @kipper/core /
    • compiler

    Edit page

    Class: ScopeFunctionDeclaration

    compiler.ScopeFunctionDeclaration

    Represents the definition of a function inside a Scope.

    Since

    0.1.2

    Hierarchy

    • ScopeDeclaration

      ↳ ScopeFunctionDeclaration

    Table of contents

    Constructors

    • constructor

    Properties

    • _node

    Accessors

    • hasValue
    • identifier
    • isCallable
    • isDefined
    • node
    • params
    • programCtx
    • returnType
    • semanticData
    • type
    • typeData

    Constructors

    constructor

    • new ScopeFunctionDeclaration(node)

    Parameters

    Name Type
    node FunctionDeclaration

    Overrides

    ScopeDeclaration.constructor

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:21

    Properties

    _node

    • Private Readonly _node: FunctionDeclaration

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:19

    Accessors

    hasValue

    • get hasValue(): boolean

    Returns whether the function declaration has a value.

    Since

    0.10.0

    Returns

    boolean

    Overrides

    ScopeDeclaration.hasValue

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:96


    identifier

    • get identifier(): string

    The identifier of this function.

    Returns

    string

    Overrides

    ScopeDeclaration.identifier

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:54


    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-function-declaration.ts:104


    isDefined

    • get isDefined(): boolean

    Returns whether the function declaration is defined and has a function body set during declaration.

    Since

    0.3.0

    Returns

    boolean

    Overrides

    ScopeDeclaration.isDefined

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:88


    node

    • get node(): FunctionDeclaration

    Returns the AST node this scope function declaration bases on.

    Returns

    FunctionDeclaration

    Overrides

    ScopeDeclaration.node

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:47


    params

    • get params(): ParameterDeclaration[]

    The parameters that are accepted inside this function. These are represented using the ParameterDeclaration class.

    The index in the array represents the position inside the function. Meaning the first item in the array maps to the first parameter inside the function.

    Returns

    ParameterDeclaration[]

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:80


    programCtx

    • get programCtx(): KipperProgramContext

    Fetches the program context instance for this token.

    Returns

    KipperProgramContext

    Inherited from

    ScopeDeclaration.programCtx

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-declaration.ts:25


    returnType

    • get returnType(): CheckedType

    The return type of this function. This can be every KipperType except KipperFuncType.

    Returns

    CheckedType

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:69


    semanticData

    • Private get semanticData(): FunctionDeclarationSemantics

    The semantic data of this declaration.

    Throws

    UndefinedSemanticsError If this is accessed, before semantic analysis was performed.

    Returns

    FunctionDeclarationSemantics

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:31


    type

    • get type(): CheckedType

    The type of this function. This is always "func".

    Since

    0.10.0

    Returns

    CheckedType

    Overrides

    ScopeDeclaration.type

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:62


    typeData

    • Private get typeData(): FunctionDeclarationTypeSemantics

    The type data of this declaration.

    Throws

    UndefinedSemanticsError If this is accessed, before type checking was performed.

    Returns

    FunctionDeclarationTypeSemantics

    Defined in

    kipper/core/src/compiler/analysis/symbol-table/entry/scope-function-declaration.ts:40

  • Developed at:

    • Releases
    • GitHub
    • Security
    • Issue Tracker
    • License
  • Copyright © 2021-2026 Luna Klatzer, 2024-2025 Lorenz Holzbauer & Fabian Baitura.
    Kipper is licensed under the GPL-3.0-or-later license.