• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

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

      • Type Consistency

      • Runtime Type Casting

      • Strict Compiler Inspection

      • Integrated Runtime Library

    • 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

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

    Edit page

    Class: ASTNodeMapper

    compiler.ASTNodeMapper

    Mapper class which maps kind ids or rule names to their corresponding AST classes.

    This is used to simplify the process of determining the relationships between parser, AST and code generators.

    Since

    0.11.0

    Table of contents

    Constructors

    • constructor

    Properties

    • declarationKindToClassMap
    • declarationKindToRuleContextMap
    • declarationRuleNameToClassMap
    • expressionKindToClassMap
    • expressionKindToRuleContextMap
    • expressionRuleNameToClassMap
    • statementKindToClassMap
    • statementKindToRuleContextMap
    • statementRuleNameToClassMap

    Methods

    • mapDeclarationKindToClass
    • mapDeclarationKindToRuleContext
    • mapDeclarationRuleNameToClass
    • mapExpressionKindToClass
    • mapExpressionKindToRuleContext
    • mapExpressionRuleNameToClass
    • mapStatementKindToClass
    • mapStatementKindToRuleContext
    • mapStatementRuleNameToClass

    Constructors

    constructor

    • new ASTNodeMapper()

    Properties

    declarationKindToClassMap

    ▪ Static Readonly declarationKindToClassMap: Object

    A mapping matching all declaration kinds to their respective constructable AST node classes.

    Since

    0.10.0

    Type declaration

    Name Type
    12 typeof FunctionDeclaration
    14 typeof ParameterDeclaration
    15 typeof InterfaceDeclaration
    17 typeof InterfacePropertyDeclaration
    18 typeof InterfaceMethodDeclaration
    19 typeof ClassDeclaration
    21 typeof ClassPropertyDeclaration
    22 typeof ClassMethodDeclaration
    23 typeof ClassConstructorDeclaration
    6 typeof VariableDeclaration

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:145


    declarationKindToRuleContextMap

    ▪ Static Readonly declarationKindToRuleContextMap: Object

    A mapping matching all declaration kinds to their respective constructable AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    12 typeof FunctionDeclarationContext
    14 typeof ParameterDeclarationContext
    15 typeof InterfaceDeclarationContext
    17 typeof InterfacePropertyDeclarationContext
    18 typeof InterfaceMethodDeclarationContext
    19 typeof ClassDeclarationContext
    21 typeof ClassPropertyDeclarationContext
    22 typeof ClassMethodDeclarationContext
    23 typeof ClassConstructorDeclarationContext
    6 typeof VariableDeclarationContext

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:224


    declarationRuleNameToClassMap

    ▪ Static Readonly declarationRuleNameToClassMap: Object

    A mapping matching all declaration rule names to their respective constructable AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    RULE_classConstructorDeclaration typeof ClassConstructorDeclaration
    RULE_classDeclaration typeof ClassDeclaration
    RULE_classMethodDeclaration typeof ClassMethodDeclaration
    RULE_classPropertyDeclaration typeof ClassPropertyDeclaration
    RULE_functionDeclaration typeof FunctionDeclaration
    RULE_interfaceDeclaration typeof InterfaceDeclaration
    RULE_interfaceMethodDeclaration typeof InterfaceMethodDeclaration
    RULE_interfacePropertyDeclaration typeof InterfacePropertyDeclaration
    RULE_parameterDeclaration typeof ParameterDeclaration
    RULE_variableDeclaration typeof VariableDeclaration

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:308


    expressionKindToClassMap

    ▪ Static Readonly expressionKindToClassMap: Object

    A mapping matching all expression kinds to their respective constructable AST node classes.

    Since

    0.10.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
    66 typeof CastOrConvertExpression
    67 typeof MultiplicativeExpression
    68 typeof AdditiveExpression
    69 typeof BitwiseShiftExpression
    71 typeof InstanceOfExpression
    72 typeof MatchesExpression
    73 typeof RelationalExpression
    74 typeof EqualityExpression
    75 typeof BitwiseAndExpression
    76 typeof BitwiseXorExpression
    77 typeof BitwiseOrExpression
    78 typeof LogicalAndExpression
    79 typeof LogicalOrExpression
    80 typeof ConditionalExpression
    81 typeof AssignmentExpression
    85 typeof IdentifierTypeSpecifierExpression
    86 typeof GenericTypeSpecifierExpression
    87 typeof TypeofTypeSpecifierExpression

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:163


    expressionKindToRuleContextMap

    ▪ Static Readonly expressionKindToRuleContextMap: Object

    A mapping matching all expression kinds to their respective constructable AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    1001 (typeof DotNotationMemberAccessExpressionContext | typeof BracketNotationMemberAccessExpressionContext | typeof SliceNotationMemberAccessExpressionContext)[]
    1002 typeof FunctionCallExpressionContext
    1003 typeof NewInstantiationExpressionContext
    38 typeof LambdaPrimaryExpressionContext
    39 typeof TangledPrimaryExpressionContext
    40 typeof BoolPrimaryExpressionContext
    41 typeof IdentifierPrimaryExpressionContext
    44 typeof StringPrimaryExpressionContext
    45 typeof FStringPrimaryExpressionContext
    48 typeof NumberPrimaryExpressionContext
    49 typeof ArrayPrimaryExpressionContext
    50 typeof ObjectPrimaryExpressionContext
    51 typeof ObjectPropertyContext
    52 typeof VoidOrNullOrUndefinedPrimaryExpressionContext
    59 typeof IncrementOrDecrementPostfixExpressionContext
    60 typeof TypeofExpressionContext
    62 typeof IncrementOrDecrementUnaryExpressionContext
    63 typeof OperatorModifiedUnaryExpressionContext
    66 typeof CastOrConvertExpressionContext
    67 typeof MultiplicativeExpressionContext
    68 typeof AdditiveExpressionContext
    69 typeof BitwiseShiftExpressionContext
    71 typeof InstanceOfExpressionContext
    72 typeof MatchesExpression
    73 typeof RelationalExpressionContext
    74 typeof EqualityExpressionContext
    75 typeof BitwiseAndExpressionContext
    76 typeof BitwiseXorExpressionContext
    77 typeof BitwiseOrExpressionContext
    78 typeof LogicalAndExpressionContext
    79 typeof LogicalOrExpressionContext
    80 typeof ConditionalExpressionContext
    81 typeof AssignmentExpressionContext
    85 typeof IdentifierTypeSpecifierExpressionContext
    86 typeof GenericTypeSpecifierExpressionContext
    87 typeof TypeofTypeSpecifierExpressionContext

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:242


    expressionRuleNameToClassMap

    ▪ Static Readonly expressionRuleNameToClassMap: Object

    A mapping matching all expression rule names to their respective constructable AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    RULE_additiveExpression typeof AdditiveExpression
    RULE_arrayPrimaryExpression typeof ArrayPrimaryExpression
    RULE_assignmentExpression typeof AssignmentExpression
    RULE_bitwiseAndExpression typeof BitwiseAndExpression
    RULE_bitwiseOrExpression typeof BitwiseOrExpression
    RULE_bitwiseShiftExpression typeof BitwiseShiftExpression
    RULE_bitwiseXorExpression typeof BitwiseXorExpression
    RULE_boolPrimaryExpression typeof BoolPrimaryExpression
    RULE_castOrConvertExpression typeof CastOrConvertExpression
    RULE_conditionalExpression typeof ConditionalExpression
    RULE_equalityExpression typeof EqualityExpression
    RULE_fStringPrimaryExpression typeof FStringPrimaryExpression
    RULE_functionCallExpression typeof FunctionCallExpression
    RULE_genericTypeSpecifierExpression typeof GenericTypeSpecifierExpression
    RULE_identifierPrimaryExpression typeof IdentifierPrimaryExpression
    RULE_identifierTypeSpecifierExpression typeof IdentifierTypeSpecifierExpression
    RULE_incrementOrDecrementPostfixExpression typeof IncrementOrDecrementPostfixExpression
    RULE_incrementOrDecrementUnaryExpression typeof IncrementOrDecrementUnaryExpression
    RULE_instanceofExpression typeof InstanceOfExpression
    RULE_lambdaPrimaryExpression typeof LambdaPrimaryExpression
    RULE_logicalAndExpression typeof LogicalAndExpression
    RULE_logicalOrExpression typeof LogicalOrExpression
    RULE_matchesExpression typeof MatchesExpression
    RULE_memberAccessExpression typeof MemberAccessExpression
    RULE_multiplicativeExpression typeof MultiplicativeExpression
    RULE_newInstantiationExpression typeof NewInstantiationExpression
    RULE_numberPrimaryExpression typeof NumberPrimaryExpression
    RULE_objectPrimaryExpression typeof ObjectPrimaryExpression
    RULE_objectProperty typeof ObjectProperty
    RULE_operatorModifiedUnaryExpression typeof OperatorModifiedUnaryExpression
    RULE_relationalExpression typeof RelationalExpression
    RULE_stringPrimaryExpression typeof StringPrimaryExpression
    RULE_tangledPrimaryExpression typeof TangledPrimaryExpression
    RULE_typeofExpression typeof TypeofExpression
    RULE_typeofTypeSpecifierExpression typeof TypeofTypeSpecifierExpression
    RULE_voidOrNullOrUndefinedPrimaryExpression typeof VoidOrNullOrUndefinedPrimaryExpression

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:326


    statementKindToClassMap

    ▪ Static Readonly statementKindToClassMap: Object

    A mapping matching all statement kinds to their respective constructable AST node classes.

    Since

    0.10.0

    Type declaration

    Name Type
    25 typeof CompoundStatement
    26 typeof ExpressionStatement
    28 typeof IfStatement
    29 typeof SwitchStatement
    32 typeof ForLoopIterationStatement
    33 typeof WhileLoopIterationStatement
    34 typeof DoWhileLoopIterationStatement
    35 typeof JumpStatement
    36 typeof ReturnStatement

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:207


    statementKindToRuleContextMap

    ▪ Static Readonly statementKindToRuleContextMap: Object

    A mapping matching all statement kinds to their respective constructable AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    25 typeof CompoundStatementContext
    26 typeof ExpressionStatementContext
    28 typeof IfStatementContext
    29 typeof SwitchStatementContext
    32 typeof ForLoopIterationStatementContext
    33 typeof WhileLoopIterationStatementContext
    34 typeof DoWhileLoopIterationStatementContext
    35 typeof JumpStatementContext
    36 typeof ReturnStatementContext

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:291


    statementRuleNameToClassMap

    ▪ Static Readonly statementRuleNameToClassMap: Object

    A mapping matching all statement rule names to their respective constructable AST node classes.

    Since

    0.11.0

    Type declaration

    Name Type
    RULE_compoundStatement typeof CompoundStatement
    RULE_doWhileLoopIterationStatement typeof DoWhileLoopIterationStatement
    RULE_expressionStatement typeof ExpressionStatement
    RULE_forLoopIterationStatement typeof ForLoopIterationStatement
    RULE_ifStatement typeof IfStatement
    RULE_jumpStatement typeof JumpStatement
    RULE_returnStatement typeof ReturnStatement
    RULE_switchStatement typeof SwitchStatement
    RULE_whileLoopIterationStatement typeof WhileLoopIterationStatement

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:370

    Methods

    mapDeclarationKindToClass

    ▸ Static mapDeclarationKindToClass<T>(kind): { 12: typeof FunctionDeclaration = FunctionDeclaration; 14: typeof ParameterDeclaration = ParameterDeclaration; 15: typeof InterfaceDeclaration = InterfaceDeclaration; 17: typeof InterfacePropertyDeclaration = InterfacePropertyDeclaration; 18: typeof InterfaceMethodDeclaration = InterfaceMethodDeclaration; 19: typeof ClassDeclaration = ClassDeclaration; 21: typeof ClassPropertyDeclaration = ClassPropertyDeclaration; 22: typeof ClassMethodDeclaration = ClassMethodDeclaration; 23: typeof ClassConstructorDeclaration = ClassConstructorDeclaration; 6: typeof VariableDeclaration = VariableDeclaration }[T]

    A mapping function matching all declaration kinds to their respective constructable Declaration AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTDeclarationKind

    Parameters

    Name Type Description
    kind T The declaration kind to map to a class.

    Returns

    { 12: typeof FunctionDeclaration = FunctionDeclaration; 14: typeof ParameterDeclaration = ParameterDeclaration; 15: typeof InterfaceDeclaration = InterfaceDeclaration; 17: typeof InterfacePropertyDeclaration = InterfacePropertyDeclaration; 18: typeof InterfaceMethodDeclaration = InterfaceMethodDeclaration; 19: typeof ClassDeclaration = ClassDeclaration; 21: typeof ClassPropertyDeclaration = ClassPropertyDeclaration; 22: typeof ClassMethodDeclaration = ClassMethodDeclaration; 23: typeof ClassConstructorDeclaration = ClassConstructorDeclaration; 6: typeof VariableDeclaration = VariableDeclaration }[T]

    The class matching the given declaration kind.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:389


    mapDeclarationKindToRuleContext

    ▸ Static mapDeclarationKindToRuleContext<T>(kind): { 12: typeof FunctionDeclarationContext = FunctionDeclarationContext; 14: typeof ParameterDeclarationContext = ParameterDeclarationContext; 15: typeof InterfaceDeclarationContext = InterfaceDeclarationContext; 17: typeof InterfacePropertyDeclarationContext = InterfacePropertyDeclarationContext; 18: typeof InterfaceMethodDeclarationContext = InterfaceMethodDeclarationContext; 19: typeof ClassDeclarationContext = ClassDeclarationContext; 21: typeof ClassPropertyDeclarationContext = ClassPropertyDeclarationContext; 22: typeof ClassMethodDeclarationContext = ClassMethodDeclarationContext; 23: typeof ClassConstructorDeclarationContext = ClassConstructorDeclarationContext; 6: typeof VariableDeclarationContext = VariableDeclarationContext }[T]

    A mapping function matching all expression rule names to their respective constructable Declaration AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTDeclarationKind

    Parameters

    Name Type Description
    kind T The declaration rule name to map to a class.

    Returns

    { 12: typeof FunctionDeclarationContext = FunctionDeclarationContext; 14: typeof ParameterDeclarationContext = ParameterDeclarationContext; 15: typeof InterfaceDeclarationContext = InterfaceDeclarationContext; 17: typeof InterfacePropertyDeclarationContext = InterfacePropertyDeclarationContext; 18: typeof InterfaceMethodDeclarationContext = InterfaceMethodDeclarationContext; 19: typeof ClassDeclarationContext = ClassDeclarationContext; 21: typeof ClassPropertyDeclarationContext = ClassPropertyDeclarationContext; 22: typeof ClassMethodDeclarationContext = ClassMethodDeclarationContext; 23: typeof ClassConstructorDeclarationContext = ClassConstructorDeclarationContext; 6: typeof VariableDeclarationContext = VariableDeclarationContext }[T]

    The class matching the given declaration rule name.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:429


    mapDeclarationRuleNameToClass

    ▸ Static mapDeclarationRuleNameToClass<T>(name): { RULE_classConstructorDeclaration: typeof ClassConstructorDeclaration = ClassConstructorDeclaration; RULE_classDeclaration: typeof ClassDeclaration = ClassDeclaration; RULE_classMethodDeclaration: typeof ClassMethodDeclaration = ClassMethodDeclaration; RULE_classPropertyDeclaration: typeof ClassPropertyDeclaration = ClassPropertyDeclaration; RULE_functionDeclaration: typeof FunctionDeclaration = FunctionDeclaration; RULE_interfaceDeclaration: typeof InterfaceDeclaration = InterfaceDeclaration; RULE_interfaceMethodDeclaration: typeof InterfaceMethodDeclaration = InterfaceMethodDeclaration; RULE_interfacePropertyDeclaration: typeof InterfacePropertyDeclaration = InterfacePropertyDeclaration; RULE_parameterDeclaration: typeof ParameterDeclaration = ParameterDeclaration; RULE_variableDeclaration: typeof VariableDeclaration = VariableDeclaration }[T]

    A mapping function matching all declaration rule names to their respective constructable Declaration AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTDeclarationRuleName

    Parameters

    Name Type Description
    name T The declaration rule name to map to a class.

    Returns

    { RULE_classConstructorDeclaration: typeof ClassConstructorDeclaration = ClassConstructorDeclaration; RULE_classDeclaration: typeof ClassDeclaration = ClassDeclaration; RULE_classMethodDeclaration: typeof ClassMethodDeclaration = ClassMethodDeclaration; RULE_classPropertyDeclaration: typeof ClassPropertyDeclaration = ClassPropertyDeclaration; RULE_functionDeclaration: typeof FunctionDeclaration = FunctionDeclaration; RULE_interfaceDeclaration: typeof InterfaceDeclaration = InterfaceDeclaration; RULE_interfaceMethodDeclaration: typeof InterfaceMethodDeclaration = InterfaceMethodDeclaration; RULE_interfacePropertyDeclaration: typeof InterfacePropertyDeclaration = InterfacePropertyDeclaration; RULE_parameterDeclaration: typeof ParameterDeclaration = ParameterDeclaration; RULE_variableDeclaration: typeof VariableDeclaration = VariableDeclaration }[T]

    The class matching the given declaration rule name.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:468


    mapExpressionKindToClass

    ▸ Static mapExpressionKindToClass<T>(kind): { 1001: typeof MemberAccessExpression = MemberAccessExpression; 1002: typeof FunctionCallExpression = FunctionCallExpression; 1003: typeof NewInstantiationExpression = NewInstantiationExpression; 38: typeof LambdaPrimaryExpression = LambdaPrimaryExpression; 39: typeof TangledPrimaryExpression = TangledPrimaryExpression; 40: typeof BoolPrimaryExpression = BoolPrimaryExpression; 41: typeof IdentifierPrimaryExpression = IdentifierPrimaryExpression; 44: typeof StringPrimaryExpression = StringPrimaryExpression; 45: typeof FStringPrimaryExpression = FStringPrimaryExpression; 48: typeof NumberPrimaryExpression = NumberPrimaryExpression; 49: typeof ArrayPrimaryExpression = ArrayPrimaryExpression; 50: typeof ObjectPrimaryExpression = ObjectPrimaryExpression; 51: typeof ObjectProperty = ObjectProperty; 52: typeof VoidOrNullOrUndefinedPrimaryExpression = VoidOrNullOrUndefinedPrimaryExpression; 59: typeof IncrementOrDecrementPostfixExpression = IncrementOrDecrementPostfixExpression; 60: typeof TypeofExpression = TypeofExpression; 62: typeof IncrementOrDecrementUnaryExpression = IncrementOrDecrementUnaryExpression; 63: typeof OperatorModifiedUnaryExpression = OperatorModifiedUnaryExpression; 66: typeof CastOrConvertExpression = CastOrConvertExpression; 67: typeof MultiplicativeExpression = MultiplicativeExpression; 68: typeof AdditiveExpression = AdditiveExpression; 69: typeof BitwiseShiftExpression = BitwiseShiftExpression; 71: typeof InstanceOfExpression = InstanceOfExpression; 72: typeof MatchesExpression = MatchesExpression; 73: typeof RelationalExpression = RelationalExpression; 74: typeof EqualityExpression = EqualityExpression; 75: typeof BitwiseAndExpression = BitwiseAndExpression; 76: typeof BitwiseXorExpression = BitwiseXorExpression; 77: typeof BitwiseOrExpression = BitwiseOrExpression; 78: typeof LogicalAndExpression = LogicalAndExpression; 79: typeof LogicalOrExpression = LogicalOrExpression; 80: typeof ConditionalExpression = ConditionalExpression; 81: typeof AssignmentExpression = AssignmentExpression; 85: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; 86: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; 87: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression }[T]

    A mapping function matching all expression kinds to their respective constructable Expression AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTExpressionKind

    Parameters

    Name Type Description
    kind T The expression kind to map to a class.

    Returns

    { 1001: typeof MemberAccessExpression = MemberAccessExpression; 1002: typeof FunctionCallExpression = FunctionCallExpression; 1003: typeof NewInstantiationExpression = NewInstantiationExpression; 38: typeof LambdaPrimaryExpression = LambdaPrimaryExpression; 39: typeof TangledPrimaryExpression = TangledPrimaryExpression; 40: typeof BoolPrimaryExpression = BoolPrimaryExpression; 41: typeof IdentifierPrimaryExpression = IdentifierPrimaryExpression; 44: typeof StringPrimaryExpression = StringPrimaryExpression; 45: typeof FStringPrimaryExpression = FStringPrimaryExpression; 48: typeof NumberPrimaryExpression = NumberPrimaryExpression; 49: typeof ArrayPrimaryExpression = ArrayPrimaryExpression; 50: typeof ObjectPrimaryExpression = ObjectPrimaryExpression; 51: typeof ObjectProperty = ObjectProperty; 52: typeof VoidOrNullOrUndefinedPrimaryExpression = VoidOrNullOrUndefinedPrimaryExpression; 59: typeof IncrementOrDecrementPostfixExpression = IncrementOrDecrementPostfixExpression; 60: typeof TypeofExpression = TypeofExpression; 62: typeof IncrementOrDecrementUnaryExpression = IncrementOrDecrementUnaryExpression; 63: typeof OperatorModifiedUnaryExpression = OperatorModifiedUnaryExpression; 66: typeof CastOrConvertExpression = CastOrConvertExpression; 67: typeof MultiplicativeExpression = MultiplicativeExpression; 68: typeof AdditiveExpression = AdditiveExpression; 69: typeof BitwiseShiftExpression = BitwiseShiftExpression; 71: typeof InstanceOfExpression = InstanceOfExpression; 72: typeof MatchesExpression = MatchesExpression; 73: typeof RelationalExpression = RelationalExpression; 74: typeof EqualityExpression = EqualityExpression; 75: typeof BitwiseAndExpression = BitwiseAndExpression; 76: typeof BitwiseXorExpression = BitwiseXorExpression; 77: typeof BitwiseOrExpression = BitwiseOrExpression; 78: typeof LogicalAndExpression = LogicalAndExpression; 79: typeof LogicalOrExpression = LogicalOrExpression; 80: typeof ConditionalExpression = ConditionalExpression; 81: typeof AssignmentExpression = AssignmentExpression; 85: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; 86: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; 87: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression }[T]

    The class matching the given expression kind.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:402


    mapExpressionKindToRuleContext

    ▸ Static mapExpressionKindToRuleContext<T>(kind): { 1001: (typeof DotNotationMemberAccessExpressionContext | typeof BracketNotationMemberAccessExpressionContext | typeof SliceNotationMemberAccessExpressionContext)[] ; 1002: typeof FunctionCallExpressionContext = FunctionCallExpressionContext; 1003: typeof NewInstantiationExpressionContext = NewInstantiationExpressionContext; 38: typeof LambdaPrimaryExpressionContext = LambdaPrimaryExpressionContext; 39: typeof TangledPrimaryExpressionContext = TangledPrimaryExpressionContext; 40: typeof BoolPrimaryExpressionContext = BoolPrimaryExpressionContext; 41: typeof IdentifierPrimaryExpressionContext = IdentifierPrimaryExpressionContext; 44: typeof StringPrimaryExpressionContext = StringPrimaryExpressionContext; 45: typeof FStringPrimaryExpressionContext = FStringPrimaryExpressionContext; 48: typeof NumberPrimaryExpressionContext = NumberPrimaryExpressionContext; 49: typeof ArrayPrimaryExpressionContext = ArrayPrimaryExpressionContext; 50: typeof ObjectPrimaryExpressionContext = ObjectPrimaryExpressionContext; 51: typeof ObjectPropertyContext = ObjectPropertyContext; 52: typeof VoidOrNullOrUndefinedPrimaryExpressionContext = VoidOrNullOrUndefinedPrimaryExpressionContext; 59: typeof IncrementOrDecrementPostfixExpressionContext = IncrementOrDecrementPostfixExpressionContext; 60: typeof TypeofExpressionContext = TypeofExpressionContext; 62: typeof IncrementOrDecrementUnaryExpressionContext = IncrementOrDecrementUnaryExpressionContext; 63: typeof OperatorModifiedUnaryExpressionContext = OperatorModifiedUnaryExpressionContext; 66: typeof CastOrConvertExpressionContext = CastOrConvertExpressionContext; 67: typeof MultiplicativeExpressionContext = MultiplicativeExpressionContext; 68: typeof AdditiveExpressionContext = AdditiveExpressionContext; 69: typeof BitwiseShiftExpressionContext = BitwiseShiftExpressionContext; 71: typeof InstanceOfExpressionContext = InstanceOfExpressionContext; 72: typeof MatchesExpression = MatchesExpression; 73: typeof RelationalExpressionContext = RelationalExpressionContext; 74: typeof EqualityExpressionContext = EqualityExpressionContext; 75: typeof BitwiseAndExpressionContext = BitwiseAndExpressionContext; 76: typeof BitwiseXorExpressionContext = BitwiseXorExpressionContext; 77: typeof BitwiseOrExpressionContext = BitwiseOrExpressionContext; 78: typeof LogicalAndExpressionContext = LogicalAndExpressionContext; 79: typeof LogicalOrExpressionContext = LogicalOrExpressionContext; 80: typeof ConditionalExpressionContext = ConditionalExpressionContext; 81: typeof AssignmentExpressionContext = AssignmentExpressionContext; 85: typeof IdentifierTypeSpecifierExpressionContext = IdentifierTypeSpecifierExpressionContext; 86: typeof GenericTypeSpecifierExpressionContext = GenericTypeSpecifierExpressionContext; 87: typeof TypeofTypeSpecifierExpressionContext = TypeofTypeSpecifierExpressionContext }[T]

    A mapping function matching all expression rule names to their respective constructable Expression AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTExpressionKind

    Parameters

    Name Type Description
    kind T The expression rule name to map to a class.

    Returns

    { 1001: (typeof DotNotationMemberAccessExpressionContext | typeof BracketNotationMemberAccessExpressionContext | typeof SliceNotationMemberAccessExpressionContext)[] ; 1002: typeof FunctionCallExpressionContext = FunctionCallExpressionContext; 1003: typeof NewInstantiationExpressionContext = NewInstantiationExpressionContext; 38: typeof LambdaPrimaryExpressionContext = LambdaPrimaryExpressionContext; 39: typeof TangledPrimaryExpressionContext = TangledPrimaryExpressionContext; 40: typeof BoolPrimaryExpressionContext = BoolPrimaryExpressionContext; 41: typeof IdentifierPrimaryExpressionContext = IdentifierPrimaryExpressionContext; 44: typeof StringPrimaryExpressionContext = StringPrimaryExpressionContext; 45: typeof FStringPrimaryExpressionContext = FStringPrimaryExpressionContext; 48: typeof NumberPrimaryExpressionContext = NumberPrimaryExpressionContext; 49: typeof ArrayPrimaryExpressionContext = ArrayPrimaryExpressionContext; 50: typeof ObjectPrimaryExpressionContext = ObjectPrimaryExpressionContext; 51: typeof ObjectPropertyContext = ObjectPropertyContext; 52: typeof VoidOrNullOrUndefinedPrimaryExpressionContext = VoidOrNullOrUndefinedPrimaryExpressionContext; 59: typeof IncrementOrDecrementPostfixExpressionContext = IncrementOrDecrementPostfixExpressionContext; 60: typeof TypeofExpressionContext = TypeofExpressionContext; 62: typeof IncrementOrDecrementUnaryExpressionContext = IncrementOrDecrementUnaryExpressionContext; 63: typeof OperatorModifiedUnaryExpressionContext = OperatorModifiedUnaryExpressionContext; 66: typeof CastOrConvertExpressionContext = CastOrConvertExpressionContext; 67: typeof MultiplicativeExpressionContext = MultiplicativeExpressionContext; 68: typeof AdditiveExpressionContext = AdditiveExpressionContext; 69: typeof BitwiseShiftExpressionContext = BitwiseShiftExpressionContext; 71: typeof InstanceOfExpressionContext = InstanceOfExpressionContext; 72: typeof MatchesExpression = MatchesExpression; 73: typeof RelationalExpressionContext = RelationalExpressionContext; 74: typeof EqualityExpressionContext = EqualityExpressionContext; 75: typeof BitwiseAndExpressionContext = BitwiseAndExpressionContext; 76: typeof BitwiseXorExpressionContext = BitwiseXorExpressionContext; 77: typeof BitwiseOrExpressionContext = BitwiseOrExpressionContext; 78: typeof LogicalAndExpressionContext = LogicalAndExpressionContext; 79: typeof LogicalOrExpressionContext = LogicalOrExpressionContext; 80: typeof ConditionalExpressionContext = ConditionalExpressionContext; 81: typeof AssignmentExpressionContext = AssignmentExpressionContext; 85: typeof IdentifierTypeSpecifierExpressionContext = IdentifierTypeSpecifierExpressionContext; 86: typeof GenericTypeSpecifierExpressionContext = GenericTypeSpecifierExpressionContext; 87: typeof TypeofTypeSpecifierExpressionContext = TypeofTypeSpecifierExpressionContext }[T]

    The class matching the given expression rule name.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:442


    mapExpressionRuleNameToClass

    ▸ Static mapExpressionRuleNameToClass<T>(name): { RULE_additiveExpression: typeof AdditiveExpression = AdditiveExpression; RULE_arrayPrimaryExpression: typeof ArrayPrimaryExpression = ArrayPrimaryExpression; RULE_assignmentExpression: typeof AssignmentExpression = AssignmentExpression; RULE_bitwiseAndExpression: typeof BitwiseAndExpression = BitwiseAndExpression; RULE_bitwiseOrExpression: typeof BitwiseOrExpression = BitwiseOrExpression; RULE_bitwiseShiftExpression: typeof BitwiseShiftExpression = BitwiseShiftExpression; RULE_bitwiseXorExpression: typeof BitwiseXorExpression = BitwiseXorExpression; RULE_boolPrimaryExpression: typeof BoolPrimaryExpression = BoolPrimaryExpression; RULE_castOrConvertExpression: typeof CastOrConvertExpression = CastOrConvertExpression; RULE_conditionalExpression: typeof ConditionalExpression = ConditionalExpression; RULE_equalityExpression: typeof EqualityExpression = EqualityExpression; RULE_fStringPrimaryExpression: typeof FStringPrimaryExpression = FStringPrimaryExpression; RULE_functionCallExpression: typeof FunctionCallExpression = FunctionCallExpression; RULE_genericTypeSpecifierExpression: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; RULE_identifierPrimaryExpression: typeof IdentifierPrimaryExpression = IdentifierPrimaryExpression; RULE_identifierTypeSpecifierExpression: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; RULE_incrementOrDecrementPostfixExpression: typeof IncrementOrDecrementPostfixExpression = IncrementOrDecrementPostfixExpression; RULE_incrementOrDecrementUnaryExpression: typeof IncrementOrDecrementUnaryExpression = IncrementOrDecrementUnaryExpression; RULE_instanceofExpression: typeof InstanceOfExpression = InstanceOfExpression; RULE_lambdaPrimaryExpression: typeof LambdaPrimaryExpression = LambdaPrimaryExpression; RULE_logicalAndExpression: typeof LogicalAndExpression = LogicalAndExpression; RULE_logicalOrExpression: typeof LogicalOrExpression = LogicalOrExpression; RULE_matchesExpression: typeof MatchesExpression = MatchesExpression; RULE_memberAccessExpression: typeof MemberAccessExpression = MemberAccessExpression; RULE_multiplicativeExpression: typeof MultiplicativeExpression = MultiplicativeExpression; RULE_newInstantiationExpression: typeof NewInstantiationExpression = NewInstantiationExpression; RULE_numberPrimaryExpression: typeof NumberPrimaryExpression = NumberPrimaryExpression; RULE_objectPrimaryExpression: typeof ObjectPrimaryExpression = ObjectPrimaryExpression; RULE_objectProperty: typeof ObjectProperty = ObjectProperty; RULE_operatorModifiedUnaryExpression: typeof OperatorModifiedUnaryExpression = OperatorModifiedUnaryExpression; RULE_relationalExpression: typeof RelationalExpression = RelationalExpression; RULE_stringPrimaryExpression: typeof StringPrimaryExpression = StringPrimaryExpression; RULE_tangledPrimaryExpression: typeof TangledPrimaryExpression = TangledPrimaryExpression; RULE_typeofExpression: typeof TypeofExpression = TypeofExpression; RULE_typeofTypeSpecifierExpression: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression; RULE_voidOrNullOrUndefinedPrimaryExpression: typeof VoidOrNullOrUndefinedPrimaryExpression = VoidOrNullOrUndefinedPrimaryExpression }[T]

    A mapping function matching all expression rule names to their respective constructable Expression AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTExpressionRuleName

    Parameters

    Name Type Description
    name T The expression rule name to map to a class.

    Returns

    { RULE_additiveExpression: typeof AdditiveExpression = AdditiveExpression; RULE_arrayPrimaryExpression: typeof ArrayPrimaryExpression = ArrayPrimaryExpression; RULE_assignmentExpression: typeof AssignmentExpression = AssignmentExpression; RULE_bitwiseAndExpression: typeof BitwiseAndExpression = BitwiseAndExpression; RULE_bitwiseOrExpression: typeof BitwiseOrExpression = BitwiseOrExpression; RULE_bitwiseShiftExpression: typeof BitwiseShiftExpression = BitwiseShiftExpression; RULE_bitwiseXorExpression: typeof BitwiseXorExpression = BitwiseXorExpression; RULE_boolPrimaryExpression: typeof BoolPrimaryExpression = BoolPrimaryExpression; RULE_castOrConvertExpression: typeof CastOrConvertExpression = CastOrConvertExpression; RULE_conditionalExpression: typeof ConditionalExpression = ConditionalExpression; RULE_equalityExpression: typeof EqualityExpression = EqualityExpression; RULE_fStringPrimaryExpression: typeof FStringPrimaryExpression = FStringPrimaryExpression; RULE_functionCallExpression: typeof FunctionCallExpression = FunctionCallExpression; RULE_genericTypeSpecifierExpression: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; RULE_identifierPrimaryExpression: typeof IdentifierPrimaryExpression = IdentifierPrimaryExpression; RULE_identifierTypeSpecifierExpression: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; RULE_incrementOrDecrementPostfixExpression: typeof IncrementOrDecrementPostfixExpression = IncrementOrDecrementPostfixExpression; RULE_incrementOrDecrementUnaryExpression: typeof IncrementOrDecrementUnaryExpression = IncrementOrDecrementUnaryExpression; RULE_instanceofExpression: typeof InstanceOfExpression = InstanceOfExpression; RULE_lambdaPrimaryExpression: typeof LambdaPrimaryExpression = LambdaPrimaryExpression; RULE_logicalAndExpression: typeof LogicalAndExpression = LogicalAndExpression; RULE_logicalOrExpression: typeof LogicalOrExpression = LogicalOrExpression; RULE_matchesExpression: typeof MatchesExpression = MatchesExpression; RULE_memberAccessExpression: typeof MemberAccessExpression = MemberAccessExpression; RULE_multiplicativeExpression: typeof MultiplicativeExpression = MultiplicativeExpression; RULE_newInstantiationExpression: typeof NewInstantiationExpression = NewInstantiationExpression; RULE_numberPrimaryExpression: typeof NumberPrimaryExpression = NumberPrimaryExpression; RULE_objectPrimaryExpression: typeof ObjectPrimaryExpression = ObjectPrimaryExpression; RULE_objectProperty: typeof ObjectProperty = ObjectProperty; RULE_operatorModifiedUnaryExpression: typeof OperatorModifiedUnaryExpression = OperatorModifiedUnaryExpression; RULE_relationalExpression: typeof RelationalExpression = RelationalExpression; RULE_stringPrimaryExpression: typeof StringPrimaryExpression = StringPrimaryExpression; RULE_tangledPrimaryExpression: typeof TangledPrimaryExpression = TangledPrimaryExpression; RULE_typeofExpression: typeof TypeofExpression = TypeofExpression; RULE_typeofTypeSpecifierExpression: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression; RULE_voidOrNullOrUndefinedPrimaryExpression: typeof VoidOrNullOrUndefinedPrimaryExpression = VoidOrNullOrUndefinedPrimaryExpression }[T]

    The class matching the given expression rule name.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:481


    mapStatementKindToClass

    ▸ Static mapStatementKindToClass<T>(kind): { 25: typeof CompoundStatement = CompoundStatement; 26: typeof ExpressionStatement = ExpressionStatement; 28: typeof IfStatement = IfStatement; 29: typeof SwitchStatement = SwitchStatement; 32: typeof ForLoopIterationStatement = ForLoopIterationStatement; 33: typeof WhileLoopIterationStatement = WhileLoopIterationStatement; 34: typeof DoWhileLoopIterationStatement = DoWhileLoopIterationStatement; 35: typeof JumpStatement = JumpStatement; 36: typeof ReturnStatement = ReturnStatement }[T]

    A mapping function matching all statement kinds to their respective constructable Statement AST node classes.

    Since

    0.11.0

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTStatementKind

    Parameters

    Name Type Description
    kind T The statement kind to map to a class.

    Returns

    { 25: typeof CompoundStatement = CompoundStatement; 26: typeof ExpressionStatement = ExpressionStatement; 28: typeof IfStatement = IfStatement; 29: typeof SwitchStatement = SwitchStatement; 32: typeof ForLoopIterationStatement = ForLoopIterationStatement; 33: typeof WhileLoopIterationStatement = WhileLoopIterationStatement; 34: typeof DoWhileLoopIterationStatement = DoWhileLoopIterationStatement; 35: typeof JumpStatement = JumpStatement; 36: typeof ReturnStatement = ReturnStatement }[T]

    The class matching the given statement kind.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:416


    mapStatementKindToRuleContext

    ▸ Static mapStatementKindToRuleContext<T>(kind): { 25: typeof CompoundStatementContext = CompoundStatementContext; 26: typeof ExpressionStatementContext = ExpressionStatementContext; 28: typeof IfStatementContext = IfStatementContext; 29: typeof SwitchStatementContext = SwitchStatementContext; 32: typeof ForLoopIterationStatementContext = ForLoopIterationStatementContext; 33: typeof WhileLoopIterationStatementContext = WhileLoopIterationStatementContext; 34: typeof DoWhileLoopIterationStatementContext = DoWhileLoopIterationStatementContext; 35: typeof JumpStatementContext = JumpStatementContext; 36: typeof ReturnStatementContext = ReturnStatementContext }[T]

    A mapping function matching all expression rule names to their respective constructable Statement AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTStatementKind

    Parameters

    Name Type Description
    kind T The statement rule name to map to a class.

    Returns

    { 25: typeof CompoundStatementContext = CompoundStatementContext; 26: typeof ExpressionStatementContext = ExpressionStatementContext; 28: typeof IfStatementContext = IfStatementContext; 29: typeof SwitchStatementContext = SwitchStatementContext; 32: typeof ForLoopIterationStatementContext = ForLoopIterationStatementContext; 33: typeof WhileLoopIterationStatementContext = WhileLoopIterationStatementContext; 34: typeof DoWhileLoopIterationStatementContext = DoWhileLoopIterationStatementContext; 35: typeof JumpStatementContext = JumpStatementContext; 36: typeof ReturnStatementContext = ReturnStatementContext }[T]

    The class matching the given statement rule name.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:455


    mapStatementRuleNameToClass

    ▸ Static mapStatementRuleNameToClass<T>(name): { RULE_compoundStatement: typeof CompoundStatement = CompoundStatement; RULE_doWhileLoopIterationStatement: typeof DoWhileLoopIterationStatement = DoWhileLoopIterationStatement; RULE_expressionStatement: typeof ExpressionStatement = ExpressionStatement; RULE_forLoopIterationStatement: typeof ForLoopIterationStatement = ForLoopIterationStatement; RULE_ifStatement: typeof IfStatement = IfStatement; RULE_jumpStatement: typeof JumpStatement = JumpStatement; RULE_returnStatement: typeof ReturnStatement = ReturnStatement; RULE_switchStatement: typeof SwitchStatement = SwitchStatement; RULE_whileLoopIterationStatement: typeof WhileLoopIterationStatement = WhileLoopIterationStatement }[T]

    A mapping function matching all statement rule names to their respective constructable Statement AST node classes.

    Since

    0.11.0

    Type parameters

    Name Type
    T extends ASTStatementRuleName

    Parameters

    Name Type Description
    name T The statement rule name to map to a class.

    Returns

    { RULE_compoundStatement: typeof CompoundStatement = CompoundStatement; RULE_doWhileLoopIterationStatement: typeof DoWhileLoopIterationStatement = DoWhileLoopIterationStatement; RULE_expressionStatement: typeof ExpressionStatement = ExpressionStatement; RULE_forLoopIterationStatement: typeof ForLoopIterationStatement = ForLoopIterationStatement; RULE_ifStatement: typeof IfStatement = IfStatement; RULE_jumpStatement: typeof JumpStatement = JumpStatement; RULE_returnStatement: typeof ReturnStatement = ReturnStatement; RULE_switchStatement: typeof SwitchStatement = SwitchStatement; RULE_whileLoopIterationStatement: typeof WhileLoopIterationStatement = WhileLoopIterationStatement }[T]

    The class matching the given statement rule name.

    Defined in

    kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:494

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