Closed Luna-Klatzer closed 1 year ago
Attention: 92 lines
in your changes are missing coverage. Please review.
Files | Coverage Δ | |
---|---|---|
kipper/cli/src/commands/compile.ts | 81.25% <ø> (ø) |
|
kipper/cli/src/commands/run.ts | 32.50% <ø> (ø) |
|
...nalysis/analyser/err-handler/semantics-asserter.ts | 100.00% <100.00%> (ø) |
|
...is/analyser/err-handler/semantics-error-handler.ts | 45.45% <100.00%> (ø) |
|
...src/compiler/analysis/analyser/semantic-checker.ts | 92.00% <100.00%> (ø) |
|
...ore/src/compiler/analysis/analyser/type-checker.ts | 70.81% <ø> (ø) |
|
...e/src/compiler/analysis/analyser/warning-issuer.ts | 80.00% <100.00%> (ø) |
|
...c/compiler/analysis/symbol-table/function-scope.ts | 90.00% <ø> (ø) |
|
.../src/compiler/analysis/symbol-table/local-scope.ts | 95.00% <ø> (ø) |
|
...ipper/core/src/compiler/ast/analysable-ast-node.ts | 85.48% <ø> (ø) |
|
... and 130 more |
:loudspeaker: Thoughts on this report? Let us know!.
What type of change does this PR perform?
Summary
Cleaned up internal AST structure and added additional mapping functionality, allowing more seamless mappings between
kind
andruleName
, and their associated AST class.Summary of Changes
ASTNodeMapper
for handling mappings.@kipper/core
.ruleName
for all AST node classes.Does this PR create new warnings?
No.
Detailed Changelog
Not present for website/docs changes
kipper/core/tools
, which contains all tools and utilities used by the compiler.kipper/core/tools/decorators
, which contains all decorators used by the compiler.kipper/core/tools/functions
, which contains all functions used by the compiler.kipper/core/tools/types
, which contains all types used by the compiler.kipper/core/compiler/ast/common
, which contains commonly used types and functions.kipper/core/compiler/ast/factories
, which replaces the old filefactories.ts
and contains all AST factory classes and types.kipper/core/compiler/ast/mapping
, which contains all AST mapping objects and theASTNodeMapper
class.ASTNodeMapper
, which handles the mapping between kind numbers, rule names, AST classes and parser context classes.PrimaryExpression
, which is an abstract base class for all primary expressions.PostfixExpression
, which is an abstract base class for all postfix expressions.PrimaryExpressionSemantics
, which represents the semantics of a primary expression.PrimaryExpressionTypeSemantics
, which represents the type semantics of a primary expression.PostfixExpressionSemantics
, which represents the semantics of a postfix expression.PostfixExpressionTypeSemantics
, which represents the type semantics of a postfix expression.IterationStatementTypeSemantics
, which represents the type semantics of an iteration statement.ExpressionStatementSemantics
, which represents the semantics of an expression statement.ExpressionStatementTypeSemantics
, which represents the type semantics of an expression statement.StatementSemantics
, which represents the semantics of a statement.StatementTypeSemantics
, which represents the type semantics of a statement.IfStatementTypeSemantics
, which represents the type semantics of an if statement.CompoundStatementSemantics
, which represents the semantics of a compound statement.CompoundStatementTypeSemantics
, which represents the type semantics of a compound statement.ForLoopStatementTypeSemantics
, which represents the type semantics of a for loop statement.DoWhileLoopIterationStatementTypeSemantics
, which represents the type semantics of a do-while loop statement.WhileLoopStatementTypeSemantics
, which represents the type semantics of a while loop statement.JumpStatementTypeSemantics
, which represents the type semantics of a jump statement.SwitchStatementSemantics
, which represents the semantics of a switch statement.SwitchStatementTypeSemantics
, which represents the type semantics of a switch statement.ParserASTNode.ruleName
, which contains the rule name of the node.KipperTargetBuiltInGenerator.voidToStr()
, for the built-in conversion fromvoid
tostr
.KipperTargetBuiltInGenerator.nullToStr()
, for the built-in conversion fromnull
tostr
.KipperTargetBuiltInGenerator.undefinedToStr()
, for the built-in conversion fromundefined
tostr
.replaceObjKeys()
, which replaces the keys of an object with the values returned by a function.inverseMap()
, which inverts a map by swapping the keys and values.Changed
FunctionCallPostfixTypeSemantics
toFunctionCallExpressionTypeSemantics
.FStringPrimaryExpressionSemantics.items
toatoms
.getTSFunction()
togenTSFunction()
.typeSpecifier
totypeSpecifierExpression
and its AST classTypeSpecifier
toTypeSpecifierExpression
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.identifierTypeSpecifier
toidentifierTypeSpecifierExpression
and its AST classIdentifierTypeSpecifier
toIdentifierTypeSpecifierExpression
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.genericTypeSpecifier
togenericTypeSpecifierExpression
and its AST classGenericTypeSpecifier
toGenericTypeSpecifierExpression
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.typeofTypeSpecifier
totypeofTypeSpecifierExpression
and its AST classTypeofTypeSpecifier
toTypeofTypeSpecifierExpression
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.forLoopStatement
toforLoopIterationStatement
and its AST classForLoopStatement
toForLoopIterationStatement
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.whileLoopStatement
towhileLoopIterationStatement
and its AST classWhileLoopStatement
toWhileLoopIterationStatement
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.doWhileLoopStatement
todoWhileLoopIterationStatement
and its AST classDoWhileLoopStatement
toDoWhileLoopIterationStatement
. This also includes changing the name in theKipperTargetCodeGenerator
,KipperTargetSemanticAnalyser
andKipperTargetBuiltInGenerator
classes.kipper/core/compiler/parser/parser-ast-mapping.ts
toparse-rule-kind-mappings.ts
.ArrayLiteralPrimaryExpression
toArrayPrimaryExpression
.ArrayLiteralPrimaryExpressionSemantics
toArrayPrimaryExpressionSemantics
.ArrayLiteralPrimaryExpressionTypeSemantics
toArrayPrimaryExpressionTypeSemantics
.TangledPrimaryTypeSemantics
toTangledPrimaryExpressionTypeSemantics
.DoWhileLoopStatementSemantics
toDoWhileLoopIterationStatementSemantics
.kipper/core/utils.ts
tokipper/core/tools
and separated it into multiple files & modules.kipper/core/compiler/ast/root-ast-node.ts
to thekipper/core/compiler/ast/nodes
module.kipper/core/compiler/ast/ast-types.ts
to the newkipper/core/compiler/ast/common
module.Linked issues or PRs
No linked issues.