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

Reuse operation rule for operation2 rule in parse.y #5545

Merged

Conversation

S-H-GAMELINKS
Copy link
Contributor

In parse.y, operation and operation2 pattern rule has similar pattern.

operation	: tIDENTIFIER
		| tCONSTANT
		| tFID
		;
operation2	: tIDENTIFIER
		| tCONSTANT
		| tFID
		| op
		;

It may be more simpler to reuse operation rule.

operation	: tIDENTIFIER
		| tCONSTANT
		| tFID
		;

operation2	: operation
		| op
		;

@nobu nobu merged commit e6b537e into ruby:master Feb 12, 2022
@S-H-GAMELINKS S-H-GAMELINKS deleted the reuse_operation_rule_in_operation2_rule branch February 12, 2022 05:25
koic added a commit to koic/parser that referenced this pull request Feb 16, 2022
koic added a commit to koic/parser that referenced this pull request Feb 16, 2022
iliabylich pushed a commit to whitequark/parser that referenced this pull request Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants