Skip to content
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-alpha.7 #648

Merged
merged 78 commits into from
Jul 5, 2024
Merged

v0.11.0-alpha.7 #648

merged 78 commits into from
Jul 5, 2024

Conversation

Luna-Klatzer
Copy link
Member

@Luna-Klatzer Luna-Klatzer commented Jul 5, 2024

What type of change does this PR perform?

  • Info or documentation change (Non-breaking change that updates repo info files (e.g. README.md, CONTRIBUTING.md, etc.) or online documentation)
  • Website (Change that changes the design or functionality of the websites or docs)
  • Development or internal changes (These changes do not add new features or fix bugs, but update the code in other ways)
  • Bug fix (Non-breaking change which fixes an issue)
  • New feature (Non-breaking change which adds functionality)
  • Breaking change (Major bug fix or feature that would cause existing functionality not to work as expected.)
  • Requires a documentation update, as it changes language or compiler behaviour

Summary

New development version 0.11.0-alpha.7, which adds support for bitwise operators, ternary expressions and compiler pragmas.

Detailed Changelog

Added

  • Implemented Processing for File Scoped Pragmas (#480)
  • Implemented Bitwise Operations (&, |, ^, ~, <<, >>, >>>). (#493)
  • Implemented Conditional Expression (COND ? EXP : EXP) as a ternary operator. (#534)
  • New classes:
    • 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.
    • PragmaProcessor which handles the processing of all possible Pragmas.
  • New interfaces:
    • 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.
  • New constants:
    • 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.
  • New field LexerParserData.channels, which stores the channels generated by the Lexer.
  • New functions:
    • 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

  • Renamed:
    • Module compiler/parser to lexer-parser.
    • File kipper/core/compiler/parser/parser-ast-mapping.ts to parse-rule-kind-mappings.ts.
    • Class KipperParseStream to KipperFileStream including its file to file-stream.ts.
    • CLI Class KipperParseFile to KipperInputFile including its file to input-file.ts.
    • Interface ParseData to LexerParserData.
    • Field FStringPrimaryExpressionSemantics.items to atoms.
    • Field LexerParserData.parseStream to fileStream.

Does this PR create new warnings?

None.

Linked issues or PRs

lorenzholzbauer and others added 30 commits July 1, 2024 16:10
Signed-off-by: Luna <dev@lklatzer.com>
Signed-off-by: Luna <dev@lklatzer.com>
Signed-off-by: Luna <dev@lklatzer.com>
Signed-off-by: Luna <dev@lklatzer.com>
…conditional-operator

Implemented ternary conditional expression
…e-operators-|-and

Implemented JavaScript-like bitwise operators
@Luna-Klatzer 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 5, 2024
@Luna-Klatzer Luna-Klatzer added this to the v0.11.0 milestone Jul 5, 2024
@Luna-Klatzer Luna-Klatzer self-assigned this Jul 5, 2024
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 82.16689% with 265 lines in your changes missing coverage. Please review.

Project coverage is 83.66%. Comparing base (16cb772) to head (2eff96c).
Report is 204 commits behind head on next.

Files Patch % Lines
kipper/cli/src/commands/new.ts 78.33% 8 Missing and 5 partials ⚠️
kipper/cli/src/decorators.ts 31.25% 11 Missing ⚠️
...e/src/compiler/ast/nodes/expressions/expression.ts 66.66% 8 Missing and 3 partials ⚠️
kipper/config/src/kipper-config-interpreter.ts 87.50% 2 Missing and 8 partials ⚠️
...ct-primary-expression/object-primary-expression.ts 37.50% 10 Missing ⚠️
...mary-expression/object-property/object-property.ts 33.33% 10 Missing ⚠️
kipper/cli/src/commands/compile.ts 68.96% 2 Missing and 7 partials ⚠️
kipper/cli/src/prompt-module.ts 40.00% 9 Missing ⚠️
kipper/cli/src/commands/run.ts 50.00% 8 Missing ⚠️
kipper/config/src/tools.ts 42.85% 4 Missing and 4 partials ⚠️
... and 41 more
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #648      +/-   ##
==========================================
- Coverage   83.88%   83.66%   -0.22%     
==========================================
  Files          66      219     +153     
  Lines        2066     3850    +1784     
  Branches      252      428     +176     
==========================================
+ Hits         1733     3221    +1488     
- Misses        217      447     +230     
- Partials      116      182      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Luna-Klatzer Luna-Klatzer merged commit a5c3494 into next Jul 5, 2024
20 checks passed
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
Projects
Development

Successfully merging this pull request may close these issues.

3 participants