Kipper icon indicating copy to clipboard operation
Kipper copied to clipboard

Implemented high-level `typeof` operator expression & internal meta types for arrays and functions

Open lorenzholzbauer opened this issue 7 months ago • 0 comments

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)
  • [x] 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)
  • [x] New feature (Non-breaking change which adds functionality)
  • [x] Breaking change (Major bug fix or feature that would cause existing functionality not to work as expected.)
  • [x] Requires a documentation update, as it changes language or compiler behaviour

Summary

This PR adds the typeof expression in Kipper, which returns the type of an object at runtime. It also adds runtime type generation for interfaces adnd builtin types.

Closes #663

Detailed Changelog

Added

  • Support for the typeof operator, which returns the runtime type of a value.

  • Support for Nix Flakes and direnv, which allows for a more reproducible and consistent development environment.

    • TypeofExpression, which represents an AST typeof expression that returns the runtime type of an object.

    • TypeofTypeSpecifierExpression, which represents an AST typeof type specifier that lets one define a type by using an object as reference

    • BuiltInTypeObject, which is the base class for the compilers representation of runtime objects

    • generateInterfaceRuntimeTypeChecks which generates runtime type checks for an interface.

    • getRuntimeType, which gets the corresponding runtime representation of a built-in type.

Changed

None.

Fixed

None.

Deprecated

None.

Removed

None.

Does this PR create new warnings?

No new warnings.

Linked issues or PRs

  • [x] #663

lorenzholzbauer avatar Jul 26 '24 14:07 lorenzholzbauer