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

Fix unquoted string literals when parsing "all variables are globals" handlers #91

Open
uliwitness opened this issue May 28, 2017 · 0 comments

Comments

@uliwitness
Copy link
Owner

Code without a handler around it in Forge in Webpage-mode and Stacksmith's message box parse into a handler that is set to make all local variables globals implicitly.

This conflicts with how unquoted string literals are implemented right now, which are parsed as local variables initialized with their name. That way, they behave like an interpreter: First, they are an unquoted string literal, but as soon as you put something in them, they get interpreted as a variable (even in a second iteration of a loop where the first one was the unquoted string, and at its end it was suddenly used as a variable).

Globals are initialized to empty strings instead of their names, and therefore unquoted string literals all end up empty. We should see if we can mark implicitly-declared globals as also needing to be initialized to their name.

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

No branches or pull requests

1 participant