Skip to content
  • Earlopain's avatar
    ab8b199b
    [ruby/prism] Add `Prism::Translation::ParserCurrent` · ab8b199b
    Earlopain authored
    It's not my favorite api but for users that currently use the same thing
    from `parser`, moving over is more difficult
    than it needs to be.
    
    If you plan to support both old and new ruby versions, you definitly need to
    branch somewhere on the ruby version
    to either choose prism or parser.
    But with prism you then need to enumerate all the versions again and choose the correct one.
    
    Also, don't recommend to use `Prism::Translation::Parser` in docs. It's version-less
    but actually always just uses Ruby 3.4 which is probably
    not what the user intended.
    
    Note: parser also warns when the patch version doesn't match what it expects. But I don't think prism has such a concept,
    and anyways it would require releases anytime ruby releases, which I don't think is very desirable
    
    https://github.com/ruby/prism/commit/77177f9e92
    ab8b199b
    [ruby/prism] Add `Prism::Translation::ParserCurrent`
    Earlopain authored
    It's not my favorite api but for users that currently use the same thing
    from `parser`, moving over is more difficult
    than it needs to be.
    
    If you plan to support both old and new ruby versions, you definitly need to
    branch somewhere on the ruby version
    to either choose prism or parser.
    But with prism you then need to enumerate all the versions again and choose the correct one.
    
    Also, don't recommend to use `Prism::Translation::Parser` in docs. It's version-less
    but actually always just uses Ruby 3.4 which is probably
    not what the user intended.
    
    Note: parser also warns when the patch version doesn't match what it expects. But I don't think prism has such a concept,
    and anyways it would require releases anytime ruby releases, which I don't think is very desirable
    
    https://github.com/ruby/prism/commit/77177f9e92
Loading