summaryrefslogtreecommitdiff
path: root/lib/prism/prism.gemspec
AgeCommit message (Collapse)Author
2025-12-08Bump Prism to v1.5.2Takashi Kokubun
[Backport #21187]
2025-09-13Bump Prism version to 1.5.1 (#14549)Takashi Kokubun
2025-09-12Bump Prism version to 1.5.0Takashi Kokubun
2025-08-27Bump PRISM version number to avoid collision with RubyGems versionAlan Wu
2024-12-16[ruby/prism] Bump to v1.2.0Kevin Newton
https://github.com/ruby/prism/commit/817a8e39d9 Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16[ruby/prism] Bump to v1.1.0Kevin Newton
https://github.com/ruby/prism/commit/f80026883d Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
2024-10-11[ruby/prism] Prism::StringQueryKevin Newton
Introduce StringQuery to provide methods to access some metadata about the Ruby lexer. https://github.com/ruby/prism/commit/d3f55b67b9
2024-08-29[ruby/prism] Remove deprecated lib/prism/translation/parser/rubocop.rb fileKoichi ITO
Follow up https://github.com/ruby/prism/pull/2558. This PR removes deprecated lib/prism/translation/parser/rubocop.rb file. The file was a workaround to allow setting `TargetRubyVersion: 80_82_73_83_77.xx` until Prism (`Prism::Translation::Parser`) is integrated into RuboCop. RuboCop already supports Prism (`Prism::Translation::Parser`) as of https://github.com/rubocop/rubocop/pull/12724. It has been several months since the file was deprecated in ruby/prism#2558. And, yesterday, Prism 1.0.0 was released, but perhaps the file should have been removed before then. Although this might be seen as incompatible with semver 1.0.0, I think there is no longer a reason to keep the file. https://github.com/ruby/prism/commit/646a10270e
2024-08-28[PRISM] Sync version updateKevin Newton
2024-07-11[ruby/prism] Various cleanup for initializers and typechecksKevin Newton
https://github.com/ruby/prism/commit/86cf82794a
2024-07-11[ruby/prism] Move Node#type and Node::type documentationKevin Newton
https://github.com/ruby/prism/commit/08a71f6259
2024-06-07Sync prism version to latestKevin Newton
2024-06-05[ruby/prism] Remove unused string list structKevin Newton
https://github.com/ruby/prism/commit/36c6851c85
2024-05-24[ruby/prism] Remove Debug moduleKevin Newton
https://github.com/ruby/prism/commit/4d8929ff6a
2024-05-10[PRISM] Bump to version 0.29.0Kevin Newton
2024-05-10[ruby/prism] Fix RBS outside of prismKevin Newton
https://github.com/ruby/prism/commit/ee73ad757f
2024-05-08[PRISM] Sync prism version bumpKevin Newton
2024-05-03[ruby/prism] Prism::Location#adjoinKevin Newton
https://github.com/ruby/prism/commit/a298db68e3
2024-05-03[ruby/prism] Remove generics from sorbet typesKevin Newton
https://github.com/ruby/prism/commit/080d84fd03
2024-04-26[ruby/prism] Bump to v0.27.0Kevin Newton
https://github.com/ruby/prism/commit/c9edeef91a
2024-04-24[ruby/prism] Change inspect from recursive to a queueKevin Newton
We would previously cause a stack overflow if we parsed a file that was too deeply nested when we were calling inspect. Instead, we now use a queue of commands to do it linearly so we don't. https://github.com/ruby/prism/commit/0f21f5bfe1
2024-04-18[ruby/prism] Bump to v0.26.0Kevin Newton
https://github.com/ruby/prism/commit/eadb09ef36
2024-04-17add #2709’s new RBIs to `.gemspec`ParadoxV5
2024-04-17[ruby/prism] Add a reflection API for determining the fields of a nodeKevin Newton
https://github.com/ruby/prism/commit/f3f9950a74
2024-04-17[ruby/prism] Inline pm_state_stackKevin Newton
2024-04-05[ruby/prism] Bump to v0.25.0Kevin Newton
https://github.com/ruby/prism/commit/4da514456f
2024-03-06[ruby/prism] Move polyfill to separate file to type-check it independently.Ufuk Kayserilioglu
https://github.com/ruby/prism/commit/2a583b041b
2024-03-06[ruby/prism] Update ripper documentationKevin Newton
https://github.com/ruby/prism/commit/34ba70c4f9
2024-03-06[ruby/prism] More closely match the ripper API for ripper translationKevin Newton
https://github.com/ruby/prism/commit/716ee0e91a
2024-03-06[ruby/prism] Fix up lambda ripper translationKevin Newton
https://github.com/ruby/prism/commit/a3156e60cc
2024-03-04[ruby/prism] Include BSDmakefileKevin Newton
https://github.com/ruby/prism/commit/1fe507fe3d
2024-02-29[ruby/prism] Resync RBI and test it in CIKevin Newton
https://github.com/ruby/prism/commit/4ef4032774
2024-02-24[ruby/prism] Replace awkward code changes with steep:ignoreGopal Patel
Also remove RBS for currently ignored files. Will follow-up when those check fully in later PRs. https://github.com/ruby/prism/commit/2cae58f86d
2024-02-24[ruby/prism] Remove Ripper from public RBS, type-assert remaining issuesGopal Patel
https://github.com/ruby/prism/commit/5fda7a0760
2024-02-24[ruby/prism] Split private typesGopal Patel
https://github.com/ruby/prism/commit/0209d093ec
2024-02-24[ruby/prism] Use steep to type check RBS and Ruby filesGopal Patel
https://github.com/ruby/prism/commit/eabed9f4fd
2024-02-23[ruby/prism] Duplicated when clausesKevin Newton
https://github.com/ruby/prism/commit/865b0d5fbe
2024-02-22[ruby/prism] Regenerate snapshots using integer valuesKevin Newton
2024-02-16[ruby/prism] More rescue and ensure; constant handlingNoah Gibbs
https://github.com/ruby/prism/commit/207f579e70
2024-02-15[PRISM] Sync prism version bumpKevin Newton
2024-02-15[ruby/prism] Support multi-versioning for `Prism::Translation::Parser`Koichi ITO
## Summary Fixes https://github.com/ruby/prism/pull/2356. I'm working on integrating Prism into RuboCop. This PR introduces `Prism::Translation::Parser33` and `Prism::Translation::Parser34`, named in accordance with the following comments. https://github.com/rubocop/rubocop/issues/12600#issuecomment-1932707748 Currently, `Prism::Translation::Parser` always operates in Ruby 3.4 mode. This means it will not parse as Ruby 3.3 even if `TargetRubyVersion: 80_82_73_83_77.33` is specified. Therefore, the `it` introduced in Ruby 3.4 is parsed incompatibly with Ruby 3.3. In Ruby 3.3, the expected name for an `lvar` is `:it`, not `:"0it"`. ### Expected AST The following is an expected AST when parsing Ruby 3.3 code: ```console $ bundle exec ruby -rprism -rprism/translation/parser33 -ve "p Prism::Translation::Parser33.parse('items.map { it.do_something }')" ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] s(:block, s(:send, s(:send, nil, :items), :map), s(:args), s(:send, s(:send, nil, :it), :do_something)) ``` ### Actual AST The following is an actual AST when parsing Ruby 3.3 code: ```console $ ruby -rprism -ve "p Prism::Translation::Parser.parse('items.map { it.do_something }')" ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] s(:block, s(:send, s(:send, nil, :items), :map), s(:args), s(:send, s(:lvar, :"0it"), :do_something)) ``` `Prism::Translation::Parser33` and `Prism::Translation::Parser34` aim to correspond to Ruby 3.3 and Ruby 3.4, respectively. And, The hack of specifying `TargetRubyVersion: 80_82_73_83_77.33` is expected to become unnecessary in the future, but the behavior will be maintained until RuboCop's support is finalized: https://github.com/rubocop/rubocop/issues/12600#issuecomment-1933657732 ## Additional Information A private method named `convert_for_prism` is prepared to convert the `version` from Parser to the `version` expected by Prism. For example, a Parser-compatible value is `3.3`, whereas Prism expects `"3.3.0"`. `Parser#version` is not used in RuboCop, but it's unclear how it is utilized in other libraries that rely on the Parser gem. Therefore, logic to maintain compatibility between Parser and Prism is implemented. https://github.com/ruby/prism/commit/62d3991e22
2024-02-14[PRISM] Sync to latest prismKevin Newton
2024-02-12[ruby/prism] ruby_parser translatorKevin Newton
https://github.com/ruby/prism/commit/1925b970c7
2024-02-12[ruby/prism] Move Prism::RipperCompat to Prism::Translation::RipperNoah Gibbs
https://github.com/ruby/prism/commit/c0331abe4f
2024-02-07Bump prism versionKevin Newton
2024-02-07[ruby/prism] Support for Ruby 2.7Kevin Newton
https://github.com/ruby/prism/commit/1a15b70a8e
2024-02-05Sync to latest prismKevin Newton
2024-02-01Sync to latest prismKevin Newton
2024-01-27[ruby/prism] Add parser translationKevin Newton
https://github.com/ruby/prism/commit/8cdec8070c