• 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: 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
    13 typeof ParameterDeclaration
    6 typeof FunctionDeclaration
    7 typeof VariableDeclaration

    Defined in

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


    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
    13 typeof ParameterDeclarationContext
    6 typeof FunctionDeclarationContext
    7 typeof VariableDeclarationContext

    Defined in

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


    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_functionDeclaration typeof FunctionDeclaration
    RULE_parameterDeclaration typeof ParameterDeclaration
    RULE_variableDeclaration typeof VariableDeclaration

    Defined in

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


    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
    29 typeof LambdaExpression
    30 typeof TangledPrimaryExpression
    31 typeof BoolPrimaryExpression
    32 typeof IdentifierPrimaryExpression
    35 typeof StringPrimaryExpression
    36 typeof FStringPrimaryExpression
    39 typeof NumberPrimaryExpression
    40 typeof ArrayPrimaryExpression
    41 typeof ObjectPrimaryExpression
    42 typeof ObjectProperty
    43 typeof VoidOrNullOrUndefinedPrimaryExpression
    50 typeof IncrementOrDecrementPostfixExpression
    52 typeof IncrementOrDecrementUnaryExpression
    53 typeof OperatorModifiedUnaryExpression
    56 typeof CastOrConvertExpression
    57 typeof MultiplicativeExpression
    58 typeof AdditiveExpression
    59 typeof BitwiseShiftExpression
    61 typeof RelationalExpression
    62 typeof EqualityExpression
    63 typeof BitwiseAndExpression
    64 typeof BitwiseXorExpression
    65 typeof BitwiseOrExpression
    66 typeof LogicalAndExpression
    67 typeof LogicalOrExpression
    68 typeof ConditionalExpression
    69 typeof AssignmentExpression
    73 typeof IdentifierTypeSpecifierExpression
    74 typeof GenericTypeSpecifierExpression
    75 typeof TypeofTypeSpecifierExpression

    Defined in

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


    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
    29 typeof LambdaExpressionContext
    30 typeof TangledPrimaryExpressionContext
    31 typeof BoolPrimaryExpressionContext
    32 typeof IdentifierPrimaryExpressionContext
    35 typeof StringPrimaryExpressionContext
    36 typeof FStringPrimaryExpressionContext
    39 typeof NumberPrimaryExpressionContext
    40 typeof ArrayPrimaryExpressionContext
    41 typeof ObjectPrimaryExpressionContext
    42 typeof ObjectPropertyContext
    43 typeof VoidOrNullOrUndefinedPrimaryExpressionContext
    50 typeof IncrementOrDecrementPostfixExpressionContext
    52 typeof IncrementOrDecrementUnaryExpressionContext
    53 typeof OperatorModifiedUnaryExpressionContext
    56 typeof CastOrConvertExpressionContext
    57 typeof MultiplicativeExpressionContext
    58 typeof AdditiveExpressionContext
    59 typeof BitwiseShiftExpressionContext
    61 typeof RelationalExpressionContext
    62 typeof EqualityExpressionContext
    63 typeof BitwiseAndExpressionContext
    64 typeof BitwiseXorExpressionContext
    65 typeof BitwiseOrExpressionContext
    66 typeof LogicalAndExpressionContext
    67 typeof LogicalOrExpressionContext
    68 typeof ConditionalExpressionContext
    69 typeof AssignmentExpressionContext
    73 typeof IdentifierTypeSpecifierExpressionContext
    74 typeof GenericTypeSpecifierExpressionContext
    75 typeof TypeofTypeSpecifierExpressionContext

    Defined in

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


    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_lambdaExpression typeof LambdaExpression
    RULE_logicalAndExpression typeof LogicalAndExpression
    RULE_logicalOrExpression typeof LogicalOrExpression
    RULE_memberAccessExpression typeof MemberAccessExpression
    RULE_multiplicativeExpression typeof MultiplicativeExpression
    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_typeofTypeSpecifierExpression typeof TypeofTypeSpecifierExpression
    RULE_voidOrNullOrUndefinedPrimaryExpression typeof VoidOrNullOrUndefinedPrimaryExpression

    Defined in

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


    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
    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/mapping/ast-node-mapper.ts:175


    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
    16 typeof CompoundStatementContext
    17 typeof ExpressionStatementContext
    19 typeof IfStatementContext
    20 typeof SwitchStatementContext
    23 typeof ForLoopIterationStatementContext
    24 typeof WhileLoopIterationStatementContext
    25 typeof DoWhileLoopIterationStatementContext
    26 typeof JumpStatementContext
    27 typeof ReturnStatementContext

    Defined in

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


    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:316

    Methods

    mapDeclarationKindToClass

    ▸ Static mapDeclarationKindToClass<T>(kind): { 13: typeof ParameterDeclaration = ParameterDeclaration; 6: typeof FunctionDeclaration = FunctionDeclaration; 7: 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

    { 13: typeof ParameterDeclaration = ParameterDeclaration; 6: typeof FunctionDeclaration = FunctionDeclaration; 7: typeof VariableDeclaration = VariableDeclaration }[T]

    The class matching the given declaration kind.

    Defined in

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


    mapDeclarationKindToRuleContext

    ▸ Static mapDeclarationKindToRuleContext<T>(kind): { 13: typeof ParameterDeclarationContext = ParameterDeclarationContext; 6: typeof FunctionDeclarationContext = FunctionDeclarationContext; 7: 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

    { 13: typeof ParameterDeclarationContext = ParameterDeclarationContext; 6: typeof FunctionDeclarationContext = FunctionDeclarationContext; 7: typeof VariableDeclarationContext = VariableDeclarationContext }[T]

    The class matching the given declaration rule name.

    Defined in

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


    mapDeclarationRuleNameToClass

    ▸ Static mapDeclarationRuleNameToClass<T>(name): { RULE_functionDeclaration: typeof FunctionDeclaration = FunctionDeclaration; 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_functionDeclaration: typeof FunctionDeclaration = FunctionDeclaration; 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:414


    mapExpressionKindToClass

    ▸ Static mapExpressionKindToClass<T>(kind): { 1001: typeof MemberAccessExpression = MemberAccessExpression; 1002: typeof FunctionCallExpression = FunctionCallExpression; 29: typeof LambdaExpression = LambdaExpression; 30: typeof TangledPrimaryExpression = TangledPrimaryExpression; 31: typeof BoolPrimaryExpression = BoolPrimaryExpression; 32: typeof IdentifierPrimaryExpression = IdentifierPrimaryExpression; 35: typeof StringPrimaryExpression = StringPrimaryExpression; 36: typeof FStringPrimaryExpression = FStringPrimaryExpression; 39: typeof NumberPrimaryExpression = NumberPrimaryExpression; 40: typeof ArrayPrimaryExpression = ArrayPrimaryExpression; 41: typeof ObjectPrimaryExpression = ObjectPrimaryExpression; 42: typeof ObjectProperty = ObjectProperty; 43: typeof VoidOrNullOrUndefinedPrimaryExpression = VoidOrNullOrUndefinedPrimaryExpression; 50: typeof IncrementOrDecrementPostfixExpression = IncrementOrDecrementPostfixExpression; 52: typeof IncrementOrDecrementUnaryExpression = IncrementOrDecrementUnaryExpression; 53: typeof OperatorModifiedUnaryExpression = OperatorModifiedUnaryExpression; 56: typeof CastOrConvertExpression = CastOrConvertExpression; 57: typeof MultiplicativeExpression = MultiplicativeExpression; 58: typeof AdditiveExpression = AdditiveExpression; 59: typeof BitwiseShiftExpression = BitwiseShiftExpression; 61: typeof RelationalExpression = RelationalExpression; 62: typeof EqualityExpression = EqualityExpression; 63: typeof BitwiseAndExpression = BitwiseAndExpression; 64: typeof BitwiseXorExpression = BitwiseXorExpression; 65: typeof BitwiseOrExpression = BitwiseOrExpression; 66: typeof LogicalAndExpression = LogicalAndExpression; 67: typeof LogicalOrExpression = LogicalOrExpression; 68: typeof ConditionalExpression = ConditionalExpression; 69: typeof AssignmentExpression = AssignmentExpression; 73: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; 74: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; 75: 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; 29: typeof LambdaExpression = LambdaExpression; 30: typeof TangledPrimaryExpression = TangledPrimaryExpression; 31: typeof BoolPrimaryExpression = BoolPrimaryExpression; 32: typeof IdentifierPrimaryExpression = IdentifierPrimaryExpression; 35: typeof StringPrimaryExpression = StringPrimaryExpression; 36: typeof FStringPrimaryExpression = FStringPrimaryExpression; 39: typeof NumberPrimaryExpression = NumberPrimaryExpression; 40: typeof ArrayPrimaryExpression = ArrayPrimaryExpression; 41: typeof ObjectPrimaryExpression = ObjectPrimaryExpression; 42: typeof ObjectProperty = ObjectProperty; 43: typeof VoidOrNullOrUndefinedPrimaryExpression = VoidOrNullOrUndefinedPrimaryExpression; 50: typeof IncrementOrDecrementPostfixExpression = IncrementOrDecrementPostfixExpression; 52: typeof IncrementOrDecrementUnaryExpression = IncrementOrDecrementUnaryExpression; 53: typeof OperatorModifiedUnaryExpression = OperatorModifiedUnaryExpression; 56: typeof CastOrConvertExpression = CastOrConvertExpression; 57: typeof MultiplicativeExpression = MultiplicativeExpression; 58: typeof AdditiveExpression = AdditiveExpression; 59: typeof BitwiseShiftExpression = BitwiseShiftExpression; 61: typeof RelationalExpression = RelationalExpression; 62: typeof EqualityExpression = EqualityExpression; 63: typeof BitwiseAndExpression = BitwiseAndExpression; 64: typeof BitwiseXorExpression = BitwiseXorExpression; 65: typeof BitwiseOrExpression = BitwiseOrExpression; 66: typeof LogicalAndExpression = LogicalAndExpression; 67: typeof LogicalOrExpression = LogicalOrExpression; 68: typeof ConditionalExpression = ConditionalExpression; 69: typeof AssignmentExpression = AssignmentExpression; 73: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; 74: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; 75: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression }[T]

    The class matching the given expression kind.

    Defined in

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


    mapExpressionKindToRuleContext

    ▸ Static mapExpressionKindToRuleContext<T>(kind): { 1001: (typeof DotNotationMemberAccessExpressionContext | typeof BracketNotationMemberAccessExpressionContext | typeof SliceNotationMemberAccessExpressionContext)[] ; 1002: typeof FunctionCallExpressionContext = FunctionCallExpressionContext; 29: typeof LambdaExpressionContext = LambdaExpressionContext; 30: typeof TangledPrimaryExpressionContext = TangledPrimaryExpressionContext; 31: typeof BoolPrimaryExpressionContext = BoolPrimaryExpressionContext; 32: typeof IdentifierPrimaryExpressionContext = IdentifierPrimaryExpressionContext; 35: typeof StringPrimaryExpressionContext = StringPrimaryExpressionContext; 36: typeof FStringPrimaryExpressionContext = FStringPrimaryExpressionContext; 39: typeof NumberPrimaryExpressionContext = NumberPrimaryExpressionContext; 40: typeof ArrayPrimaryExpressionContext = ArrayPrimaryExpressionContext; 41: typeof ObjectPrimaryExpressionContext = ObjectPrimaryExpressionContext; 42: typeof ObjectPropertyContext = ObjectPropertyContext; 43: typeof VoidOrNullOrUndefinedPrimaryExpressionContext = VoidOrNullOrUndefinedPrimaryExpressionContext; 50: typeof IncrementOrDecrementPostfixExpressionContext = IncrementOrDecrementPostfixExpressionContext; 52: typeof IncrementOrDecrementUnaryExpressionContext = IncrementOrDecrementUnaryExpressionContext; 53: typeof OperatorModifiedUnaryExpressionContext = OperatorModifiedUnaryExpressionContext; 56: typeof CastOrConvertExpressionContext = CastOrConvertExpressionContext; 57: typeof MultiplicativeExpressionContext = MultiplicativeExpressionContext; 58: typeof AdditiveExpressionContext = AdditiveExpressionContext; 59: typeof BitwiseShiftExpressionContext = BitwiseShiftExpressionContext; 61: typeof RelationalExpressionContext = RelationalExpressionContext; 62: typeof EqualityExpressionContext = EqualityExpressionContext; 63: typeof BitwiseAndExpressionContext = BitwiseAndExpressionContext; 64: typeof BitwiseXorExpressionContext = BitwiseXorExpressionContext; 65: typeof BitwiseOrExpressionContext = BitwiseOrExpressionContext; 66: typeof LogicalAndExpressionContext = LogicalAndExpressionContext; 67: typeof LogicalOrExpressionContext = LogicalOrExpressionContext; 68: typeof ConditionalExpressionContext = ConditionalExpressionContext; 69: typeof AssignmentExpressionContext = AssignmentExpressionContext; 73: typeof IdentifierTypeSpecifierExpressionContext = IdentifierTypeSpecifierExpressionContext; 74: typeof GenericTypeSpecifierExpressionContext = GenericTypeSpecifierExpressionContext; 75: 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; 29: typeof LambdaExpressionContext = LambdaExpressionContext; 30: typeof TangledPrimaryExpressionContext = TangledPrimaryExpressionContext; 31: typeof BoolPrimaryExpressionContext = BoolPrimaryExpressionContext; 32: typeof IdentifierPrimaryExpressionContext = IdentifierPrimaryExpressionContext; 35: typeof StringPrimaryExpressionContext = StringPrimaryExpressionContext; 36: typeof FStringPrimaryExpressionContext = FStringPrimaryExpressionContext; 39: typeof NumberPrimaryExpressionContext = NumberPrimaryExpressionContext; 40: typeof ArrayPrimaryExpressionContext = ArrayPrimaryExpressionContext; 41: typeof ObjectPrimaryExpressionContext = ObjectPrimaryExpressionContext; 42: typeof ObjectPropertyContext = ObjectPropertyContext; 43: typeof VoidOrNullOrUndefinedPrimaryExpressionContext = VoidOrNullOrUndefinedPrimaryExpressionContext; 50: typeof IncrementOrDecrementPostfixExpressionContext = IncrementOrDecrementPostfixExpressionContext; 52: typeof IncrementOrDecrementUnaryExpressionContext = IncrementOrDecrementUnaryExpressionContext; 53: typeof OperatorModifiedUnaryExpressionContext = OperatorModifiedUnaryExpressionContext; 56: typeof CastOrConvertExpressionContext = CastOrConvertExpressionContext; 57: typeof MultiplicativeExpressionContext = MultiplicativeExpressionContext; 58: typeof AdditiveExpressionContext = AdditiveExpressionContext; 59: typeof BitwiseShiftExpressionContext = BitwiseShiftExpressionContext; 61: typeof RelationalExpressionContext = RelationalExpressionContext; 62: typeof EqualityExpressionContext = EqualityExpressionContext; 63: typeof BitwiseAndExpressionContext = BitwiseAndExpressionContext; 64: typeof BitwiseXorExpressionContext = BitwiseXorExpressionContext; 65: typeof BitwiseOrExpressionContext = BitwiseOrExpressionContext; 66: typeof LogicalAndExpressionContext = LogicalAndExpressionContext; 67: typeof LogicalOrExpressionContext = LogicalOrExpressionContext; 68: typeof ConditionalExpressionContext = ConditionalExpressionContext; 69: typeof AssignmentExpressionContext = AssignmentExpressionContext; 73: typeof IdentifierTypeSpecifierExpressionContext = IdentifierTypeSpecifierExpressionContext; 74: typeof GenericTypeSpecifierExpressionContext = GenericTypeSpecifierExpressionContext; 75: typeof TypeofTypeSpecifierExpressionContext = TypeofTypeSpecifierExpressionContext }[T]

    The class matching the given expression rule name.

    Defined in

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


    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_lambdaExpression: typeof LambdaExpression = LambdaExpression; RULE_logicalAndExpression: typeof LogicalAndExpression = LogicalAndExpression; RULE_logicalOrExpression: typeof LogicalOrExpression = LogicalOrExpression; RULE_memberAccessExpression: typeof MemberAccessExpression = MemberAccessExpression; RULE_multiplicativeExpression: typeof MultiplicativeExpression = MultiplicativeExpression; 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_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_lambdaExpression: typeof LambdaExpression = LambdaExpression; RULE_logicalAndExpression: typeof LogicalAndExpression = LogicalAndExpression; RULE_logicalOrExpression: typeof LogicalOrExpression = LogicalOrExpression; RULE_memberAccessExpression: typeof MemberAccessExpression = MemberAccessExpression; RULE_multiplicativeExpression: typeof MultiplicativeExpression = MultiplicativeExpression; 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_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:427


    mapStatementKindToClass

    ▸ Static mapStatementKindToClass<T>(kind): { 16: typeof CompoundStatement = CompoundStatement; 17: typeof ExpressionStatement = ExpressionStatement; 19: typeof IfStatement = IfStatement; 20: typeof SwitchStatement = SwitchStatement; 23: typeof ForLoopIterationStatement = ForLoopIterationStatement; 24: typeof WhileLoopIterationStatement = WhileLoopIterationStatement; 25: typeof DoWhileLoopIterationStatement = DoWhileLoopIterationStatement; 26: typeof JumpStatement = JumpStatement; 27: 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

    { 16: typeof CompoundStatement = CompoundStatement; 17: typeof ExpressionStatement = ExpressionStatement; 19: typeof IfStatement = IfStatement; 20: typeof SwitchStatement = SwitchStatement; 23: typeof ForLoopIterationStatement = ForLoopIterationStatement; 24: typeof WhileLoopIterationStatement = WhileLoopIterationStatement; 25: typeof DoWhileLoopIterationStatement = DoWhileLoopIterationStatement; 26: typeof JumpStatement = JumpStatement; 27: typeof ReturnStatement = ReturnStatement }[T]

    The class matching the given statement kind.

    Defined in

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


    mapStatementKindToRuleContext

    ▸ Static mapStatementKindToRuleContext<T>(kind): { 16: typeof CompoundStatementContext = CompoundStatementContext; 17: typeof ExpressionStatementContext = ExpressionStatementContext; 19: typeof IfStatementContext = IfStatementContext; 20: typeof SwitchStatementContext = SwitchStatementContext; 23: typeof ForLoopIterationStatementContext = ForLoopIterationStatementContext; 24: typeof WhileLoopIterationStatementContext = WhileLoopIterationStatementContext; 25: typeof DoWhileLoopIterationStatementContext = DoWhileLoopIterationStatementContext; 26: typeof JumpStatementContext = JumpStatementContext; 27: 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

    { 16: typeof CompoundStatementContext = CompoundStatementContext; 17: typeof ExpressionStatementContext = ExpressionStatementContext; 19: typeof IfStatementContext = IfStatementContext; 20: typeof SwitchStatementContext = SwitchStatementContext; 23: typeof ForLoopIterationStatementContext = ForLoopIterationStatementContext; 24: typeof WhileLoopIterationStatementContext = WhileLoopIterationStatementContext; 25: typeof DoWhileLoopIterationStatementContext = DoWhileLoopIterationStatementContext; 26: typeof JumpStatementContext = JumpStatementContext; 27: typeof ReturnStatementContext = ReturnStatementContext }[T]

    The class matching the given statement rule name.

    Defined in

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


    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:440

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