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
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:150
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:233
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:321
expressionKindToClassMap
▪ Static Readonly expressionKindToClassMap: Object
A mapping matching all expression kinds to their respective constructable AST node classes.
Since
0.10.0
Type declaration
Defined in
kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:168
expressionKindToRuleContextMap
▪ Static Readonly expressionKindToRuleContextMap: Object
A mapping matching all expression kinds to their respective constructable AST node classes.
Since
0.11.0
Type declaration
Defined in
kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:251
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_castExpression |
typeof CastExpression |
RULE_conditionalExpression |
typeof ConditionalExpression |
RULE_convertExpression |
typeof ConvertExpression |
RULE_equalityExpression |
typeof EqualityExpression |
RULE_fStringPrimaryExpression |
typeof FStringPrimaryExpression |
RULE_forceCastExpression |
typeof ForceCastExpression |
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_nullableTypeSpecifierExpression |
typeof NullableTypeSpecifierExpression |
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_tryCastExpression |
typeof TryCastExpression |
RULE_typeofExpression |
typeof TypeofExpression |
RULE_typeofTypeSpecifierExpression |
typeof TypeofTypeSpecifierExpression |
RULE_voidOrNullOrUndefinedPrimaryExpression |
typeof VoidOrNullOrUndefinedPrimaryExpression |
Defined in
kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:339
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:216
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:304
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:387
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:406
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:446
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:485
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; 67: typeof ConvertExpression = ConvertExpression; 68: typeof CastExpression = CastExpression; 69: typeof ForceCastExpression = ForceCastExpression; 70: typeof TryCastExpression = TryCastExpression; 71: typeof MultiplicativeExpression = MultiplicativeExpression; 72: typeof AdditiveExpression = AdditiveExpression; 73: typeof BitwiseShiftExpression = BitwiseShiftExpression; 75: typeof InstanceOfExpression = InstanceOfExpression; 76: typeof MatchesExpression = MatchesExpression; 77: typeof RelationalExpression = RelationalExpression; 78: typeof EqualityExpression = EqualityExpression; 79: typeof BitwiseAndExpression = BitwiseAndExpression; 80: typeof BitwiseXorExpression = BitwiseXorExpression; 81: typeof BitwiseOrExpression = BitwiseOrExpression; 82: typeof LogicalAndExpression = LogicalAndExpression; 83: typeof LogicalOrExpression = LogicalOrExpression; 84: typeof ConditionalExpression = ConditionalExpression; 85: typeof AssignmentExpression = AssignmentExpression; 89: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; 90: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; 91: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression; 92: typeof NullableTypeSpecifierExpression = NullableTypeSpecifierExpression }[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; 67: typeof ConvertExpression = ConvertExpression; 68: typeof CastExpression = CastExpression; 69: typeof ForceCastExpression = ForceCastExpression; 70: typeof TryCastExpression = TryCastExpression; 71: typeof MultiplicativeExpression = MultiplicativeExpression; 72: typeof AdditiveExpression = AdditiveExpression; 73: typeof BitwiseShiftExpression = BitwiseShiftExpression; 75: typeof InstanceOfExpression = InstanceOfExpression; 76: typeof MatchesExpression = MatchesExpression; 77: typeof RelationalExpression = RelationalExpression; 78: typeof EqualityExpression = EqualityExpression; 79: typeof BitwiseAndExpression = BitwiseAndExpression; 80: typeof BitwiseXorExpression = BitwiseXorExpression; 81: typeof BitwiseOrExpression = BitwiseOrExpression; 82: typeof LogicalAndExpression = LogicalAndExpression; 83: typeof LogicalOrExpression = LogicalOrExpression; 84: typeof ConditionalExpression = ConditionalExpression; 85: typeof AssignmentExpression = AssignmentExpression; 89: typeof IdentifierTypeSpecifierExpression = IdentifierTypeSpecifierExpression; 90: typeof GenericTypeSpecifierExpression = GenericTypeSpecifierExpression; 91: typeof TypeofTypeSpecifierExpression = TypeofTypeSpecifierExpression; 92: typeof NullableTypeSpecifierExpression = NullableTypeSpecifierExpression }[T]
The class matching the given expression kind.
Defined in
kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:419
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; 67: typeof ConvertExpressionContext = ConvertExpressionContext; 68: typeof CastExpressionContext = CastExpressionContext; 69: typeof ForceCastExpressionContext = ForceCastExpressionContext; 70: typeof TryCastExpressionContext = TryCastExpressionContext; 71: typeof MultiplicativeExpressionContext = MultiplicativeExpressionContext; 72: typeof AdditiveExpressionContext = AdditiveExpressionContext; 73: typeof BitwiseShiftExpressionContext = BitwiseShiftExpressionContext; 75: typeof InstanceOfExpressionContext = InstanceOfExpressionContext; 76: typeof MatchesExpression = MatchesExpression; 77: typeof RelationalExpressionContext = RelationalExpressionContext; 78: typeof EqualityExpressionContext = EqualityExpressionContext; 79: typeof BitwiseAndExpressionContext = BitwiseAndExpressionContext; 80: typeof BitwiseXorExpressionContext = BitwiseXorExpressionContext; 81: typeof BitwiseOrExpressionContext = BitwiseOrExpressionContext; 82: typeof LogicalAndExpressionContext = LogicalAndExpressionContext; 83: typeof LogicalOrExpressionContext = LogicalOrExpressionContext; 84: typeof ConditionalExpressionContext = ConditionalExpressionContext; 85: typeof AssignmentExpressionContext = AssignmentExpressionContext; 89: typeof IdentifierTypeSpecifierExpressionContext = IdentifierTypeSpecifierExpressionContext; 90: typeof GenericTypeSpecifierExpressionContext = GenericTypeSpecifierExpressionContext; 91: typeof TypeofTypeSpecifierExpressionContext = TypeofTypeSpecifierExpressionContext; 92: typeof NullableTypeSpecifierExpressionContext = NullableTypeSpecifierExpressionContext }[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; 67: typeof ConvertExpressionContext = ConvertExpressionContext; 68: typeof CastExpressionContext = CastExpressionContext; 69: typeof ForceCastExpressionContext = ForceCastExpressionContext; 70: typeof TryCastExpressionContext = TryCastExpressionContext; 71: typeof MultiplicativeExpressionContext = MultiplicativeExpressionContext; 72: typeof AdditiveExpressionContext = AdditiveExpressionContext; 73: typeof BitwiseShiftExpressionContext = BitwiseShiftExpressionContext; 75: typeof InstanceOfExpressionContext = InstanceOfExpressionContext; 76: typeof MatchesExpression = MatchesExpression; 77: typeof RelationalExpressionContext = RelationalExpressionContext; 78: typeof EqualityExpressionContext = EqualityExpressionContext; 79: typeof BitwiseAndExpressionContext = BitwiseAndExpressionContext; 80: typeof BitwiseXorExpressionContext = BitwiseXorExpressionContext; 81: typeof BitwiseOrExpressionContext = BitwiseOrExpressionContext; 82: typeof LogicalAndExpressionContext = LogicalAndExpressionContext; 83: typeof LogicalOrExpressionContext = LogicalOrExpressionContext; 84: typeof ConditionalExpressionContext = ConditionalExpressionContext; 85: typeof AssignmentExpressionContext = AssignmentExpressionContext; 89: typeof IdentifierTypeSpecifierExpressionContext = IdentifierTypeSpecifierExpressionContext; 90: typeof GenericTypeSpecifierExpressionContext = GenericTypeSpecifierExpressionContext; 91: typeof TypeofTypeSpecifierExpressionContext = TypeofTypeSpecifierExpressionContext; 92: typeof NullableTypeSpecifierExpressionContext = NullableTypeSpecifierExpressionContext }[T]
The class matching the given expression rule name.
Defined in
kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts:459
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_castExpression: typeof CastExpression = CastExpression; RULE_conditionalExpression: typeof ConditionalExpression = ConditionalExpression; RULE_convertExpression: typeof ConvertExpression = ConvertExpression; RULE_equalityExpression: typeof EqualityExpression = EqualityExpression; RULE_fStringPrimaryExpression: typeof FStringPrimaryExpression = FStringPrimaryExpression; RULE_forceCastExpression: typeof ForceCastExpression = ForceCastExpression; 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_nullableTypeSpecifierExpression: typeof NullableTypeSpecifierExpression = NullableTypeSpecifierExpression; 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_tryCastExpression: typeof TryCastExpression = TryCastExpression; 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_castExpression: typeof CastExpression = CastExpression; RULE_conditionalExpression: typeof ConditionalExpression = ConditionalExpression; RULE_convertExpression: typeof ConvertExpression = ConvertExpression; RULE_equalityExpression: typeof EqualityExpression = EqualityExpression; RULE_fStringPrimaryExpression: typeof FStringPrimaryExpression = FStringPrimaryExpression; RULE_forceCastExpression: typeof ForceCastExpression = ForceCastExpression; 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_nullableTypeSpecifierExpression: typeof NullableTypeSpecifierExpression = NullableTypeSpecifierExpression; 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_tryCastExpression: typeof TryCastExpression = TryCastExpression; 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:498
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:433
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:472
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:511