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

Split out and/or operator handling from infix. #3480

Merged
merged 2 commits into from
Dec 9, 2023

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Dec 8, 2023

This is also doing the parse node split, allowing lower reliance in formatter on the tokenized buffer (something that I may be touching more due to import handling).

Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

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

Sure, seems reasonable, and I like that the formatter doesn't need to look at tokens any more.

@@ -488,7 +493,7 @@ CARBON_PARSE_STATE(ExprLoop)
// Completes an ExprLoop pass by adding an infix operator, then goes back
// to ExprLoop.
//
// expr <binary operator> expr ...
// expr <infix operator> expr ...
// ^
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// ^
// ^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -471,7 +471,7 @@ CARBON_PARSE_STATE(ExprInPostfixLoop)

// Handles processing of an expression.
//
// expr <binary operator> ...
// expr <infix operator> ...
// ^~~~~~~~~~~~~~~~~
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// ^~~~~~~~~~~~~~~~~
// ^~~~~~~~~~~~~~~~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 483 to 484
// expr <short circuit operator> ...
// ^~~~~~~~~~~~~~~~~
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// expr <short circuit operator> ...
// ^~~~~~~~~~~~~~~~~
// expr <short circuit operator> ...
// ^~~~~~~~~~~~~~~~~~~~~~~~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 512 to 513
// expr <short circuit operator> expr ...
// ^
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this here:

Suggested change
// expr <short circuit operator> expr ...
// ^
// expr <short circuit operator> expr ...
// ^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jonmeow jonmeow added this pull request to the merge queue Dec 9, 2023
Merged via the queue into carbon-language:trunk with commit c4864aa Dec 9, 2023
6 checks passed
@jonmeow jonmeow deleted the and-or branch December 9, 2023 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants