Kipper-Lang / Kipper

The Kipper programming language for Browsers and Node.js 🦊✨ Made at HTL Leonding & JKU Linz
https://kipper-lang.org
GNU General Public License v3.0
26 stars 4 forks source link

Implemented internal representation for objects and object types such as interfaces and classes #602

Closed Luna-Klatzer closed 2 months ago

Luna-Klatzer commented 3 months ago

What type of change does this PR perform?

Summary

Implemented internal representation for objects and object types such as interfaces and classes. This also includes rewrites of the core Kipper type system, which previously relied on simply specifying types using strings. This system is now replaced with a proper symbol table system, where type identifiers act as references similar to variables and new types can be registered wherever in the program.

Closes #524

Detailed Changelog

Added

Changed

Does this PR create new warnings?

None.

Linked issues or PRs

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 82.71357% with 172 lines in your changes missing coverage. Please review.

Project coverage is 82.62%. Comparing base (54c7760) to head (0490f5c).

Files Patch % Lines
...r/core/src/compiler/semantics/types/custom-type.ts 11.42% 31 Missing :warning:
...re/src/compiler/semantics/analyser/type-checker.ts 80.21% 8 Missing and 10 partials :warning:
...declaration/class-declaration/class-declaration.ts 31.81% 15 Missing :warning:
...ion/interface-declaration/interface-declaration.ts 31.57% 13 Missing :warning:
...ntics/symbol-table/entry/scope-type-declaration.ts 45.00% 8 Missing and 3 partials :warning:
kipper/core/src/compiler/program-ctx.ts 80.95% 5 Missing and 3 partials :warning:
kipper/core/src/compiler/ast/ast-generator.ts 80.55% 5 Missing and 2 partials :warning:
...mary-expression/object-property/object-property.ts 25.00% 6 Missing :warning:
...es/statements/switch-statement/switch-statement.ts 25.00% 6 Missing :warning:
kipper/core/src/errors.ts 64.28% 4 Missing and 1 partial :warning:
... and 25 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev-next #602 +/- ## ============================================ - Coverage 84.29% 82.62% -1.67% ============================================ Files 222 247 +25 Lines 3915 4143 +228 Branches 435 453 +18 ============================================ + Hits 3300 3423 +123 - Misses 489 584 +95 - Partials 126 136 +10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.