Skip to content

Conversation

@LeanSerra
Copy link
Owner

Description

This PR modifies the symbol table creation logic by:

  • Storing the table as a global variable in the form of a Vec, every time we parse a symbol we push it to this vector
  • If compilation is successful or we exit with an error we first dump the table into a file
  • When parsing the variable declarations inside init {} if we find a symbol that is already in the table we exit with an error.
    This PR also modifies the parsing of negative floats and integers:
  • The enum variants NumberNegativeInt and NumberNegativeInt were removed in favor of using i64 and f32 to store negatives.

Copy link
Collaborator

@MatiBarcia MatiBarcia left a comment

Choose a reason for hiding this comment

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

LGTM!

@LeanSerra LeanSerra merged commit 95b2f6e into main Oct 1, 2025
2 checks passed
@LeanSerra LeanSerra deleted the symbol_table_remove_duplicates branch October 1, 2025 03:13
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.

3 participants