Skip to content

Commit

Permalink
Support find pattern for pattern matching syntax
Browse files Browse the repository at this point in the history
This PR Support find pattern matching for Ruby 2.8 (3.0) parser.
Parser gem supports this syntax by whitequark/parser#714.
  • Loading branch information
koic committed Jun 26, 2020
1 parent fe41cd6 commit 3176d68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@
* [#46](https://github.com/rubocop-hq/rubocop-ast/pull/46): Basic support for [non-legacy AST output from parser](https://github.com/whitequark/parser/#usage). Note that there is no support (yet) in main RuboCop gem. ([@marcandre][])
* [#48](https://github.com/rubocop-hq/rubocop-ast/pull/48): Support `Parser::Ruby28` for Ruby 2.8 (3.0) parser. ([@koic][])
* [#35](https://github.com/rubocop-hq/rubocop-ast/pull/35): NodePattern now accepts `%named_param` and `%CONST`. The macros `def_node_pattern` and `def_node_search` accept default named parameters. ([@marcandre][])
* [#50](https://github.com/rubocop-hq/rubocop-ast/pull/50): Support find pattern matching for Ruby 2.8 (3.0) parser. ([@koic][])

## 0.0.3 (2020-05-15)

Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/ast/traversal.rb
Expand Up @@ -34,7 +34,7 @@ def walk(node)
match_with_lvasgn begin kwbegin return
in_match match_alt
match_as array_pattern array_pattern_with_tail
hash_pattern const_pattern
hash_pattern const_pattern find_pattern
index indexasgn].freeze
SECOND_CHILD_ONLY = %i[lvasgn ivasgn cvasgn gvasgn optarg kwarg
kwoptarg].freeze
Expand Down

0 comments on commit 3176d68

Please sign in to comment.