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.7.0-rc.0 #126

Merged
merged 14 commits into from
May 22, 2022
Merged

v0.7.0-rc.0 #126

merged 14 commits into from
May 22, 2022

Conversation

Luna-Klatzer
Copy link
Member

@Luna-Klatzer Luna-Klatzer commented May 22, 2022

What type of change does this PR perform?

  • New feature (Non-breaking change which adds functionality)

Summary

Merges new release candidate v0.7.0-rc.0 into main.

Changes

  • Implemented assignment and variable definition type checking
  • Implemented extended type checking and semantic analysis using KipperSemanticChecker and KipperTypeChecker.
  • Restructured the core project.

Does this PR create new warnings?

No.

Changelog

Added

  • New fields:
    • VariableDeclarationSemantics.value, which represents the expression that was assigned in the definition.
      This field is undefined if VariableDeclarationSemantics.isDefined is false.
  • New functions:
    • CompileAssert.validAssignment(), which asserts that an assignment expression is valid.
    • abstract CompilableParseToken.semanticTypeChecking(), which must be implemented by every child and should serve
      as a separate semantic type checking step outside of primarySemanticAnalysis().
  • New classes:
    • KipperAsserter, which is an abstract base class that represents a class that can be used to assert certain truths
      and handle/throw compile errors.
    • KipperTypeChecker and KipperSemanticChecker, which perform specialised semantic checking and verify logical
      integrity and cohesion. These two classes replace CompileAssert.

Changed

  • Updated logger messages.
  • Updated compiler folder structure of the core package:
    • compiler/parser from now on contains everything parser and lexer-related.
    • compiler/parser/antlr from now on contains the Antlr4 generated parser and lexer files.
    • compiler/semantics from now on contains everything semantics related, such as the file listener, the Kipper
      tokens, logical constants etc.
    • compiler/translation from now on contains the classes and tools used for translating Kipper code into another
      language.
    • compiler/targets from now on contains the existing targets for Kipper, such as typescript.
    • compiler/lib from now on contains the standard library and built-ins for Kipper.
    • compiler/lib/import from now on contains the default importable libraries for Kipper.
  • Renamed:
    • Error InvalidTypeError to TypeError.
    • Function KipperProgramContext.addNewGlobalScopeEntry to addGlobalVariable().
    • Function CompoundStatement.addNewLocalVariable to addLocalVariable().

Removed

  • Option to use unary expressions for the left-hand side of an assignment expression in Kipper.g4. (Only identifiers may be used.)

Linked other issues or PRs

Luna-Klatzer and others added 13 commits May 22, 2022 18:20
…lasses-kippersemanticchecker-and-kippertypechecker-as-a-replacement-for-compileassert' into 124-feature-implement-seperate-classes-kippersemanticchecker-and-kippertypechecker-as-a-replacement-for-compileassert
…ate-classes-kippersemanticchecker-and-kippertypechecker-as-a-replacement-for-compileassert

Implemented `KipperSemanticChecker` and `KipperTypeChecker`
@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 May 22, 2022
@Luna-Klatzer Luna-Klatzer self-assigned this May 22, 2022
@Luna-Klatzer Luna-Klatzer added this to the Stable Kipper Release milestone May 22, 2022
@Luna-Klatzer Luna-Klatzer merged commit 14f0cdb into main May 22, 2022
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
None yet
Development

Successfully merging this pull request may close these issues.

1 participant