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 struct instantiation shortcut syntax #6

Closed
wants to merge 1 commit into from

Conversation

fcoury
Copy link
Owner

@fcoury fcoury commented Jul 23, 2024

Add support for struct instantiation shortcut syntax.

  • Update src/parser.rs to handle the new shortcut syntax for struct instantiation by checking if the field name is the same as the variable name.
  • Modify src/interpreter.rs to evaluate expressions using the new shortcut syntax for struct instantiation.
  • Update tests/scripts/struct.hk to use the new shortcut syntax for struct instantiation.
  • Update tests/scripts/impl.hk to use the new shortcut syntax for struct instantiation.

For more details, open the Copilot Workspace session.

@fcoury fcoury closed this Jul 23, 2024
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.

1 participant