• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • next /
      • 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

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Tangled Expression

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Or Cast Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Lambda Expression

      • Matches Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Interfaces

    • Classes

    • Comments

    • Built-in Functions

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

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

    Edit page

    Class: ExpressionASTNodeFactory

    compiler.ExpressionASTNodeFactory

    Factory class which generates expression class instances using ExpressionASTNodeFactory.create().

    Since

    0.9.0

    Hierarchy

    • ASTNodeFactory<Expression, ParserExpressionContext>

      ↳ ExpressionASTNodeFactory

    Table of contents

    Constructors

    • constructor

    Properties

    • ruleMapping

    Accessors

    • ruleIds
    • ruleIds

    Methods

    • create
    • getRuleIds

    Constructors

    constructor

    • new ExpressionASTNodeFactory()

    Inherited from

    ASTNodeFactory.constructor

    Properties

    ruleMapping

    ▪ Static Readonly ruleMapping: Object = ASTNodeMapper.expressionKindToClassMap

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

    Directly using expressionKindToClassMap.

    Since

    0.11.0

    Type declaration

    Name Type
    1001 typeof MemberAccessExpression
    1002 typeof FunctionCallExpression
    1003 typeof NewInstantiationExpression
    38 typeof LambdaPrimaryExpression
    39 typeof TangledPrimaryExpression
    40 typeof BoolPrimaryExpression
    41 typeof IdentifierPrimaryExpression
    44 typeof StringPrimaryExpression
    45 typeof FStringPrimaryExpression
    48 typeof NumberPrimaryExpression
    49 typeof ArrayPrimaryExpression
    50 typeof ObjectPrimaryExpression
    51 typeof ObjectProperty
    52 typeof VoidOrNullOrUndefinedPrimaryExpression
    59 typeof IncrementOrDecrementPostfixExpression
    60 typeof TypeofExpression
    62 typeof IncrementOrDecrementUnaryExpression
    63 typeof OperatorModifiedUnaryExpression
    67 typeof ConvertExpression
    68 typeof CastExpression
    69 typeof ForceCastExpression
    70 typeof TryCastExpression
    71 typeof MultiplicativeExpression
    72 typeof AdditiveExpression
    73 typeof BitwiseShiftExpression
    75 typeof InstanceOfExpression
    76 typeof MatchesExpression
    77 typeof RelationalExpression
    78 typeof EqualityExpression
    79 typeof BitwiseAndExpression
    80 typeof BitwiseXorExpression
    81 typeof BitwiseOrExpression
    82 typeof LogicalAndExpression
    83 typeof LogicalOrExpression
    84 typeof ConditionalExpression
    85 typeof AssignmentExpression
    89 typeof IdentifierTypeSpecifierExpression
    90 typeof GenericTypeSpecifierExpression
    91 typeof TypeofTypeSpecifierExpression
    92 typeof NullableTypeSpecifierExpression

    Defined in

    kipper/core/src/compiler/ast/factories/expression-ast-factory.ts:23

    Accessors

    ruleIds

    • get ruleIds(): ASTExpressionKind[]

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

    Since

    0.10.0

    Returns

    ASTExpressionKind[]

    Defined in

    kipper/core/src/compiler/ast/factories/expression-ast-factory.ts:37


    ruleIds

    • Static get ruleIds(): ASTExpressionKind[]

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

    Since

    0.10.0

    Returns

    ASTExpressionKind[]

    Defined in

    kipper/core/src/compiler/ast/factories/expression-ast-factory.ts:29

    Methods

    create

    ▸ create(antlrRuleCtx, parent): ConstructableASTExpression

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

    Since

    0.9.0

    Parameters

    Name Type Description
    antlrRuleCtx ParserExpressionContext The context instance that the handler class should be fetched for.
    parent CompilableASTNode<SemanticData, TypeData> The parent of the AST node that is being created.

    Returns

    ConstructableASTExpression

    Overrides

    ASTNodeFactory.create

    Defined in

    kipper/core/src/compiler/ast/factories/expression-ast-factory.ts:47


    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.