- #345: Add
Node#loc_is?
for easier test of locations. (@marcandre)
- #343: Add
StrNode#single_quoted?
,StrNode#double_quoted?
andStrNode#percent_literal?
to simplify checking for string delimiters. (@dvandersluis)
- #340: Handle anonymous splats in
MlhsNode
. (@earlopain)
- #339: Do not emit a deprecation warning for
EnsureNode#body
to give RuboCop a chance to update its usage.EnsureNode#body
will still be changed in the next major version ofrubocop-ast
. (@earlopain)
- #337: Deprecate
EnsureNode#body
in favour ofEnsureNode#branch
.EnsureNode#body
will be redefined in the next major version of rubocop-ast. (@dvandersluis)
- #333: Add
BeginNode
forkwbegin
nodes. (@dvandersluis)
- #333: Add
EnsureNode#rescue_node
method. (@dvandersluis)
- #329: Add
Node#type?
to reduce complexity of checking against multiple node types. (@dvandersluis) - #330: Extend
Node#const_name
tocasgn
nodes. (@dvandersluis)
- #331: [Fix #331] Fix crash in
OpAsgnNode#name
when the lhs is asend
orcsend
node. (@dvandersluis)
- #326: Introduce
lhs
andrhs
aliases to assignment nodes for consistency. (@dvandersluis)
- #325: Allow
non_bare_access_modifier_declaration?
to handle modifiers with multiple arguments. (@dvandersluis)
- #203: Add classes for
masgn
andmlhs
nodes. (@dvandersluis) - #204: Add
VarNode
class forlvar
,ivar
,cvar
andgvar
node types. (@dvandersluis)
- #310: Fix
RuboCop::AST::DefNode#void_context?
to handle class methods calledinitialize
. ([@vlad-pisanov][])
- #309: Mark
RuboCop::AST::EnsureNode
as being in a void context. (@earlopain)
- #289: Fix an error during parsing when encountering unknown encodings in the encoding magic comment. (@Earlopain)
- #286: Improve error message for invalid
parser_engine
value. (@Earlopain)
- #277: Support Prism as a Ruby parser (experimental). (@koic)
- #276: Support
Parser::Ruby34
for Ruby 3.4 parser (experimental). (@koic)
- #279: (Compatibility) Drop Ruby 2.6 runtime support. (@koic)
- #272: Make
Node#left_curly_brace?
aware of lambda brace. (@koic)
- #270: Add
BlockNode#{first,last}_argument
helpers. (@sambostock)
- #262: Introduce RuboCop::Ast::MethodDispatchNode#selector. (@gsamokovarov)
- #255: Make
Node#class_constructor?
aware of Ruby 3.2'sData.define
. (@koic) - #255: Make
Node#class_construcor?
aware of Ruby 2.7's numbered parameters. (@koic)
- #237 Fix
#macro?
for numblock nodes (@gsamokovarov)
- #235: Add
regexp_dots?
method toRuboCop::AST::Token
(erroneously released in 1.19.0 asregexp_dot?
). (@koic)
- Fix
:&
parsing (@zverok)
- #208: Update
MethodDispatchNode#block_literal?
to return true fornumblock
s. (@dvandersluis)
- #201: Add discrete node classes for assignments. (@dvandersluis)
- #197: [Fix #184] Fix
Node#parent_module_name
forsclass
nodes. (@dvandersluis)
- #195: Move
ProcessedSource#sorted_tokens
to be a public method. (@dvandersluis)
- Escape References in Documentation, partially addressing rubocop/rubocop#9150. (@wcmonty)
- #171: Add
SendNode#def_modifier
that returns thedef
node it modifies, ornil
. (@marcandre) - #186: Add
pattern
method forAST::InPatternNode
node. (@koic)
- #179: Have
ast_with_comments
distinguish nodes with same content. (@marcandre)
- #167: Fix
#value
fordstr
nodes to return the actual string value. (@dvandersluis)
- #162: Improve compatibility with
parser
3.0. Turn onemit_match_pattern
switch. (@marcandre)
- #156: NodePattern now considers constant names to refer to constants (instead of predicate
#Example_type?
). (@marcandre)
- #154: Add
ArgNode
andProcarg0Node
("modern" mode), and addArgsNode#argument_list
to get only argument type nodes. (@dvandersluis)
- #155: Enable
BlockNode#argument_list
fornumblock
s. (@dvandersluis) - #154: Add
BlockNode#argument_list
andBlockNode#argument_names
. (@dvandersluis) - #147:
def_node_pattern
anddef_node_search
now return the method name. (@marcandre)
- #146: Fix
IfNode#branches
to return both branches when called on ternary conditional. (@fatkodima)
- #144: NodePattern: allow method calls on constants. (@marcandre)
- #141: Make
SendNode#macro?
andRuboCop::AST::Node#class_constructor?
aware of struct constructor andRuboCop::AST::Node#struct_constructor?
is deprecated. (@koic) - #142: Only traverse send nodes in
MethodDispatchNode#def_modifier?
. (@eugeneius)
- None since 0.8; official 1.0 release coinciding with RuboCop 1.0 and API considered stable. (@marcandre)
- #49: Add
DefNode#endless?
(Ruby 3.0). (@marcandre) - #117: Future-proof
AST::Traversal
by detecting unknownNode
types. (@marcandre) - #131: Add rake tasks to merge and create Changelog entries. (@marcandre)
- #117: All nodes of
break
andnext
are now traversed. (@marcandre)
- #127: Fix dependency issue for JRuby. (@marcandre)
- #105:
NodePattern
compiler complete rewrite. Add support for multiple variadic terms. (@marcandre) - #109: Add
NodePattern
debugging rake tasks:test_pattern
,compile
,parse
. See also this app (@marcandre) - #110: Add
NodePattern
support for multiple terms unions. (@marcandre) - #111: Optimize some
NodePattern
s by usingSet
s. (@marcandre) - #112: Add
NodePattern
support for Regexp literals. (@marcandre)
- #22: (Potentially breaking) Most constants are now private, the rest are converted to Sets and meant to be private. (@marcandre)
- #120: (Potentially breaking) Fix false positives and negatives for
SendNode#macro?
. This impacts{non_}bare_access_modifier?
andspecial_access_modifier?
. (@marcandre)
- #122: Add
Node#parent?
andNode#root?
. (@marcandre)
- #116: Fix issues with tokens being sometimes misordered. (@fatkodima)
- #115: Fix
ConstNode#absolute?
when the constant is not namespaced. (@dvandersluis)
- #92: Add
ProcessedSource#tokens_within
,ProcessedSource#first_token_of
andProcessedSource#last_token_of
. (@fatkodima) - #88: Add
RescueNode
. AddResbodyNode#exceptions
andResbodyNode#branch_index
. (@fatkodima) - #89: Support right hand assignment for Ruby 2.8 (3.0) parser. (@koic)
- #93: Add
Node#{left|right}_sibling{s}
(@marcandre) - #99: Add
ConstNode
and some helper methods. (@marcandre)
- #94: In Ruby 2.4,
Set#===
is harmonized with Ruby 2.5+ to callinclude?
. (@marcandre) - #91: (Potentially breaking)
Node#arguments
always returns a frozen array (@marcandre)
- #70: Add
NextNode
(@marcandre) - #85: Add
IntNode#value
andFloatNode#value
. (@fatkodima) - #82:
NodePattern
: Allow comments (@marcandre) - #83: Add
ProcessedSource#comment_at_line
(@marcandre) - #83: Add
ProcessedSource#each_comment_in_lines
(@marcandre) - #84: Add
Source::Range#line_span
(@marcandre) - #87: Add
CaseNode#branches
(@marcandre)
- #70: Fix arguments processing for
BreakNode
(@marcandre) - #70: (Potentially breaking)
BreakNode
andReturnNode
no longer includeMethodDispatchNode
. These methods were severely broken (@marcandre)
- #44: (Breaking) Use
parser
flagself.emit_forward_arg = true
by default. (@marcandre) - #86:
PairNode#delimiter
andinverse_delimiter
now accept their argument as a named argument. (@marcandre) - #87: (Potentially breaking) Have
IfNode#branches
return anil
value if source haselse; end
(@marcandre) - #72: (Potentially breaking)
SuperNode/DefinedNode/YieldNode#arguments
now return a frozen array. (@marcandre)
- #50: Support find pattern matching for Ruby 2.8 (3.0) parser. (@koic)
- #55: Add
ProcessedSource#line_with_comment?
. (@marcandre) - #63: NodePattern now supports patterns as arguments to predicate and functions. (@marcandre)
- #64: Add
Node#global_const?
. (@marcandre) - #28: Add
struct_constructor?
,class_definition?
andmodule_definition?
matchers. (@tejasbubane)
- #55: Fix
ProcessedSource#commented?
for multi-line ranges. Renamedcontains_comment?
(@marcandre) - #69: (Potentially breaking)
RetryNode
has many errors. It is now aNode
. (@marcandre)
- #36: Add
post_condition_loop?
andloop_keyword?
forNode
. (@fatkodima) - #38: Add helpers allowing to check whether the method is a nonmutating operator method or a nonmutating method of several core classes. (@fatkodima)
- #37: Add
enumerable_method?
forMethodIdentifierPredicates
. (@fatkodima) - #4: Add
interpolation?
forRegexpNode
. (@tejasbubane) - #20: Add option predicates for
RegexpNode
. (@owst) - #11: Add
argument_type?
method to make it easy to recognize argument nodes. (@tejasbubane) - #31: NodePattern now uses
param === node
to match params, which allows Regexp, Proc, Set in addition to Nodes and literals. (@marcandre) - #41: Add
delimiters
and related predicates forRegexpNode
. (@owst) - #46: Basic support for non-legacy AST output from parser. Note that there is no support (yet) in main RuboCop gem. Expect
emit_forward_arg
to be set totrue
in v1.0 (@marcandre) - #48: Support
Parser::Ruby28
for Ruby 2.8 (3.0) parser (experimental). (@koic) - #35: NodePattern now accepts
%named_param
and%CONST
. The macrosdef_node_matcher
anddef_node_search
accept default named parameters. (@marcandre)
- #7: Classes
NodePattern
,ProcessedSource
andToken
moved toAST::NodePattern
, etc. Therubocop
gem has aliases to ensure compatibility. (@marcandre) - #7:
AST::ProcessedSource.from_file
now raises aErrno::ENOENT
instead of aRuboCop::Error
. (@marcandre)
- Perf #106: Fix RegexpNode#to_regexp where option is 'o' + any other. (@marcandre)
- Define
RuboCop::AST::Version::STRING
. (@marcandre)
- Gem extracted from RuboCop. (@marcandre)