Skip to content

Add support for N_Block_Statement node #156

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

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

sonodtt
Copy link
Contributor

@sonodtt sonodtt commented Mar 12, 2019

Support for nested declares.

NB nested functions are not yet supported but nested declares in nested functions have been considered in this context.

Shortly to appear: a Github issue w.r. to nested functions - that in the scenario shown in the test-case of this PR, appear to work out of the box (by accessing outer scope variables directly from the symbol table). We should try a few more scenarios to fully assess support for nested functions.

@@ -5110,7 +5124,7 @@ package body Tree_Walk is
Append_Op (Block, Do_Loop_Statement (N));

when N_Block_Statement =>
Warn_Unhandled_Construct (Statement, "block");
Append_Op (Block, Do_N_Block_Statement (N));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not append do_subprogram_or_block directly?

Copy link
Contributor Author

@sonodtt sonodtt Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interface. Wrapper. Consistent with others. If impl. changes in future, has further checks etc - then this does not change, and the (consistent) structure is in place. Also the wrapper function has space for ... comments!

Copy link
Contributor

@xbauch xbauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Contributor

@NlightNFotis NlightNFotis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonodtt sonodtt force-pushed the N_Block_Statement_node_support branch from 9b95511 to 9900266 Compare March 18, 2019 20:22
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.

3 participants