Class: StatementASTNodeFactory
compiler.StatementASTNodeFactory
Factory class which generates statement class instances using StatementASTNodeFactory.create().
Since
0.9.0
Hierarchy
ASTNodeFactory<Statement,ParserExpressionContext>↳
StatementASTNodeFactory
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new StatementASTNodeFactory()
Inherited from
Properties
ruleMapping
▪ Static Readonly ruleMapping: Object = ASTNodeMapper.statementKindToClassMap
A mapping of AST node kind ids to their respective statement AST node classes.
Since
0.11.0
Type declaration
| Name | Type |
|---|---|
16 |
typeof CompoundStatement |
17 |
typeof ExpressionStatement |
19 |
typeof IfStatement |
20 |
typeof SwitchStatement |
23 |
typeof ForLoopIterationStatement |
24 |
typeof WhileLoopIterationStatement |
25 |
typeof DoWhileLoopIterationStatement |
26 |
typeof JumpStatement |
27 |
typeof ReturnStatement |
Defined in
kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:21
Accessors
ruleIds
• get ruleIds(): ASTStatementKind[]
Returns an array of all AST node kind ids that this factory can process.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:35
ruleIds
• Static get ruleIds(): ASTStatementKind[]
Returns an array of all AST node kind ids that this factory can process.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:27
Methods
create
▸ create(antlrRuleCtx, parent): ConstructableASTStatement
Fetches the AST node class and creates a new instance based on the antlrRuleCtx.
Since
0.9.0
Parameters
| Name | Type | Description |
|---|---|---|
antlrRuleCtx |
ParserStatementContext |
The context instance that the handler class should be fetched for. |
parent |
CompilableNodeParent |
The parent of the AST node that is being created. |
Returns
Overrides
Defined in
kipper/core/src/compiler/ast/factories/statement-ast-factory.ts:45
getRuleIds
▸ Static Protected getRuleIds(ruleMapping): ConstructableASTKind[]
Returns an array of all AST node kind ids that this factory can process.
Since
0.10.0
Parameters
| Name | Type |
|---|---|
ruleMapping |
Record<number, ConstructableASTNodeClass> |
Returns
Inherited from
Defined in
kipper/core/src/compiler/ast/factories/ast-node-factory.ts:22