Releases: ruby/prism
Releases · ruby/prism
v1.9.0
Added
- Lots of work on the Ripper translation layer to make it more compatible and efficient.
- Alias
Prism::Node#breadth_first_searchtoPrism::Node#find. - Add
Prism::Node#breadth_first_search_all/Prism::Node#find_allfor finding all nodes matching a condition.
Changed
- Fixed location of opening tokens when invalid syntax is parsed.
- Fix RBI for parsing options.
v1.8.0
Added
- Optimize ruby visitor.
- Report unterminated construct errors at opening token.
Changed
- Correctly expose ripper state.
- Use one file for versioned parser classes.
- Fix denominator of rational float literal.
- Decouple ripper translator from ripper library.
- Sync Prism::Translation::ParserCurrent with Ruby 4.0.
v1.7.0
Added
- Support
4.1as a version option. - Add
equal_loctoCallNode. - Add
len()/is_empty()toConstantListandNodeListin the Rust API.
Changed
- Rename version
3.5to version4.0. - Fix compiling the gem from source on Windows.
- Fix parsing of unary method calls like
42.~@. - Reject
def f a, (b) = 1. - Reject endless method as a block parameter default.
- Reject variable capture in alternative pattern.
- Many fixes in regards to memory safety, found through fuzzing.
- Many fixes to better handle invalid syntax, also found through fuzzing.
- Fix the ruby version used by the
rippertranslator. - Fix
ruby_parsertranslation comment processing.
v1.6.0
v1.5.2
v1.5.1
v1.5.0
Added
- Add
Prism::Translation::ParserCurrent. - Add
Integer::to_u32_digitsfor the Rust API. - Add
pm_comment_type_tfield for the Rust API. - Support leading logical operators for CRuby 3.5+.
Changed
- Mark Prism as ractor-safe.
- Enforce a minimum version for the parser translation layer.
- Many fixes to the parser translation layer.
- Accept a newline after the
defined?keyword. - Reject
true && not true. - Make
it = itassign nil to match parse.y behavior [Bug #21139]. - Some fixes to the ruby parser translation layer.
- Ensure call nodes have the correct ending location.
- Reject
foo && return bar.
v1.4.0
Added
- Support
3.5as a version option. - Many, many compatibility fixes for the parser translation layer.
- Handle escapes in named capture names.
- The
freezeoption is added to the variousPrism::APIs to deeply freeze the AST. - Properly support
itfor the parser and ruby_parser translation layers. - Track the
thenkeyword onrescuenodes. - Add a
multiple_statements?flag to parentheses nodes to support desireddefined?behavior.
Changed
- The strings used in the AST are now frozen.
- Fixed handling escaped characters after control sequences in character literals.
- Fix reading off the end of an unterminated global variable.
- Raise a syntax error for defining
[]=with endless method syntax. - Increase value of
PRISM_DEPTH_MAXIMUMto10000. - Freeze
Prism::VERSION. - Fix up rescue modifier precedence.
v1.3.0
Added
- Introduce
Prism::StringQuery. - Introduce
Prism::Relocation. - Track
dokeyword forWhileNodeandUntilNode. - Change the way the gem is built to rely on
mkmfinstead ofmake. - Lots more documentation on node fields.
Changed
- Properly add an error for
def @foo; end. - Properly add an error for
foo(**, *). - Fix up regression in string parsing in
RubyParsertranslation. - Reject invalid dot method call after match expression.
- Reject invalid operator after match expression.
- Fix up %-literals delimited by newlines.
- Properly add an error for
-> { _1; -> { _1 } }. - Reject blocks and keywords in index writes.
v1.2.0
Added
- Introduce
Prism::CodeUnitsCache.
Changed
- Properly handle lexing global variables that begin with
$-. - Properly reject invalid multi writes within parentheses.
- Fix unary
*binding power. - Set
contains_keywordsflag for implicitgetscalls when-pis used. - Properly reject invalid non-associative operator patterns.
- Do not warn about unused variables declared on negative lines.