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 arrays & tables to the scripts #155

Open
Ratstail91 opened this issue Dec 2, 2024 · 5 comments
Open

Add arrays & tables to the scripts #155

Ratstail91 opened this issue Dec 2, 2024 · 5 comments
Labels
feature New feature or request TODO A planned addition

Comments

@Ratstail91
Copy link
Owner

Ratstail91 commented Dec 2, 2024

Arrays are an essential data structure, and are used internally in several places as well.

While they are partially working at this stage, some elements are missing:

  • Assigning to specific elements
  • Accessing the length of an array
  • Pushing and popping an array
  • slicing an array
  • concating arrrays
  • array type specifier

Dictionaries, the other major data structure, are working internally, but they need to be exposed to the scripts.

  • Table declaration
  • Table assign
  • Table access
  • add/remove
  • length
  • concat?
  • type specifier
@Ratstail91 Ratstail91 added feature New feature or request in progress I am currently working on this TODO A planned addition labels Dec 2, 2024
@Ratstail91
Copy link
Owner Author

Ratstail91 commented Dec 9, 2024

BUG: Forgot to allow empty arrays.

TODO: Allow trailing commas.

Fixed in 5f75b5f

@Ratstail91 Ratstail91 changed the title Finish array implementation and tests Finish array/table implementations and tests Dec 14, 2024
@Ratstail91 Ratstail91 changed the title Finish array/table implementations and tests Add arrays & tables to the scripts Dec 16, 2024
@Ratstail91 Ratstail91 removed the in progress I am currently working on this label Dec 16, 2024
@Ratstail91 Ratstail91 added the in progress I am currently working on this label Dec 24, 2024
@Ratstail91
Copy link
Owner Author

b092b8c

Tables seem to be working well, though tests are still needed.

@Ratstail91
Copy link
Owner Author

table add and remove seems to be automatic, while printing it with string elements doesn't show any quote marks.

@Ratstail91
Copy link
Owner Author

Ratstail91 commented Dec 25, 2024

I wonder if implicit insertions for tables is good or bad?

C++ std::map definitely has that issue...

Edit: Since variables default to 'null', having the tables default to null might be a good idea too.

@Ratstail91
Copy link
Owner Author

I'm gonna leave this part for now until other prerequisites are done.

@Ratstail91 Ratstail91 removed the in progress I am currently working on this label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request TODO A planned addition
Projects
None yet
Development

No branches or pull requests

1 participant