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

Make type/method-type parser more flexible about input position #1140

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Nov 7, 2022

  • It now accepts parsing from the middle of the input buffer
  • It now accepts non-eof token after parsing a type/method-type

So we can parse a type from the middle of the input.

RBS::Parser.parse_type("() -> void () -> String", range: 6...10)   # Returns `void`

If range keyword is given, it parses the input with the new behavior. If range is not given, it parses as the previous version -- assumes the type/method-type starts from the beginning of the input and eof is required after the type/method-type.

* It now accepts parsing from the middle of the input buffer
* It now accepts non-eof token after parsing a type/method-type
@soutaro soutaro added this to the RBS 2.8.0 milestone Nov 7, 2022
@soutaro soutaro merged commit 0011dd9 into master Nov 7, 2022
@soutaro soutaro deleted the partial-parser branch November 7, 2022 03:53
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.

None yet

1 participant