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

More complete parsing support for functions. #475

Merged
merged 3 commits into from
Apr 22, 2021
Merged

More complete parsing support for functions. #475

merged 3 commits into from
Apr 22, 2021

Conversation

zygoloid
Copy link
Contributor

This adds support for parsing function parameters, function return types, and return statements.

Depends on #473.

@zygoloid zygoloid requested a review from fowles April 19, 2021 22:51
@zygoloid zygoloid requested a review from a team as a code owner April 19, 2021 22:51
@google-cla google-cla bot added the cla: yes PR meets CLA requirements according to bot. label Apr 19, 2021
@github-actions github-actions bot added dependent Depends on another issue/PR and removed dependent Depends on another issue/PR labels Apr 19, 2021
@github-actions
Copy link

🎉 Great news! Looks like all the dependencies have been resolved:

💡 To add or remove a dependency please update this issue/PR description.

Brought to you by Dependent Issues (:robot: ). Happy coding!

parser/parse_tree_test.cpp Show resolved Hide resolved
parser/parser_impl.cpp Outdated Show resolved Hide resolved
parser/parser_impl.cpp Outdated Show resolved Hide resolved
parser/parser_impl.cpp Show resolved Hide resolved
parser/parser_impl.cpp Show resolved Hide resolved
parser/parser_impl.cpp Show resolved Hide resolved
has_errors);
});

auto start_return_type = StartSubtree();
Copy link

Choose a reason for hiding this comment

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

I am a bit confused here. If there is no arrow, do we not need to close the subtree in some way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think StartSubtree is perhaps not well-named; it just tracks a location where we could start a subtree. It's really just a stable handle to a location in the tree currently being built. Happy to rename. Something like GetPossibleSubtreeStartLocation but less wordy perhaps?

Copy link

Choose a reason for hiding this comment

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

I would appreciate that follow up

parser/parser_impl.h Outdated Show resolved Hide resolved
@zygoloid zygoloid merged commit 73b8db6 into carbon-language:trunk Apr 22, 2021
@zygoloid zygoloid deleted the parser-func-params branch March 11, 2022 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes PR meets CLA requirements according to bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants