Skip to content

Conversation

@schneems
Copy link
Collaborator

@schneems schneems commented Dec 4, 2023

Prism will be the parser in Ruby 3.3. We need to support Ruby 3.0+, so we must "dual boot" both prism and Ripper.

Todo:

@schneems schneems force-pushed the schneems/prism-numero-uno-rebased branch 2 times, most recently from aec3e20 to 2b91477 Compare December 4, 2023 22:36
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle ruby/prism#1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism
@schneems schneems force-pushed the schneems/prism-numero-uno-rebased branch from 2b91477 to 7f4176a Compare December 4, 2023 22:44
@schneems schneems marked this pull request as ready for review December 4, 2023 22:44
Removes or updates mentions of Ripper
Before:

```
Expected a newline or semicolon after the statement
Cannot parse the expression
Expected a newline or semicolon after the statement
Cannot parse the expression

   1  describe "webmock tests" do
  22    it "body" do
  27      query = Cutlass::FunctionQuery.new(
> 28        port: port
> 29        body: body
  30      ).call
  34    end
  35  end
```

After:

```
Expected a newline or semicolon after the statement
Cannot parse the expression

   1  describe "webmock tests" do
  22    it "body" do
  27      query = Cutlass::FunctionQuery.new(
> 28        port: port
> 29        body: body
  30      ).call
  34    end
  35  end
```
@schneems
Copy link
Collaborator Author

schneems commented Dec 5, 2023

Consider different/cleaner APIs for separating out Ripper and Prism

I'm not wild about what I've currently got, but it works for now. I don't know what the future of syntax suggest looks like (if it gets ported to live inside of prism or if it's re-written etc.)

The "dual booting" allows us to have compatibility with multiple Ruby versions, but moving forward I want the ability to specialize to only support Prism.

@schneems schneems merged commit 457c1eb into main Dec 5, 2023
@schneems schneems deleted the schneems/prism-numero-uno-rebased branch December 5, 2023 17:51
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.

2 participants