-
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
Implemented support for f-string expressions #455
Merged
Luna-Klatzer
merged 36 commits into
dev-0.11.0
from
287-feature-implement-support-for-f-string-expressions
Jun 7, 2023
Merged
Implemented support for f-string expressions #455
Luna-Klatzer
merged 36 commits into
dev-0.11.0
from
287-feature-implement-support-for-f-string-expressions
Jun 7, 2023
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
…ntlr4 parser This is due to the fact generating the parser should be preferably done on the root level, as the lexer and parser are usually also referenced in other packages
The update for the lexer syntax also includes the introduction of new parsing modes to support the complex recognition of nested expressions and sub-parts of f-strings
This is due to unexpected conflicts when performing tests, as that ts-node version is seemingly incompatible with typescript 4.9.x
The bug caused `abortOnFirstError` to not precede `recover`, meaning that instead of an error being thrown the failed result was returned
In work, some commits not pushed yet. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev-0.11.0 #455 +/- ##
==============================================
+ Coverage 85.63% 85.78% +0.14%
==============================================
Files 117 118 +1
Lines 2214 2230 +16
Branches 248 249 +1
==============================================
+ Hits 1896 1913 +17
+ Misses 202 201 -1
Partials 116 116
☔ View full report in Codecov by Sentry. |
size-limit report 📦
|
…sions in `FStringPrimaryExpression`
The check whether javascript code should also be generated was specifically checking "typescript" instead for "javascript" meaning theoretically only these two targets are taken into consideration by the code (as not typescript is assumed to be javascript).
…null` and `undefined` to `str`
…ring-expressions Signed-off-by: Luna <luna.klatzer@gmail.com>
…lement-support-for-f-string-expressions # Conflicts: # CHANGELOG.md # kipper/core/src/compiler/ast/nodes/expressions/primary/fstring-primary-expression.ts
…r-f-string-expressions' into 287-feature-implement-support-for-f-string-expressions
Luna-Klatzer
deleted the
287-feature-implement-support-for-f-string-expressions
branch
June 7, 2023 13:04
This was referenced Jun 15, 2023
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Implemented F-String Expressions according to #287, which allow complex string concatenation and manipulation.
Closes #287
Summary of Changes
Does this PR create new warnings?
No.
Detailed Changelog
Not present for website/docs changes
Added
void
tostr
.null
tostr
.undefined
tostr
.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.KipperError.programCtx
, which contains, ifKipperError.tracebackData.errorNode
is not undefined, the programcontext of the error.
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
.Changed
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.FunctionCallPostfixTypeSemantics
toFunctionCallExpressionTypeSemantics
.FStringPrimaryExpressionSemantics.items
toatoms
.getTSFunction()
togenTSFunction()
.Linked issues or PRs