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

Scope block semantics #49

Open
EltayebAhmed opened this issue May 31, 2017 · 2 comments
Open

Scope block semantics #49

EltayebAhmed opened this issue May 31, 2017 · 2 comments

Comments

@EltayebAhmed
Copy link
Owner

There are currently two entities that track the scope blocks. The

  1. ScopeStack tracks scope blocks explicitly
    2.The LoopSwitchStack tracks scope blocks implicitly (each loop or switch is associated with a scope block)
    These two entities should be combined into a single class that
    A. Tracks scopes for use by variables
    B. Tracks the types of scope (if the scope is a function definition or switch or .......)

N.B. It might make sense to add this functionality to the already existing symbol table && symbol table builder

@EltayebAhmed
Copy link
Owner Author

The body of a loop does not necessarily have to be a scope block.. It could be a simple statement.
Maybe statement semantics are needed. Or maybe we could have different grammar namings for loop body statements

@EltayebAhmed
Copy link
Owner Author

Refs #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant