rubocop-ast 0.5.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubocop/ast.rb +17 -0
- data/lib/rubocop/ast/builder.rb +1 -0
- data/lib/rubocop/ast/node.rb +44 -125
- data/lib/rubocop/ast/node/array_node.rb +1 -0
- data/lib/rubocop/ast/node/block_node.rb +1 -0
- data/lib/rubocop/ast/node/def_node.rb +5 -0
- data/lib/rubocop/ast/node/keyword_splat_node.rb +1 -0
- data/lib/rubocop/ast/node/mixin/collection_node.rb +1 -0
- data/lib/rubocop/ast/node/mixin/descendence.rb +116 -0
- data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +2 -0
- data/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +9 -0
- data/lib/rubocop/ast/node/mixin/numeric_node.rb +1 -0
- data/lib/rubocop/ast/node/mixin/predicate_operator_node.rb +7 -3
- data/lib/rubocop/ast/node/pair_node.rb +4 -0
- data/lib/rubocop/ast/node/regexp_node.rb +9 -4
- data/lib/rubocop/ast/node_pattern.rb +44 -870
- data/lib/rubocop/ast/node_pattern/builder.rb +72 -0
- data/lib/rubocop/ast/node_pattern/comment.rb +45 -0
- data/lib/rubocop/ast/node_pattern/compiler.rb +104 -0
- data/lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb +56 -0
- data/lib/rubocop/ast/node_pattern/compiler/binding.rb +78 -0
- data/lib/rubocop/ast/node_pattern/compiler/debug.rb +168 -0
- data/lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb +146 -0
- data/lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb +420 -0
- data/lib/rubocop/ast/node_pattern/compiler/subcompiler.rb +57 -0
- data/lib/rubocop/ast/node_pattern/lexer.rb +70 -0
- data/lib/rubocop/ast/node_pattern/lexer.rex +39 -0
- data/lib/rubocop/ast/node_pattern/lexer.rex.rb +182 -0
- data/lib/rubocop/ast/node_pattern/method_definer.rb +143 -0
- data/lib/rubocop/ast/node_pattern/node.rb +275 -0
- data/lib/rubocop/ast/node_pattern/parser.racc.rb +470 -0
- data/lib/rubocop/ast/node_pattern/parser.rb +66 -0
- data/lib/rubocop/ast/node_pattern/parser.y +103 -0
- data/lib/rubocop/ast/node_pattern/sets.rb +37 -0
- data/lib/rubocop/ast/node_pattern/with_meta.rb +111 -0
- data/lib/rubocop/ast/processed_source.rb +5 -1
- data/lib/rubocop/ast/traversal.rb +149 -172
- data/lib/rubocop/ast/version.rb +1 -1
- metadata +37 -3
data/lib/rubocop/ast/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-ast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parser
|
@@ -46,6 +46,20 @@ dependencies:
|
|
46
46
|
- - "<"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '3.0'
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rubocop-rspec
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.0'
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.0'
|
49
63
|
description: " RuboCop's Node and NodePattern classes.\n"
|
50
64
|
email: rubocop@googlegroups.com
|
51
65
|
executables: []
|
@@ -89,6 +103,7 @@ files:
|
|
89
103
|
- lib/rubocop/ast/node/mixin/binary_operator_node.rb
|
90
104
|
- lib/rubocop/ast/node/mixin/collection_node.rb
|
91
105
|
- lib/rubocop/ast/node/mixin/conditional_node.rb
|
106
|
+
- lib/rubocop/ast/node/mixin/descendence.rb
|
92
107
|
- lib/rubocop/ast/node/mixin/hash_element_node.rb
|
93
108
|
- lib/rubocop/ast/node/mixin/method_dispatch_node.rb
|
94
109
|
- lib/rubocop/ast/node/mixin/method_identifier_predicates.rb
|
@@ -115,6 +130,25 @@ files:
|
|
115
130
|
- lib/rubocop/ast/node/while_node.rb
|
116
131
|
- lib/rubocop/ast/node/yield_node.rb
|
117
132
|
- lib/rubocop/ast/node_pattern.rb
|
133
|
+
- lib/rubocop/ast/node_pattern/builder.rb
|
134
|
+
- lib/rubocop/ast/node_pattern/comment.rb
|
135
|
+
- lib/rubocop/ast/node_pattern/compiler.rb
|
136
|
+
- lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb
|
137
|
+
- lib/rubocop/ast/node_pattern/compiler/binding.rb
|
138
|
+
- lib/rubocop/ast/node_pattern/compiler/debug.rb
|
139
|
+
- lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb
|
140
|
+
- lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb
|
141
|
+
- lib/rubocop/ast/node_pattern/compiler/subcompiler.rb
|
142
|
+
- lib/rubocop/ast/node_pattern/lexer.rb
|
143
|
+
- lib/rubocop/ast/node_pattern/lexer.rex
|
144
|
+
- lib/rubocop/ast/node_pattern/lexer.rex.rb
|
145
|
+
- lib/rubocop/ast/node_pattern/method_definer.rb
|
146
|
+
- lib/rubocop/ast/node_pattern/node.rb
|
147
|
+
- lib/rubocop/ast/node_pattern/parser.racc.rb
|
148
|
+
- lib/rubocop/ast/node_pattern/parser.rb
|
149
|
+
- lib/rubocop/ast/node_pattern/parser.y
|
150
|
+
- lib/rubocop/ast/node_pattern/sets.rb
|
151
|
+
- lib/rubocop/ast/node_pattern/with_meta.rb
|
118
152
|
- lib/rubocop/ast/processed_source.rb
|
119
153
|
- lib/rubocop/ast/rubocop_compatibility.rb
|
120
154
|
- lib/rubocop/ast/sexp.rb
|
@@ -145,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
179
|
- !ruby/object:Gem::Version
|
146
180
|
version: '0'
|
147
181
|
requirements: []
|
148
|
-
rubygems_version: 3.1.
|
182
|
+
rubygems_version: 3.1.4
|
149
183
|
signing_key:
|
150
184
|
specification_version: 4
|
151
185
|
summary: RuboCop tools to deal with Ruby code AST.
|