parser 3.2.2.2 → 3.2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7abfac0733b7b27d6cdcdbc658b435ab670f967b8a0f833b556adca39c20576b
4
- data.tar.gz: 7502da81ba926599b739b43bba1d946407b616a5b18f27ca17e205fdaaafa8b7
3
+ metadata.gz: 8565383a05692fe05c5f0962a0cb6c4594ad1eaab98f8e1c8b1053ddfa665858
4
+ data.tar.gz: 280636e65eab161acc6369cdf992faa4f81a6496ebbbad794a96ee60ea3e4884
5
5
  SHA512:
6
- metadata.gz: 849349f3b5eddff404a8af55918e1cafc8737743cb83fe45f69b2353e5be9dc95f9f064bce8d4fba80e1a2d31712060c6abfec5a5eea622bf48aae80d96967f6
7
- data.tar.gz: 28d98f09acbaffb2c26dab8c35ed806f1d510ea1bee9e9d14adc71d6797e190f950fee817339fc4aa1b9ae61704cd30a923f837fd1438cda8804b4a5970c0f86
6
+ metadata.gz: 8721d3c59c29a9bcb9562b6f0bad1ca119f854873fb3b6f5e550553a6d2fa471afb2d3e1c6c5b1323d5121b36f4070ed0a3bca24866b3dede1682658bbce934f
7
+ data.tar.gz: e312e821428e6c15ec871971aabee38cd7c238adfc855ff1a4b70edb31f529e359162c1961141d2ce3fe0d5f6aee3fce009c6a479aaa3909920993af58d3c3f2
@@ -1690,24 +1690,34 @@ module Parser
1690
1690
  cond
1691
1691
  end
1692
1692
 
1693
- when :and, :or, :irange, :erange
1693
+ when :and, :or
1694
1694
  lhs, rhs = *cond
1695
1695
 
1696
- type = case cond.type
1697
- when :irange then :iflipflop
1698
- when :erange then :eflipflop
1699
- end
1700
-
1701
- if [:and, :or].include?(cond.type) &&
1702
- @parser.version == 18
1696
+ if @parser.version == 18
1703
1697
  cond
1704
1698
  else
1705
- cond.updated(type, [
1699
+ cond.updated(cond.type, [
1706
1700
  check_condition(lhs),
1707
1701
  check_condition(rhs)
1708
1702
  ])
1709
1703
  end
1710
1704
 
1705
+ when :irange, :erange
1706
+ lhs, rhs = *cond
1707
+
1708
+ type = case cond.type
1709
+ when :irange then :iflipflop
1710
+ when :erange then :eflipflop
1711
+ end
1712
+
1713
+ lhs_condition = check_condition(lhs) unless lhs.nil?
1714
+ rhs_condition = check_condition(rhs) unless rhs.nil?
1715
+
1716
+ return cond.updated(type, [
1717
+ lhs_condition,
1718
+ rhs_condition
1719
+ ])
1720
+
1711
1721
  when :regexp
1712
1722
  n(:match_current_line, [ cond ], expr_map(cond.loc.expression))
1713
1723
 
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby18.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby19.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby20.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby21.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby22.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby23.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby24.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby25.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby26.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby27.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby30.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby31.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby32.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
data/lib/parser/ruby33.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
@@ -1,7 +1,7 @@
1
1
  # -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
2
2
  #
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by Racc 1.7.0
4
+ # This file is automatically generated by Racc 1.7.1
5
5
  # from Racc grammar file "".
6
6
  #
7
7
 
@@ -95,10 +95,11 @@ module Parser
95
95
  end
96
96
 
97
97
  ##
98
- # Same as {associate}, but compares by identity, thus producing an unambiguous
99
- # result even in presence of equal nodes.
98
+ # Same as {associate}, but uses `node.loc` instead of `node` as
99
+ # the hash key, thus producing an unambiguous result even in presence
100
+ # of equal nodes.
100
101
  #
101
- # @return [Hash<Parser::Source::Node, Array<Parser::Source::Comment>>]
102
+ # @return [Hash<Parser::Source::Map, Array<Parser::Source::Comment>>]
102
103
  #
103
104
  def associate_locations
104
105
  @map_using = :location
@@ -106,11 +107,10 @@ module Parser
106
107
  end
107
108
 
108
109
  ##
109
- # Same as {associate}, but uses `node.loc` instead of `node` as
110
- # the hash key, thus producing an unambiguous result even in presence
111
- # of equal nodes.
110
+ # Same as {associate}, but compares by identity, thus producing an unambiguous
111
+ # result even in presence of equal nodes.
112
112
  #
113
- # @return [Hash<Parser::Source::Map, Array<Parser::Source::Comment>>]
113
+ # @return [Hash<Parser::Source::Node, Array<Parser::Source::Comment>>]
114
114
  #
115
115
  def associate_by_identity
116
116
  @map_using = :identity
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- VERSION = '3.2.2.2'
4
+ VERSION = '3.2.2.4'
5
5
  end
data/parser.gemspec CHANGED
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = '>= 2.0.0'
28
28
 
29
29
  spec.add_dependency 'ast', '~> 2.4.1'
30
+ spec.add_dependency 'racc'
30
31
 
31
32
  spec.add_development_dependency 'bundler', '>= 1.15', '< 3.0.0'
32
33
  spec.add_development_dependency 'rake', '~> 13.0.1'
33
- spec.add_development_dependency 'racc', '= 1.7.0'
34
34
  spec.add_development_dependency 'cliver', '~> 0.3.2'
35
35
 
36
36
  spec.add_development_dependency 'yard'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2.2
4
+ version: 3.2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - whitequark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-08 00:00:00.000000000 Z
11
+ date: 2023-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.4.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: racc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,20 +72,6 @@ dependencies:
58
72
  - - "~>"
59
73
  - !ruby/object:Gem::Version
60
74
  version: 13.0.1
61
- - !ruby/object:Gem::Dependency
62
- name: racc
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - '='
66
- - !ruby/object:Gem::Version
67
- version: 1.7.0
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - '='
73
- - !ruby/object:Gem::Version
74
- version: 1.7.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: cliver
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -249,9 +249,9 @@ licenses:
249
249
  - MIT
250
250
  metadata:
251
251
  bug_tracker_uri: https://github.com/whitequark/parser/issues
252
- changelog_uri: https://github.com/whitequark/parser/blob/v3.2.2.2/CHANGELOG.md
253
- documentation_uri: https://www.rubydoc.info/gems/parser/3.2.2.2
254
- source_code_uri: https://github.com/whitequark/parser/tree/v3.2.2.2
252
+ changelog_uri: https://github.com/whitequark/parser/blob/v3.2.2.4/CHANGELOG.md
253
+ documentation_uri: https://www.rubydoc.info/gems/parser/3.2.2.4
254
+ source_code_uri: https://github.com/whitequark/parser/tree/v3.2.2.4
255
255
  post_install_message:
256
256
  rdoc_options: []
257
257
  require_paths: