Skip to content

Make info.globals a map so it's easy to check info.globals.foo if foo is defined - removed all_ids, replaced by globals+stack #300

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

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

ldemailly
Copy link
Member

Fixes #299

@ldemailly ldemailly requested a review from Copilot April 4, 2025 19:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • main_test.txtar: Language not supported
  • tests/conversions.gr: Language not supported
Comments suppressed due to low confidence (2)

object/state.go:91

  • Double-check that reducing the slice size from e.depth+1 to e.depth correctly accounts for all expected stack frames. If the extra slot was used elsewhere, adjust accordingly.
allKeys := make([]Object, e.depth)

object/state.go:105

  • [nitpick] Consider defining constants for the key names 'globals' and 'stack' to improve consistency and maintainability across the codebase.
info.Set(String{"globals"}, set) // 0 == globals

@ldemailly ldemailly merged commit 6e09dd4 into main Apr 4, 2025
3 checks passed
@ldemailly ldemailly deleted the ez_exists branch April 4, 2025 19:36
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.

add a simple way to check if an identifier exists
1 participant