unparser 0.4.9 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -4
- data/bin/unparser +1 -1
- data/lib/unparser.rb +115 -61
- data/lib/unparser/ast.rb +0 -1
- data/lib/unparser/ast/local_variable_scope.rb +6 -76
- data/lib/unparser/buffer.rb +19 -16
- data/lib/unparser/cli.rb +26 -39
- data/lib/unparser/color.rb +0 -3
- data/lib/unparser/comments.rb +0 -26
- data/lib/unparser/constants.rb +4 -53
- data/lib/unparser/diff.rb +0 -17
- data/lib/unparser/dsl.rb +0 -32
- data/lib/unparser/emitter.rb +23 -425
- data/lib/unparser/emitter/alias.rb +2 -8
- data/lib/unparser/emitter/args.rb +45 -0
- data/lib/unparser/emitter/argument.rb +8 -166
- data/lib/unparser/emitter/array.rb +27 -0
- data/lib/unparser/emitter/array_pattern.rb +29 -0
- data/lib/unparser/emitter/assignment.rb +36 -127
- data/lib/unparser/emitter/begin.rb +9 -84
- data/lib/unparser/emitter/binary.rb +7 -20
- data/lib/unparser/emitter/block.rb +57 -41
- data/lib/unparser/emitter/case.rb +6 -48
- data/lib/unparser/emitter/case_guard.rb +27 -0
- data/lib/unparser/emitter/case_match.rb +40 -0
- data/lib/unparser/emitter/cbase.rb +1 -3
- data/lib/unparser/emitter/class.rb +6 -26
- data/lib/unparser/emitter/const_pattern.rb +24 -0
- data/lib/unparser/emitter/def.rb +7 -51
- data/lib/unparser/emitter/defined.rb +2 -12
- data/lib/unparser/emitter/dstr.rb +22 -0
- data/lib/unparser/emitter/dsym.rb +41 -0
- data/lib/unparser/emitter/flipflop.rb +11 -10
- data/lib/unparser/emitter/float.rb +29 -0
- data/lib/unparser/emitter/flow_modifier.rb +11 -55
- data/lib/unparser/emitter/for.rb +5 -19
- data/lib/unparser/emitter/hash.rb +74 -0
- data/lib/unparser/emitter/hash_pattern.rb +67 -0
- data/lib/unparser/emitter/hookexe.rb +5 -11
- data/lib/unparser/emitter/if.rb +15 -71
- data/lib/unparser/emitter/in_match.rb +21 -0
- data/lib/unparser/emitter/in_pattern.rb +34 -0
- data/lib/unparser/emitter/index.rb +21 -88
- data/lib/unparser/emitter/kwbegin.rb +31 -0
- data/lib/unparser/emitter/lambda.rb +0 -8
- data/lib/unparser/emitter/masgn.rb +20 -0
- data/lib/unparser/emitter/match.rb +3 -17
- data/lib/unparser/emitter/match_alt.rb +23 -0
- data/lib/unparser/emitter/match_as.rb +21 -0
- data/lib/unparser/emitter/match_rest.rb +26 -0
- data/lib/unparser/emitter/match_var.rb +19 -0
- data/lib/unparser/emitter/mlhs.rb +40 -0
- data/lib/unparser/emitter/module.rb +3 -9
- data/lib/unparser/emitter/op_assign.rb +12 -27
- data/lib/unparser/emitter/pin.rb +19 -0
- data/lib/unparser/emitter/primitive.rb +93 -0
- data/lib/unparser/emitter/range.rb +35 -0
- data/lib/unparser/emitter/regexp.rb +35 -0
- data/lib/unparser/emitter/repetition.rb +17 -57
- data/lib/unparser/emitter/rescue.rb +1 -97
- data/lib/unparser/emitter/root.rb +17 -1
- data/lib/unparser/emitter/send.rb +10 -219
- data/lib/unparser/emitter/simple.rb +33 -0
- data/lib/unparser/emitter/splat.rb +2 -18
- data/lib/unparser/emitter/super.rb +1 -29
- data/lib/unparser/emitter/undef.rb +1 -9
- data/lib/unparser/emitter/variable.rb +1 -31
- data/lib/unparser/emitter/xstr.rb +72 -0
- data/lib/unparser/emitter/yield.rb +1 -9
- data/lib/unparser/generation.rb +250 -0
- data/lib/unparser/node_details.rb +21 -0
- data/lib/unparser/node_details/send.rb +62 -0
- data/lib/unparser/node_helpers.rb +46 -6
- data/lib/unparser/validation.rb +58 -35
- data/lib/unparser/writer.rb +15 -0
- data/lib/unparser/writer/binary.rb +99 -0
- data/lib/unparser/writer/dynamic_string.rb +233 -0
- data/lib/unparser/writer/resbody.rb +40 -0
- data/lib/unparser/writer/rescue.rb +39 -0
- data/lib/unparser/writer/send.rb +124 -0
- data/lib/unparser/{emitter → writer}/send/attribute_assignment.rb +11 -26
- data/lib/unparser/writer/send/binary.rb +27 -0
- data/lib/unparser/writer/send/conditional.rb +25 -0
- data/lib/unparser/writer/send/regular.rb +33 -0
- data/lib/unparser/{emitter → writer}/send/unary.rb +10 -17
- metadata +66 -34
- data/lib/unparser/emitter/empty.rb +0 -23
- data/lib/unparser/emitter/ensure.rb +0 -37
- data/lib/unparser/emitter/literal.rb +0 -10
- data/lib/unparser/emitter/literal/array.rb +0 -29
- data/lib/unparser/emitter/literal/dynamic.rb +0 -53
- data/lib/unparser/emitter/literal/dynamic_body.rb +0 -132
- data/lib/unparser/emitter/literal/execute_string.rb +0 -38
- data/lib/unparser/emitter/literal/hash.rb +0 -156
- data/lib/unparser/emitter/literal/primitive.rb +0 -145
- data/lib/unparser/emitter/literal/range.rb +0 -36
- data/lib/unparser/emitter/literal/regexp.rb +0 -114
- data/lib/unparser/emitter/literal/singleton.rb +0 -26
- data/lib/unparser/emitter/meta.rb +0 -16
- data/lib/unparser/emitter/redo.rb +0 -25
- data/lib/unparser/emitter/resbody.rb +0 -76
- data/lib/unparser/emitter/retry.rb +0 -25
- data/lib/unparser/emitter/send/binary.rb +0 -57
- data/lib/unparser/emitter/send/conditional.rb +0 -40
- data/lib/unparser/emitter/send/regular.rb +0 -40
- data/lib/unparser/preprocessor.rb +0 -159
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unparser
|
4
|
+
module Writer
|
5
|
+
# Writer for rescue bodies
|
6
|
+
class Resbody
|
7
|
+
include Writer
|
8
|
+
|
9
|
+
children :exception, :assignment, :body
|
10
|
+
|
11
|
+
def emit_postcontrol
|
12
|
+
write(' rescue ')
|
13
|
+
visit(body)
|
14
|
+
end
|
15
|
+
|
16
|
+
def emit_regular
|
17
|
+
write('rescue')
|
18
|
+
emit_exception
|
19
|
+
emit_assignment
|
20
|
+
emit_optional_body(body)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def emit_exception
|
26
|
+
return unless exception
|
27
|
+
|
28
|
+
ws
|
29
|
+
delimited(exception.children)
|
30
|
+
end
|
31
|
+
|
32
|
+
def emit_assignment
|
33
|
+
return unless assignment
|
34
|
+
|
35
|
+
write(' => ')
|
36
|
+
visit(assignment)
|
37
|
+
end
|
38
|
+
end # Resbody
|
39
|
+
end # Writer
|
40
|
+
end # Unparser
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unparser
|
4
|
+
module Writer
|
5
|
+
class Rescue
|
6
|
+
include Writer, Adamantium::Flat
|
7
|
+
|
8
|
+
children :body, :rescue_body
|
9
|
+
|
10
|
+
define_group :rescue_bodies, 1..-2
|
11
|
+
|
12
|
+
def emit_regular
|
13
|
+
emit_optional_body(body)
|
14
|
+
|
15
|
+
rescue_bodies.each(&method(:emit_rescue_body))
|
16
|
+
|
17
|
+
if else_node
|
18
|
+
write('else')
|
19
|
+
emit_body(else_node)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def emit_postcontrol
|
24
|
+
visit(body)
|
25
|
+
writer_with(Resbody, rescue_body).emit_postcontrol
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def else_node
|
31
|
+
children.last
|
32
|
+
end
|
33
|
+
|
34
|
+
def emit_rescue_body(node)
|
35
|
+
writer_with(Resbody, node).emit_regular
|
36
|
+
end
|
37
|
+
end # Rescue
|
38
|
+
end # Writer
|
39
|
+
end # Unparser
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unparser
|
4
|
+
module Writer
|
5
|
+
# Writer for send
|
6
|
+
class Send
|
7
|
+
include Writer, Adamantium::Flat, Constants, Generation
|
8
|
+
|
9
|
+
INDEX_ASSIGN = :'[]='
|
10
|
+
INDEX_REFERENCE = :'[]'
|
11
|
+
|
12
|
+
OPERATORS = {
|
13
|
+
csend: '&.',
|
14
|
+
send: '.'
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
private_constant(*constants(false))
|
18
|
+
|
19
|
+
children :receiver, :selector
|
20
|
+
|
21
|
+
def dispatch
|
22
|
+
effective_writer.dispatch
|
23
|
+
end
|
24
|
+
|
25
|
+
def emit_mlhs
|
26
|
+
effective_writer.emit_send_mlhs
|
27
|
+
end
|
28
|
+
|
29
|
+
def emit_selector
|
30
|
+
write(details.string_selector)
|
31
|
+
end
|
32
|
+
|
33
|
+
def emit_heredoc_reminders
|
34
|
+
emitter(receiver).emit_heredoc_reminders if receiver
|
35
|
+
arguments.each(&method(:emit_heredoc_reminder))
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def effective_writer
|
41
|
+
writer_with(effective_writer_class, node)
|
42
|
+
end
|
43
|
+
memoize :effective_writer
|
44
|
+
|
45
|
+
def effective_writer_class
|
46
|
+
if details.binary_syntax_allowed?
|
47
|
+
Binary
|
48
|
+
elsif details.selector_unary_operator? && n_send?(node)
|
49
|
+
Unary
|
50
|
+
elsif write_as_attribute_assignment?
|
51
|
+
AttributeAssignment
|
52
|
+
else
|
53
|
+
Regular
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def write_as_attribute_assignment?
|
58
|
+
details.assignment_operator?
|
59
|
+
end
|
60
|
+
|
61
|
+
def emit_operator
|
62
|
+
write(OPERATORS.fetch(node.type))
|
63
|
+
end
|
64
|
+
|
65
|
+
def emit_arguments
|
66
|
+
if arguments.empty?
|
67
|
+
write('()') if receiver.nil? && avoid_clash?
|
68
|
+
else
|
69
|
+
emit_normal_arguments
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def arguments
|
74
|
+
details.arguments
|
75
|
+
end
|
76
|
+
|
77
|
+
def emit_normal_arguments
|
78
|
+
parentheses do
|
79
|
+
arguments.each_with_index do |node, index|
|
80
|
+
write(', ') unless index.zero?
|
81
|
+
emit_argument(node, index.succ.equal?(arguments.length))
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def emit_argument(argument, last)
|
87
|
+
if n_hash?(argument) && last
|
88
|
+
writer_with(Emitter::Hash, argument).emit_last_argument_hash
|
89
|
+
else
|
90
|
+
visit(argument)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def emit_heredoc_reminder(argument)
|
95
|
+
emitter(argument).emit_heredoc_reminders
|
96
|
+
end
|
97
|
+
|
98
|
+
def avoid_clash?
|
99
|
+
local_variable_clash? || parses_as_constant?
|
100
|
+
end
|
101
|
+
|
102
|
+
def local_variable_clash?
|
103
|
+
local_variable_scope.local_variable_defined_for_node?(node, selector)
|
104
|
+
end
|
105
|
+
|
106
|
+
def parses_as_constant?
|
107
|
+
n_const?(Unparser.parse(selector.to_s))
|
108
|
+
end
|
109
|
+
|
110
|
+
def details
|
111
|
+
NodeDetails::Send.new(node)
|
112
|
+
end
|
113
|
+
memoize :details
|
114
|
+
|
115
|
+
def emit_send_regular(node)
|
116
|
+
if n_send?(node)
|
117
|
+
writer_with(Regular, node).dispatch
|
118
|
+
else
|
119
|
+
visit(node)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end # Send
|
123
|
+
end # Writer
|
124
|
+
end # Unparser
|
@@ -1,24 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Unparser
|
4
|
-
|
4
|
+
module Writer
|
5
5
|
class Send
|
6
|
-
#
|
6
|
+
# Writer for send as attribute assignment
|
7
7
|
class AttributeAssignment < self
|
8
|
-
include Unterminated
|
9
|
-
|
10
8
|
children :receiver, :selector, :first_argument
|
11
9
|
|
12
|
-
# Perform regular dispatch
|
13
|
-
#
|
14
|
-
# @return [undefined]
|
15
|
-
#
|
16
|
-
# @api private
|
17
|
-
#
|
18
10
|
def dispatch
|
19
11
|
emit_receiver
|
20
12
|
emit_attribute
|
21
|
-
write(
|
13
|
+
write('=')
|
22
14
|
|
23
15
|
if arguments.one?
|
24
16
|
visit(first_argument)
|
@@ -27,29 +19,22 @@ module Unparser
|
|
27
19
|
end
|
28
20
|
end
|
29
21
|
|
22
|
+
def emit_send_mlhs
|
23
|
+
emit_receiver
|
24
|
+
write(details.non_assignment_selector)
|
25
|
+
end
|
26
|
+
|
30
27
|
private
|
31
28
|
|
32
|
-
# Emit receiver
|
33
|
-
#
|
34
|
-
# @return [Parser::AST::Node]
|
35
|
-
#
|
36
|
-
# @api private
|
37
|
-
#
|
38
29
|
def emit_receiver
|
39
30
|
visit(receiver)
|
40
|
-
|
31
|
+
emit_operator
|
41
32
|
end
|
42
33
|
|
43
|
-
# Emit attribute
|
44
|
-
#
|
45
|
-
# @return [undefined]
|
46
|
-
#
|
47
|
-
# @api private
|
48
|
-
#
|
49
34
|
def emit_attribute
|
50
|
-
write(non_assignment_selector)
|
35
|
+
write(details.non_assignment_selector)
|
51
36
|
end
|
52
37
|
end # AttributeAssignment
|
53
38
|
end # Send
|
54
|
-
end #
|
39
|
+
end # Writer
|
55
40
|
end # Unparser
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unparser
|
4
|
+
module Writer
|
5
|
+
class Send
|
6
|
+
# Writer for binary sends
|
7
|
+
class Binary < self
|
8
|
+
def dispatch
|
9
|
+
visit(receiver)
|
10
|
+
emit_operator
|
11
|
+
emit_right
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def emit_operator
|
17
|
+
write(' ', details.string_selector, ' ')
|
18
|
+
end
|
19
|
+
|
20
|
+
def emit_right
|
21
|
+
emit_send_regular(children.fetch(2))
|
22
|
+
end
|
23
|
+
|
24
|
+
end # Binary
|
25
|
+
end # Send
|
26
|
+
end # Writer
|
27
|
+
end # Unparser
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unparser
|
4
|
+
module Writer
|
5
|
+
class Send
|
6
|
+
# Writer for "conditional" receiver&.selector(arguments...) case
|
7
|
+
class Conditional < self
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def dispatch
|
12
|
+
emit_receiver
|
13
|
+
emit_selector
|
14
|
+
emit_arguments
|
15
|
+
end
|
16
|
+
|
17
|
+
def emit_receiver
|
18
|
+
visit(receiver)
|
19
|
+
write('&.')
|
20
|
+
end
|
21
|
+
|
22
|
+
end # Regular
|
23
|
+
end # Send
|
24
|
+
end # Writer
|
25
|
+
end # Unparser
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unparser
|
4
|
+
module Writer
|
5
|
+
class Send
|
6
|
+
# Writer for "regular" receiver.selector(arguments...) case
|
7
|
+
class Regular < self
|
8
|
+
def dispatch
|
9
|
+
emit_receiver
|
10
|
+
emit_selector
|
11
|
+
emit_arguments
|
12
|
+
end
|
13
|
+
|
14
|
+
def emit_send_mlhs
|
15
|
+
dispatch
|
16
|
+
end
|
17
|
+
|
18
|
+
def emit_arguments_without_heredoc_body
|
19
|
+
emit_normal_arguments if arguments.any?
|
20
|
+
end
|
21
|
+
|
22
|
+
def emit_receiver
|
23
|
+
return unless receiver
|
24
|
+
|
25
|
+
emit_send_regular(receiver)
|
26
|
+
|
27
|
+
emit_operator
|
28
|
+
end
|
29
|
+
|
30
|
+
end # Regular
|
31
|
+
end # Send
|
32
|
+
end # Writer
|
33
|
+
end # Unparser
|
@@ -1,36 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Unparser
|
4
|
-
|
4
|
+
module Writer
|
5
5
|
class Send
|
6
|
-
#
|
6
|
+
# Writer for unary sends
|
7
7
|
class Unary < self
|
8
|
-
|
9
|
-
|
10
|
-
private
|
11
|
-
|
12
|
-
MAP = IceNine.deep_freeze(
|
8
|
+
MAP = {
|
13
9
|
'-@': '-',
|
14
10
|
'+@': '+'
|
15
|
-
|
11
|
+
}.freeze
|
12
|
+
|
13
|
+
private_constant(*constants(false))
|
16
14
|
|
17
|
-
# Perform dispatch
|
18
|
-
#
|
19
|
-
# @return [undefined]
|
20
|
-
#
|
21
|
-
# @api private
|
22
|
-
#
|
23
15
|
def dispatch
|
24
16
|
name = selector
|
17
|
+
|
25
18
|
write(MAP.fetch(name, name).to_s)
|
26
|
-
|
19
|
+
|
20
|
+
if n_int?(receiver) && selector.equal?(:'+@')
|
27
21
|
write('+')
|
28
22
|
end
|
29
23
|
|
30
24
|
visit(receiver)
|
31
25
|
end
|
32
|
-
|
33
26
|
end # Unary
|
34
27
|
end # Send
|
35
|
-
end #
|
28
|
+
end # Writer
|
36
29
|
end # Unparser
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_type
|
@@ -142,28 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.10.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.10.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: mutant-rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
159
|
+
version: 0.10.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
166
|
+
version: 0.10.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rspec
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,28 +198,42 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 1.
|
201
|
+
version: 1.3.0
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 1.
|
208
|
+
version: 1.3.0
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: rubocop
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: 1.1.0
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 1.1.0
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rubocop-packaging
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 0.5.0
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 0.5.0
|
223
237
|
description: Generate equivalent source for parser gem AST nodes
|
224
238
|
email: mbj@schirp-dso.com
|
225
239
|
executables:
|
@@ -242,60 +256,78 @@ files:
|
|
242
256
|
- lib/unparser/dsl.rb
|
243
257
|
- lib/unparser/emitter.rb
|
244
258
|
- lib/unparser/emitter/alias.rb
|
259
|
+
- lib/unparser/emitter/args.rb
|
245
260
|
- lib/unparser/emitter/argument.rb
|
261
|
+
- lib/unparser/emitter/array.rb
|
262
|
+
- lib/unparser/emitter/array_pattern.rb
|
246
263
|
- lib/unparser/emitter/assignment.rb
|
247
264
|
- lib/unparser/emitter/begin.rb
|
248
265
|
- lib/unparser/emitter/binary.rb
|
249
266
|
- lib/unparser/emitter/block.rb
|
250
267
|
- lib/unparser/emitter/case.rb
|
268
|
+
- lib/unparser/emitter/case_guard.rb
|
269
|
+
- lib/unparser/emitter/case_match.rb
|
251
270
|
- lib/unparser/emitter/cbase.rb
|
252
271
|
- lib/unparser/emitter/class.rb
|
272
|
+
- lib/unparser/emitter/const_pattern.rb
|
253
273
|
- lib/unparser/emitter/def.rb
|
254
274
|
- lib/unparser/emitter/defined.rb
|
255
|
-
- lib/unparser/emitter/
|
256
|
-
- lib/unparser/emitter/
|
275
|
+
- lib/unparser/emitter/dstr.rb
|
276
|
+
- lib/unparser/emitter/dsym.rb
|
257
277
|
- lib/unparser/emitter/flipflop.rb
|
278
|
+
- lib/unparser/emitter/float.rb
|
258
279
|
- lib/unparser/emitter/flow_modifier.rb
|
259
280
|
- lib/unparser/emitter/for.rb
|
281
|
+
- lib/unparser/emitter/hash.rb
|
282
|
+
- lib/unparser/emitter/hash_pattern.rb
|
260
283
|
- lib/unparser/emitter/hookexe.rb
|
261
284
|
- lib/unparser/emitter/if.rb
|
285
|
+
- lib/unparser/emitter/in_match.rb
|
286
|
+
- lib/unparser/emitter/in_pattern.rb
|
262
287
|
- lib/unparser/emitter/index.rb
|
288
|
+
- lib/unparser/emitter/kwbegin.rb
|
263
289
|
- lib/unparser/emitter/lambda.rb
|
264
|
-
- lib/unparser/emitter/
|
265
|
-
- lib/unparser/emitter/literal/array.rb
|
266
|
-
- lib/unparser/emitter/literal/dynamic.rb
|
267
|
-
- lib/unparser/emitter/literal/dynamic_body.rb
|
268
|
-
- lib/unparser/emitter/literal/execute_string.rb
|
269
|
-
- lib/unparser/emitter/literal/hash.rb
|
270
|
-
- lib/unparser/emitter/literal/primitive.rb
|
271
|
-
- lib/unparser/emitter/literal/range.rb
|
272
|
-
- lib/unparser/emitter/literal/regexp.rb
|
273
|
-
- lib/unparser/emitter/literal/singleton.rb
|
290
|
+
- lib/unparser/emitter/masgn.rb
|
274
291
|
- lib/unparser/emitter/match.rb
|
275
|
-
- lib/unparser/emitter/
|
292
|
+
- lib/unparser/emitter/match_alt.rb
|
293
|
+
- lib/unparser/emitter/match_as.rb
|
294
|
+
- lib/unparser/emitter/match_rest.rb
|
295
|
+
- lib/unparser/emitter/match_var.rb
|
296
|
+
- lib/unparser/emitter/mlhs.rb
|
276
297
|
- lib/unparser/emitter/module.rb
|
277
298
|
- lib/unparser/emitter/op_assign.rb
|
278
|
-
- lib/unparser/emitter/
|
299
|
+
- lib/unparser/emitter/pin.rb
|
300
|
+
- lib/unparser/emitter/primitive.rb
|
301
|
+
- lib/unparser/emitter/range.rb
|
302
|
+
- lib/unparser/emitter/regexp.rb
|
279
303
|
- lib/unparser/emitter/repetition.rb
|
280
|
-
- lib/unparser/emitter/resbody.rb
|
281
304
|
- lib/unparser/emitter/rescue.rb
|
282
|
-
- lib/unparser/emitter/retry.rb
|
283
305
|
- lib/unparser/emitter/root.rb
|
284
306
|
- lib/unparser/emitter/send.rb
|
285
|
-
- lib/unparser/emitter/
|
286
|
-
- lib/unparser/emitter/send/binary.rb
|
287
|
-
- lib/unparser/emitter/send/conditional.rb
|
288
|
-
- lib/unparser/emitter/send/regular.rb
|
289
|
-
- lib/unparser/emitter/send/unary.rb
|
307
|
+
- lib/unparser/emitter/simple.rb
|
290
308
|
- lib/unparser/emitter/splat.rb
|
291
309
|
- lib/unparser/emitter/super.rb
|
292
310
|
- lib/unparser/emitter/undef.rb
|
293
311
|
- lib/unparser/emitter/variable.rb
|
312
|
+
- lib/unparser/emitter/xstr.rb
|
294
313
|
- lib/unparser/emitter/yield.rb
|
295
314
|
- lib/unparser/finalize.rb
|
315
|
+
- lib/unparser/generation.rb
|
316
|
+
- lib/unparser/node_details.rb
|
317
|
+
- lib/unparser/node_details/send.rb
|
296
318
|
- lib/unparser/node_helpers.rb
|
297
|
-
- lib/unparser/preprocessor.rb
|
298
319
|
- lib/unparser/validation.rb
|
320
|
+
- lib/unparser/writer.rb
|
321
|
+
- lib/unparser/writer/binary.rb
|
322
|
+
- lib/unparser/writer/dynamic_string.rb
|
323
|
+
- lib/unparser/writer/resbody.rb
|
324
|
+
- lib/unparser/writer/rescue.rb
|
325
|
+
- lib/unparser/writer/send.rb
|
326
|
+
- lib/unparser/writer/send/attribute_assignment.rb
|
327
|
+
- lib/unparser/writer/send/binary.rb
|
328
|
+
- lib/unparser/writer/send/conditional.rb
|
329
|
+
- lib/unparser/writer/send/regular.rb
|
330
|
+
- lib/unparser/writer/send/unary.rb
|
299
331
|
homepage: http://github.com/mbj/unparser
|
300
332
|
licenses:
|
301
333
|
- MIT
|
@@ -308,14 +340,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
308
340
|
requirements:
|
309
341
|
- - ">="
|
310
342
|
- !ruby/object:Gem::Version
|
311
|
-
version: '
|
343
|
+
version: '2.5'
|
312
344
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
313
345
|
requirements:
|
314
346
|
- - ">="
|
315
347
|
- !ruby/object:Gem::Version
|
316
348
|
version: '0'
|
317
349
|
requirements: []
|
318
|
-
rubygems_version: 3.
|
350
|
+
rubygems_version: 3.1.4
|
319
351
|
signing_key:
|
320
352
|
specification_version: 4
|
321
353
|
summary: Generate equivalent source for parser gem AST nodes
|