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 #261

Open
deepanjan90 opened this issue Mar 11, 2020 · 0 comments · May be fixed by #266
Open

Enforce variable scoping #261

deepanjan90 opened this issue Mar 11, 2020 · 0 comments · May be fixed by #266
Assignees
Labels
enhancement New feature or request

Comments

@deepanjan90
Copy link
Contributor

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 initializer
  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
@deepanjan90 deepanjan90 added the enhancement New feature or request label Mar 11, 2020
@deepanjan90 deepanjan90 self-assigned this Mar 11, 2020
@deepanjan90 deepanjan90 linked a pull request Mar 24, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants