-
Notifications
You must be signed in to change notification settings - Fork 14
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
Introduce a Q::Compunit type #20
Comments
Or, better yet, instead of putting a root |
masak
pushed a commit
that referenced
this issue
Oct 8, 2015
Conceptually, a Q::Compunit has to be the root of any valid program. Q::Compunit is a kind of Q::Statement::Block (in that it's this "invisible block" that surrounds the whole compilation unit). But since it's not an *actual* block, it felt wrong for Q::Statement::Block to consist of a Q::Literal::Block, as it used to. Refactored it to consist of a Q::Statements instead. Since we still want a block to actually be there, a little more manual work now falls on the clients of Q::Statement::Block to create and enter one. Addresses #20 but doesn't close it yet, because we've yet to move the static lexpads up one level, which is possible now that we have the compunit outermost level.
Fun historical fact: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Q::Compunit
would basically be very similar toQ::Literal::Block
.Right now the compunit is added at the last moment as the program is run.
Also, the
Q::Statements
type gets to hold the static lexpads, simply because there's no higher level to put it because we're missing a root level above statements to hang it on.The AST tests would all need to be modified, but in a very mechanical fashion.
Q::CompUnit
The text was updated successfully, but these errors were encountered: