Skip to content

Enforce variable scoping#266

Open
deepanjan90 wants to merge 8 commits intomasterfrom
feature/variable-scoping
Open

Enforce variable scoping#266
deepanjan90 wants to merge 8 commits intomasterfrom
feature/variable-scoping

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