-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.11.0 #655
Merged
Merged
v0.11.0 #655
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Luna <luna.klatzer@gmail.com>
# Conflicts: # kipper/cli/pnpm-lock.yaml
v0.11.0-alpha.1
…validation for resources, files and version
This is for later
…/eslint-plugin`, and prettified project
… for "*" version specifiers
To be extended!
…-first-error-in-favor-of-no-recover-as-maintainence-for-the-flag-is-not-worth-it Removed deprecated flag `--abort-on-first-error`
v0.11.0-beta.0
v0.11.0-rc.0
Signed-off-by: Luna <dev@lklatzer.com>
Luna-Klatzer
added
release
New release of the Kipper module.
skip changelog
Do not include in the changelog when a new release is drafted
labels
Jul 10, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #655 +/- ##
==========================================
+ Coverage 83.88% 84.29% +0.40%
==========================================
Files 66 222 +156
Lines 2066 3915 +1849
Branches 252 435 +183
==========================================
+ Hits 1733 3300 +1567
- Misses 217 489 +272
- Partials 116 126 +10 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
release
New release of the Kipper module.
skip changelog
Do not include in the changelog when a new release is drafted
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 factoryclasses 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 thatthe 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 programcontext 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
(This is the same change as in
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 the
ASTConstantExpressionKind
type and its context class isalso part of the
ParserConstantExpressionContext
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
@kipper/cli
#489 (Fix for0.10.x
)-t
is shown as possible alias for--log-timestamp
flag incompile
CLI commmand #451-t
flag was shown as possible alias for the flag--log-timestamp
in thecompile
command #479 (Fix for0.10.x
)0.10.x
)v0.11
#510@kipper/cli
#508@kipper/cli
#519str
*num
) #478str * num
#528do ... while
loop statement #271analyse
and replace it withcompile --dry-run
#532analyse
and replaced it withcompile
command--dry-run
flag #535<<
,>>
,>>>
,~
,^
,|
and&
#493--abort-on-first-error
in favor of--no-recover
as maintainence for the flag is not worth it #501--abort-on-first-error
#651