Closed Luna-Klatzer closed 2 months ago
Attention: Patch coverage is 82.61456%
with 258 lines
in your changes missing coverage. Please review.
Project coverage is 84.29%. Comparing base (
16cb772
) to head (936ac59
). Report is 5 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What type of change does this PR perform?
Summary
New major development version
0.11.0
, which includes many optimisations in the core language, rewrites the core AST node system and adds additional expressions and statements.Detailed Changelog
Added
&
,|
,^
,~
,<<
,>>
,>>>
). (#493)COND ? EXP : EXP
) as a ternary operator. (#534)do ... while ...
) iteration statements. (#271)@kipper/config
, which implements config file loading and parsing. This package is used by the Kipper CLI to automatically load and parse config files. (#502).@kipper/cli
to automatically create a Kipper project with a config file. (#502).*
operator. (#478).--dry-run
incompile
, which only compiles the program and does not write any outputs. (#532).void
tostr
.null
tostr
.undefined
tostr
.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.PromptModule
in@kipper/cli
, which contains all prompt-related functions and classes.ObjectPrimaryExpression
, which represents an AST object primary expression.ObjectProperty
, which represents an AST object property.BitwiseExpression
, which represents an AST bitwise expression.BitwiseAndExpression
, which represents an AST bitwise AND expression.BitwiseOrExpression
, which represents an AST bitwise OR expression.BitwiseXorExpression
, which represents an AST bitwise XOR expression.BitwiseShiftExpression
, which represents an AST bitwise shift expression.LambdaExpression
, which represents an AST lambda expression.PragmaProcessor
which handles the processing of all possible Pragmas.LambdaExpressionSemantics
, which represents the semantics of a lambda expression.LambdaExpressionTypeSemantics
, which represents the type semantics of a lambda expression.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.ObjectPrimaryExpressionSemantics
, which represents the semantics of an object primary expression.ObjectPrimaryExpressionTypeSemantics
, which represents the type semantics of an object primary expression.ObjectPropertySemantics
, which represents the semantics of an object property.ObjectPropertyTypeSemantics
, which represents the type semantics of an object property.BitwiseExpressionSemantics
, which represents the semantics of a bitwise expression.BitwiseExpressionTypeSemantics
, which represents the type semantics of a bitwise expression.BitwiseAndExpressionSemantics
, which represents the semantics of a bitwise AND expression.BitwiseAndExpressionTypeSemantics
, which represents the type semantics of a bitwise AND expression.BitwiseOrExpressionSemantics
, which represents the semantics of a bitwise OR expression.BitwiseOrExpressionTypeSemantics
, which represents the type semantics of a bitwise OR expression.BitwiseXorExpressionSemantics
, which represents the semantics of a bitwise XOR expression.BitwiseXorExpressionTypeSemantics
, which represents the type semantics of a bitwise XOR expression.BitwiseShiftExpressionSemantics
, which represents the semantics of a bitwise shift expression.BitwiseShiftExpressionTypeSemantics
, which represents the type semantics of a bitwise shift expression.ignoreParams
ingenJSFunction()
, which, if true makes the function signature define no parameters.ignoreParams
increateJSFunctionSignature()
, which, if true makes the function signature define no parameters.ignoreParams
ingenTSFunction()
, which, if true makes the function signature define no parameters.ignoreParams
increateTSFunctionSignature()
, which, if true makes the function signature define no parameters.DEFAULT_TOKEN_CHANNEL
, which is the channel id of the default channel storing all the parser-relevant tokens that the Lexer lexed.HIDDEN
, which is the channel id of the channel storing all whitespaces and newlines that the Lexer lexed.COMMENT
, which is the channel id of the channel storing all the comments that the Lexer lexed.PRAGMA
, which is the channel id of the channel storing all pragma comments that the Lexer lexed.KipperError.programCtx
, which contains, ifKipperError.tracebackData.errorNode
is not undefined, the program context of the error.ParserASTNode.ruleName
, which contains the rule name of the node.LexerParserData.channels
, which stores the channels generated by the Lexer.InverseMap
, which inverts a map by swapping the keys and values.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.loadConfig()
in@kipper/cli
, which loads a config file from the specified path.loadAutoConfig()
in@kipper/cli
, which loads a config file from the current working directory.copyConfigResources()
in@kipper/cli
, which copies the resources from the config file to the output directory.KipperTypeChecker.validConditionalExpression()
, which ensures that a conditional expression is valid.PragmaProcessor.processSingleLine()
, which changes the compiler options according to the pragmas found in the file.Changed
0.10.3
, but was only added to the dev branch with the release of0.11.0-alpha.1
i.e.0.11.0-alpha.0
does not have this change).VoidOrNullOrUndefinedPrimaryExpression
a constant expression and inherit from theConstantExpression
class. This means it's AST kind number is now also added to theASTConstantExpressionKind
type and its context class is also part of theParserConstantExpressionContext
type.compiler/parser
tolexer-parser
.kipper/core/compiler/parser/parser-ast-mapping.ts
toparse-rule-kind-mappings.ts
.KipperParseStream
toKipperFileStream
including its file tofile-stream.ts
.KipperParseFile
toKipperInputFile
including its file toinput-file.ts
.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
.ParseData
toLexerParserData
.TargetASTNodeCodeGenerator.arrayLiteralExpression
toarrayPrimaryExpression
.TargetASTNodeSemanticAnalyser.listPrimaryExpression
toarrayPrimaryExpression
.FStringPrimaryExpressionSemantics.items
toatoms
.LexerParserData.parseStream
tofileStream
.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.Fixed
InternalError
after calling the compiler (#462).KipperCompiler
, whereabortOnFirstError
didn't precederecover
, meaning that instead of an error being thrown the failed result was returned (As defined in therecover
behaviour, which is incorrect).-t
shortcut flag was incorrectly shown for the commandhelp compile
. (#451) (This is the same fix as in0.10.3
, but was only added to the dev branch with the release of0.11.0-alpha.1
i.e.0.11.0-alpha.0
still has this bug).0.10.4
, but with one additional edge-case covered. This fix was only added to the dev branch with the release of0.11.0-alpha.1
i.e.0.11.0-alpha.0
still has this bug).Removed
--abort-on-first-error
in favour of--no-recover
. (#501).analyse
in favor of the flag--dry-run
in the CLI commandcompile
. (#532).ConstantExpression
, its interfacesConstantExpressionSemantics
andConstantExpressionTypeSemantics
, as they were not really needed and unnecessarily added another level of complexity to the AST. All classes which previously inherited fromConstantExpression
now inherit fromPrimaryExpression
instead.Does this PR create new warnings?
None.
Linked issues or PRs
0.10.x
)0.10.x
)0.10.x
)