• 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: StatementASTNodeFactory

    compiler.StatementASTNodeFactory

    Factory class which generates statement class instances using StatementASTNodeFactory.create().

    Since

    0.9.0

    Hierarchy

    • ASTNodeFactory<Statement, ParserExpressionContext>

      ↳ StatementASTNodeFactory

    Table of contents

    Constructors

    • constructor

    Properties

    • ruleMapping

    Accessors

    • ruleIds
    • ruleIds

    Methods

    • create
    • getRuleIds

    Constructors

    constructor

    • new StatementASTNodeFactory()

    Inherited from

    ASTNodeFactory.constructor

    Properties

    ruleMapping

    ▪ Static Readonly ruleMapping: Object = ASTNodeMapper.statementKindToClassMap

    A mapping of AST node kind ids to their respective statement AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    16 typeof CompoundStatement
    17 typeof ExpressionStatement
    19 typeof IfStatement
    20 typeof SwitchStatement
    23 typeof ForLoopIterationStatement
    24 typeof WhileLoopIterationStatement
    25 typeof DoWhileLoopIterationStatement
    26 typeof JumpStatement
    27 typeof ReturnStatement

    Defined in

    kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:21

    Accessors

    ruleIds

    • get ruleIds(): ASTStatementKind[]

    Returns an array of all AST node kind ids that this factory can process.

    Since

    0.10.0

    Returns

    ASTStatementKind[]

    Defined in

    kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:35


    ruleIds

    • Static get ruleIds(): ASTStatementKind[]

    Returns an array of all AST node kind ids that this factory can process.

    Since

    0.10.0

    Returns

    ASTStatementKind[]

    Defined in

    kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:27

    Methods

    create

    ▸ create(antlrRuleCtx, parent): ConstructableASTStatement

    Fetches the AST node class and creates a new instance based on the antlrRuleCtx.

    Since

    0.9.0

    Parameters

    Name Type Description
    antlrRuleCtx ParserStatementContext The context instance that the handler class should be fetched for.
    parent CompilableNodeParent The parent of the AST node that is being created.

    Returns

    ConstructableASTStatement

    Overrides

    ASTNodeFactory.create

    Defined in

    kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:45


    getRuleIds

    ▸ Static Protected getRuleIds(ruleMapping): ConstructableASTKind[]

    Returns an array of all AST node kind ids that this factory can process.

    Since

    0.10.0

    Parameters

    Name Type
    ruleMapping Record<number, ConstructableASTNodeClass>

    Returns

    ConstructableASTKind[]

    Inherited from

    ASTNodeFactory.getRuleIds

    Defined in

    kipper/core/src/compiler/ast/factories/ast-node-factory.ts:22

  • 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.