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

Add support for arrays #256

Merged
merged 18 commits into from
Feb 18, 2025
Merged

Add support for arrays #256

merged 18 commits into from
Feb 18, 2025

Conversation

CaelmBleidd
Copy link
Member

@CaelmBleidd CaelmBleidd commented Feb 17, 2025

Required TODO:

  • Reading by an index not from the indices range (e.g., -1, 123132, 1.4, etc)
  • Change the length of the array (both writing in non-existing index and methods with shift/unshift)
  • Make it possible to write values of different types into a created homogeneous array, e.g. boolean in the array of numbers
  • Errors for incorrect array creation, e.g, negative length, object as a length, etc.

@CaelmBleidd CaelmBleidd requested a review from Lipen February 17, 2025 14:52
@CaelmBleidd CaelmBleidd marked this pull request as draft February 17, 2025 14:54
is EtsClassType -> resolveClass(instance, type)
is EtsArrayType -> resolveArray(instance, type)
is EtsUnknownType -> {
val type = finalStateMemory.types.getTypeStream(expr).first()

Check warning

Code scanning / detekt

Disallow shadowing variable declarations. Warning test

Name shadowed: type
@Lipen Lipen mentioned this pull request Feb 17, 2025
3 tasks
@Lipen Lipen marked this pull request as ready for review February 17, 2025 15:45
Copy link
Member

@Lipen Lipen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@CaelmBleidd CaelmBleidd merged commit df9c103 into main Feb 18, 2025
6 checks passed
@CaelmBleidd CaelmBleidd deleted the caelmbleidd/arrays branch February 18, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants