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

Const tuple unpacking #9964

Merged
merged 4 commits into from
Dec 19, 2018
Merged

Const tuple unpacking #9964

merged 4 commits into from
Dec 19, 2018

Conversation

nc-x
Copy link
Contributor

@nc-x nc-x commented Dec 13, 2018

Fixes #6355

While this works for all the cases I tried, there may still be bugs.
Review carefully.

eat(p, tkEquals)
optInd(p, result)
addSon(result, parseExpr(p))
indAndComment(p, result)

proc parseConstant(p: var TParser): PNode =
#| constant = identWithPragma (colon typeDesc)? '=' optInd expr indAndComment
Copy link
Member

Choose a reason for hiding this comment

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

This comment describes the grammar rule and stopped reflecting reality. ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also the grammar needs to be written for constTuple

But since I have no idea about EBNF, I leave this to you 😄

@Araq Araq merged commit 8e90ed0 into nim-lang:devel Dec 19, 2018
@nc-x nc-x deleted the const-tuple-unpacking branch December 19, 2018 10:28
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