ruby-next-parser 2.8.0.7 → 2.8.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42f6dade52152a7d954fbc14e82212da7fb0c9a3e12ea3a3565627edcc2ae5aa
4
- data.tar.gz: 027f98350f9e25d0934299f93b06b28e0580fd42e9b14b4f06c23d1033807daf
3
+ metadata.gz: 963ce7cf22f62e9facd3220602bf7de8aa415b751b22476cabaa0ce02a9abbd4
4
+ data.tar.gz: c414e8a28e69ba784171d635ccf0b13dabb30d5413b1f1a3a0a25299e2468e5c
5
5
  SHA512:
6
- metadata.gz: 8b77744f948988a744539f1fdba2226708fc2b59300318a18007b94e30070c23d1cbe5a19f98e0e9dd7e2e56bb7ab098deec04db347bc473d0a2f6256e31d3a5
7
- data.tar.gz: 440d01c48242142fcca58ff53eae4a017dfe6231358b867dedea3731b858706cf88424aa815184b6bac368c415f8954cdb8675de379f5bb8e59c87102921e199
6
+ metadata.gz: a65e4416b08ccf9a88b0c71b344645c36b752e399c40914674ea23ab4e5a41569334c1fc97dada54f0566796b0ed954b3d5a44b810b6feb821c99934b283ab0e
7
+ data.tar.gz: be1d9c7158db2b1818799c09d95cc03e254e9f175be7b09fc7f7583655dc7ebd73374bd12a37ff58d0516abdd28107b0800a933c572d3e0972d5a0466d323ffb
@@ -11,16 +11,6 @@ module Parser
11
11
  node
12
12
  end
13
13
  end
14
-
15
- unless method_defined?(:on_def_e)
16
- alias on_def_e on_def
17
- alias on_defs_e on_defs
18
- end
19
-
20
- unless method_defined?(:on_rasgn)
21
- alias on_rasgn process_regular_node
22
- alias on_mrasgn process_regular_node
23
- end
24
14
  end
25
15
  end
26
16
  end
@@ -10,51 +10,5 @@ module Parser
10
10
  n(:meth_ref, [ receiver, value(selector_t).to_sym ],
11
11
  send_map(receiver, dot_t, selector_t, nil, [], nil))
12
12
  end unless method_defined?(:method_ref)
13
-
14
- def def_endless_method(def_t, name_t, args,
15
- assignment_t, body)
16
- n(:def_e, [ value(name_t).to_sym, args, body ],
17
- endless_definition_map(def_t, nil, name_t, assignment_t, body))
18
- end unless method_defined?(:def_endless_method)
19
-
20
- def def_endless_singleton(def_t, definee, dot_t,
21
- name_t, args,
22
- assignment_t, body)
23
- return unless validate_definee(definee)
24
-
25
- n(:defs_e, [ definee, value(name_t).to_sym, args, body ],
26
- endless_definition_map(def_t, dot_t, name_t, assignment_t, body))
27
- end unless method_defined?(:def_endless_singleton)
28
-
29
- def rassign(lhs, assoc_t, rhs)
30
- n(:rasgn, [lhs, rhs], binary_op_map(lhs, assoc_t, rhs))
31
- end unless method_defined?(:rassign)
32
-
33
- def multi_rassign(lhs, assoc_t, rhs)
34
- n(:mrasgn, [ lhs, rhs ],
35
- binary_op_map(lhs, assoc_t, rhs))
36
- end unless method_defined?(:multi_rassign)
37
-
38
- private
39
-
40
- def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e)
41
- body_l = body_e.loc.expression
42
-
43
- Source::Map::EndlessDefinition.new(loc(keyword_t),
44
- loc(operator_t), loc(name_t),
45
- loc(assignment_t), body_l)
46
- end unless private_method_defined?(:endless_definition_map)
47
-
48
- def validate_definee(definee)
49
- case definee.type
50
- when :int, :str, :dstr, :sym, :dsym,
51
- :regexp, :array, :hash
52
-
53
- diagnostic :error, :singleton_literal, nil, definee.loc.expression
54
- false
55
- else
56
- true
57
- end
58
- end unless private_method_defined?(:validate_definee)
59
13
  end
60
14
  end
@@ -5,7 +5,7 @@ require "parser/meta"
5
5
  module Parser
6
6
  # Parser metadata
7
7
  module Meta
8
- NEXT_NODE_TYPES = (NODE_TYPES + %i[meth_ref def_e defs_e rasgn mrasgn]).to_set.freeze
8
+ NEXT_NODE_TYPES = (NODE_TYPES + %i[meth_ref]).to_set.freeze
9
9
 
10
10
  remove_const(:NODE_TYPES)
11
11
  const_set(:NODE_TYPES, NEXT_NODE_TYPES)
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "lexer"
4
4
  require_relative "builder"
5
- require_relative "source/map/endless_definition" unless defined?(Parser::Source::Map::EndlessDefinition)
5
+ require_relative "source/map/method_definition" unless defined?(Parser::Source::Map::MethodDefinition)
6
6
  require_relative "ast/processor"
7
7
 
8
8
  module Parser
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- NEXT_VERSION = "2.8.0.7"
4
+ NEXT_VERSION = "2.8.0.8"
5
5
  end
@@ -6842,7 +6842,6 @@ def _reduce_509(val, _values, result)
6842
6842
  end
6843
6843
 
6844
6844
  def _reduce_510(val, _values, result)
6845
- check_kwarg_name(val[0])
6846
6845
  result = [:label, val[0]]
6847
6846
 
6848
6847
  result
@@ -2131,7 +2131,6 @@ opt_block_args_tail:
2131
2131
 
2132
2132
  p_kw_label: tLABEL
2133
2133
  {
2134
- check_kwarg_name(val[0])
2135
2134
  result = [:label, val[0]]
2136
2135
  }
2137
2136
  | tSTRING_BEG string_contents tLABEL_END
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-next-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0.7
4
+ version: 2.8.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-23 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -39,7 +39,6 @@ files:
39
39
  - lib/parser/ruby-next/lexer.rl
40
40
  - lib/parser/ruby-next/meta.rb
41
41
  - lib/parser/ruby-next/parser_ext.rb
42
- - lib/parser/ruby-next/source/map/endless_definition.rb
43
42
  - lib/parser/ruby-next/version.rb
44
43
  - lib/parser/rubynext.rb
45
44
  - lib/parser/rubynext.y
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Parser
4
- module Source
5
-
6
- class Map::EndlessDefinition < Map
7
- attr_reader :keyword
8
- attr_reader :operator
9
- attr_reader :name
10
- attr_reader :assignment
11
-
12
- def initialize(keyword_l, operator_l, name_l, assignment_l, body_l)
13
- @keyword = keyword_l
14
- @operator = operator_l
15
- @name = name_l
16
- @assignment = assignment_l
17
-
18
- super(@keyword.join(body_l))
19
- end
20
- end
21
-
22
- end
23
- end