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

Enforce variable scoping #266

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

deepanjan90
Copy link
Contributor

Fixes: #261

Variable scope

1. Global - defined in init.gyro
2. File - defined in any .gyro file
3. For Inline - defined as part of a @for loop innitilizer
4. For Body - defined in the body of a @for loop

Scoping rules

1. Global - accessible from every where, cannot be redefined any where
2. File - accessible only from the file, cannot be redefined any where in the file
3. For Inline - accessible from inside the body of the for, cannot be redefined anywhere in the body
4. For Body - accessible in the body of the for loop, cannot be redefined anywhere in the body
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.

Enforce variable scoping
1 participant