Skip to content

v0.19.0

Compare
Choose a tag to compare
@kddnewton kddnewton released this 14 Dec 20:10
· 1691 commits to main since this release
53ef1e8

Added

  • ArrayNode now has a contains_splat? flag if it has a splatted element in it.
  • All of the remaining encodings have been implemented.
  • Allow forwarding & in a method that has a ... parameter.
  • Many statements that are found in non-statement positions are being properly rejected now.
  • Void values are now properly checked.
  • Referencing a parameter in its own default value is now properly rejected.
  • DATA/__END__ is now parsed as its own field on parse result (data_loc) as opposed to as a comment.
  • Blank * now properly forwards into arrays.
  • ImplicitRestNode is introduced to represent the implicit rest of a destructure.
  • We now support negative start lines.
  • StringNode#heredoc?, InterpolatedStringNode#heredoc?, XStringNode#heredoc?, and InterpolatedXStringNode#heredoc? are introduced.
  • NumberedParametersNode is introduced to represent the implicit set of parameters when numbered parameters are used.
  • Prism::parse_success? and Prism::parse_failure? are introduced to bypass reifying the AST.
  • We now emit a warning for constant assignments in method definitions.
  • We now provide flags on strings and xstrings to indicate the correct encoding.
  • The hash pattern rest field now more accurately parses ** and **nil.
  • The equality operators are now properly parsed as non-associative.

Changed

  • BREAKING: Many fields have changed positions within their nodes. This impacts the C API and the Ruby API if you are manually creating nodes through the initializer.
  • BREAKING: Almost all of the error messages have been updated to begin with lowercase characters to match ruby/spec.
  • Unterminated strings with only plain content are now always StringNode as opposed to InterpolatedStringNode
  • BREAKING: Call node has been split up when it is in the target position into CallTargetNode and IndexTargetNode.