parser 3.2.2.3 → 3.3.0.0

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.
@@ -1,8 +1,8 @@
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
5
- # from Racc grammar file "".
4
+ # This file is automatically generated by Racc 1.7.3
5
+ # from Racc grammar file "rubymotion.y".
6
6
  #
7
7
 
8
8
  require 'racc/parser.rb'
@@ -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
@@ -63,6 +63,10 @@ module Parser
63
63
  declared?(ANONYMOUS_BLOCKARG)
64
64
  end
65
65
 
66
+ def parent_has_anonymous_blockarg?
67
+ @stack.any? { |variables| variables.include?(ANONYMOUS_BLOCKARG) }
68
+ end
69
+
66
70
  def declare_anonymous_restarg
67
71
  declare(ANONYMOUS_RESTARG)
68
72
  end
@@ -71,6 +75,10 @@ module Parser
71
75
  declared?(ANONYMOUS_RESTARG)
72
76
  end
73
77
 
78
+ def parent_has_anonymous_restarg?
79
+ @stack.any? { |variables| variables.include?(ANONYMOUS_RESTARG) }
80
+ end
81
+
74
82
  def declare_anonymous_kwrestarg
75
83
  declare(ANONYMOUS_KWRESTARG)
76
84
  end
@@ -79,6 +87,10 @@ module Parser
79
87
  declared?(ANONYMOUS_KWRESTARG)
80
88
  end
81
89
 
90
+ def parent_has_anonymous_kwrestarg?
91
+ @stack.any? { |variables| variables.include?(ANONYMOUS_KWRESTARG) }
92
+ end
93
+
82
94
  def empty?
83
95
  @stack.empty?
84
96
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- VERSION = '3.2.2.3'
4
+ VERSION = '3.3.0.0'
5
5
  end
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.3
4
+ version: 3.3.0.0
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: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
@@ -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.3/CHANGELOG.md
253
- documentation_uri: https://www.rubydoc.info/gems/parser/3.2.2.3
254
- source_code_uri: https://github.com/whitequark/parser/tree/v3.2.2.3
252
+ changelog_uri: https://github.com/whitequark/parser/blob/v3.3.0.0/CHANGELOG.md
253
+ documentation_uri: https://www.rubydoc.info/gems/parser/3.3.0.0
254
+ source_code_uri: https://github.com/whitequark/parser/tree/v3.3.0.0
255
255
  post_install_message:
256
256
  rdoc_options: []
257
257
  require_paths:
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  - !ruby/object:Gem::Version
268
268
  version: '0'
269
269
  requirements: []
270
- rubygems_version: 3.2.3
270
+ rubygems_version: 3.5.3
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: A Ruby parser written in pure Ruby.