myco 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/myco/bootstrap.my.rb +50 -14
- data/lib/myco/bootstrap/add_method.rb +5 -5
- data/lib/myco/bootstrap/meme.rb +2 -1
- data/lib/myco/code_tools/AST.my.rb +211 -43
- data/lib/myco/code_tools/AST/ArgumentAssembly.my.rb +92 -48
- data/lib/myco/code_tools/AST/ArrayAssembly.my.rb +39 -27
- data/lib/myco/code_tools/AST/Block.my.rb +176 -112
- data/lib/myco/code_tools/AST/BlockArgument.my.rb +29 -17
- data/lib/myco/code_tools/AST/BlockLiteral.my.rb +37 -17
- data/lib/myco/code_tools/AST/BlockParameter.my.rb +25 -9
- data/lib/myco/code_tools/AST/BranchOperator.my.rb +95 -75
- data/lib/myco/code_tools/AST/ConstantAccess.my.rb +52 -32
- data/lib/myco/code_tools/AST/ConstantAssignment.my.rb +52 -36
- data/lib/myco/code_tools/AST/ConstantDefine.my.rb +50 -26
- data/lib/myco/code_tools/AST/DeclareCategory.my.rb +38 -18
- data/lib/myco/code_tools/AST/DeclareExtension.my.rb +29 -13
- data/lib/myco/code_tools/AST/DeclareFile.my.rb +51 -31
- data/lib/myco/code_tools/AST/DeclareMeme.my.rb +96 -68
- data/lib/myco/code_tools/AST/DeclareObject.my.rb +66 -42
- data/lib/myco/code_tools/AST/DeclareString.my.rb +39 -19
- data/lib/myco/code_tools/AST/DeclaredScope.my.rb +92 -64
- data/lib/myco/code_tools/AST/Invoke.my +8 -4
- data/lib/myco/code_tools/AST/Invoke.my.rb +74 -31
- data/lib/myco/code_tools/AST/InvokeMethod.my.rb +34 -14
- data/lib/myco/code_tools/AST/KeywordAssembly.my.rb +36 -24
- data/lib/myco/code_tools/AST/KeywordOptionalParameter.my.rb +28 -8
- data/lib/myco/code_tools/AST/KeywordRequiredParameter.my.rb +23 -7
- data/lib/myco/code_tools/AST/KeywordRestParameter.my.rb +23 -7
- data/lib/myco/code_tools/AST/LocalVariableAccessAmbiguous.my.rb +24 -12
- data/lib/myco/code_tools/AST/LocalVariableAssignment.my.rb +30 -10
- data/lib/myco/code_tools/AST/Node.my.rb +234 -102
- data/lib/myco/code_tools/AST/NumericLiteral.my.rb +18 -6
- data/lib/myco/code_tools/AST/OptionalParameter.my.rb +33 -13
- data/lib/myco/code_tools/AST/ParameterAssembly.my.rb +275 -211
- data/lib/myco/code_tools/AST/PipeOperator.my.rb +42 -18
- data/lib/myco/code_tools/AST/Quest.my.rb +65 -37
- data/lib/myco/code_tools/AST/RequiredParameter.my.rb +20 -4
- data/lib/myco/code_tools/AST/RestParameter.my.rb +20 -4
- data/lib/myco/code_tools/AST/Script.my.rb +51 -23
- data/lib/myco/code_tools/AST/Sequence.my.rb +22 -10
- data/lib/myco/code_tools/AST/SplatValue.my.rb +28 -16
- data/lib/myco/code_tools/AST/StringCompose.my.rb +23 -11
- data/lib/myco/code_tools/AST/StringLiteral.my.rb +19 -7
- data/lib/myco/code_tools/AST/SymbolCompose.my.rb +27 -15
- data/lib/myco/code_tools/AST/SymbolLiteral.my.rb +18 -6
- data/lib/myco/code_tools/AST/ToRuby.my.rb +581 -341
- data/lib/myco/code_tools/AST/misc.my.rb +87 -35
- data/lib/myco/code_tools/Parser.my.rb +39 -12
- data/lib/myco/code_tools/parser/MycoBuilder.my.rb +106 -90
- data/lib/myco/code_tools/parser/MycoCharacterClasses.my.rb +98 -50
- data/lib/myco/code_tools/parser/MycoGrammar.my +1 -6
- data/lib/myco/code_tools/parser/MycoGrammar.my.rb +2124 -1710
- data/lib/myco/code_tools/parser/MycoTokens.my +0 -5
- data/lib/myco/code_tools/parser/MycoTokens.my.rb +387 -156
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces.my.rb +55 -11
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my.rb +321 -205
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Capture.my.rb +223 -127
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common.my.rb +188 -72
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common/Parser.my +48 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common/Parser.my.rb +365 -189
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Composite.my.rb +313 -233
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my.rb +99 -55
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my.rb +493 -325
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream.my.rb +138 -114
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream/Parser.my.rb +56 -44
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String.my.rb +173 -93
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String/Parser.my.rb +90 -70
- data/lib/myco/command.my.rb +85 -25
- data/lib/myco/command/inoculate.my.rb +219 -127
- data/lib/myco/core.my.rb +20 -4
- data/lib/myco/core/BasicDecorators.my.rb +211 -119
- data/lib/myco/core/BasicObject.my.rb +108 -44
- data/lib/myco/core/Category.my.rb +37 -13
- data/lib/myco/core/Decorator.my.rb +35 -27
- data/lib/myco/core/FileToplevel.my.rb +55 -27
- data/lib/myco/core/Loop.my.rb +16 -8
- data/lib/myco/core/Object.my.rb +34 -14
- data/lib/myco/core/Ruby.my.rb +13 -5
- data/lib/myco/core/Switch.my.rb +79 -47
- data/lib/myco/tools/BasicCommand.my.rb +79 -47
- data/lib/myco/tools/mycompile.my.rb +153 -69
- data/lib/myco/version.rb +1 -1
- metadata +34 -52
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my +0 -144
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my.rb +0 -221
- data/lib/myco/code_tools/parser/pegleromyces/spec/BasicSpec.my +0 -35
- data/lib/myco/code_tools/parser/pegleromyces/spec/BasicSpec.my.rb +0 -35
- data/lib/myco/code_tools/parser/pegleromyces/spec/Grammar.test.my +0 -10
- data/lib/myco/code_tools/parser/pegleromyces/spec/Grammar.test.my.rb +0 -9
- data/lib/myco/code_tools/parser/pegleromyces/spec/Patterns.test.my +0 -162
- data/lib/myco/code_tools/parser/pegleromyces/spec/Patterns.test.my.rb +0 -353
- data/lib/myco/code_tools/parser/pegleromyces/spec/Processor.test.my +0 -10
- data/lib/myco/code_tools/parser/pegleromyces/spec/Processor.test.my.rb +0 -9
- data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Parser.test.my +0 -49
- data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Parser.test.my.rb +0 -119
- data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Patterns.test.my +0 -131
- data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Patterns.test.my.rb +0 -595
- data/lib/myco/code_tools/parser/pegleromyces/spec/String/Parser.test.my +0 -120
- data/lib/myco/code_tools/parser/pegleromyces/spec/String/Parser.test.my.rb +0 -350
- data/lib/myco/code_tools/parser/pegleromyces/spec/run.my +0 -14
- data/lib/myco/code_tools/parser/pegleromyces/spec/run.my.rb +0 -12
@@ -2,23 +2,47 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::PipeOperator = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
declare_meme(
|
16
|
-
:
|
17
|
-
:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
5
|
+
declare_meme(
|
6
|
+
:pipe_op,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:value,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:invoke,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:implementation_args,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:ArgumentAssembly).new({
|
24
|
+
:line => self.line,
|
25
|
+
:body => [self.value].__send__(
|
26
|
+
:+,
|
27
|
+
::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(self.invoke.arguments, :body).false? ? ::Myco::Void : self.invoke.arguments.body)) {[]}
|
28
|
+
)
|
29
|
+
}))}
|
30
|
+
)
|
31
|
+
declare_meme(
|
32
|
+
:implementation,
|
33
|
+
[],
|
34
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:Invoke).new({
|
35
|
+
:line => self.line,
|
36
|
+
:receiver => self.invoke.receiver,
|
37
|
+
:name => self.invoke.name,
|
38
|
+
:arguments => self.implementation_args,
|
39
|
+
:block => self.invoke.block
|
40
|
+
}))}
|
41
|
+
)
|
42
|
+
declare_meme(
|
43
|
+
:bytecode,
|
44
|
+
[],
|
45
|
+
::Object::Proc.new { |g| (self.implementation.bytecode(g))}
|
46
|
+
)
|
23
47
|
)}}
|
24
48
|
.tap { |__c__| __c__.__name__ = :PipeOperator })})}}.instance
|
@@ -2,45 +2,73 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::Quest = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
)
|
15
|
-
declare_meme(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
g
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
5
|
+
declare_meme(
|
6
|
+
:quest,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:receiver,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:questable,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:questable,
|
22
|
+
[:setter],
|
23
|
+
::Object::Proc.new { |given| (
|
24
|
+
given.__send__(
|
25
|
+
:receiver=,
|
26
|
+
::Myco.find_constant(:FakeReceiver).new({:line => self.line})
|
27
|
+
)
|
28
|
+
given
|
29
|
+
)}
|
30
|
+
)
|
31
|
+
declare_meme(
|
32
|
+
:bytecode,
|
33
|
+
[],
|
34
|
+
::Object::Proc.new { |g| (
|
35
|
+
self.pos(g)
|
36
|
+
else_label = g.new_label
|
37
|
+
end_label = g.new_label
|
38
|
+
self.receiver.bytecode(g)
|
39
|
+
g.dup_top
|
40
|
+
g.push_type
|
41
|
+
g.swap
|
42
|
+
g.push_literal(self.questable.name)
|
43
|
+
g.send(
|
44
|
+
:object_respond_to?,
|
45
|
+
2
|
46
|
+
)
|
47
|
+
g.send(
|
48
|
+
:false?,
|
49
|
+
0
|
50
|
+
)
|
51
|
+
g.goto_if_true(else_label)
|
52
|
+
self.questable.bytecode(g)
|
53
|
+
g.goto(end_label)
|
54
|
+
else_label.__send__(:set!)
|
55
|
+
g.pop
|
56
|
+
g.push_void
|
57
|
+
end_label.__send__(:set!)
|
58
|
+
)}
|
59
|
+
)
|
40
60
|
::Myco.cscope.for_method_definition::FakeReceiver = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
41
61
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
42
|
-
declare_meme(
|
43
|
-
|
62
|
+
declare_meme(
|
63
|
+
:qrcvr,
|
64
|
+
[:node_type],
|
65
|
+
::Object::Proc.new { |*| nil}
|
66
|
+
)
|
67
|
+
declare_meme(
|
68
|
+
:bytecode,
|
69
|
+
[],
|
70
|
+
::Object::Proc.new { |g| (self.pos(g))}
|
71
|
+
)
|
44
72
|
)}}
|
45
73
|
.tap { |__c__| __c__.__name__ = :FakeReceiver }
|
46
74
|
)}}
|
@@ -2,9 +2,25 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::RequiredParameter = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
declare_meme(
|
6
|
+
:reqprm,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:name,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:map_local,
|
17
|
+
[],
|
18
|
+
::Object::Proc.new { |scope| (scope.new_local(self.name))}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:bytecode,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |g| nil}
|
24
|
+
)
|
9
25
|
)}}
|
10
26
|
.tap { |__c__| __c__.__name__ = :RequiredParameter })})}}.instance
|
@@ -2,9 +2,25 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::RestParameter = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
declare_meme(
|
6
|
+
:restprm,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:name,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:map_local,
|
17
|
+
[],
|
18
|
+
::Object::Proc.new { |scope| (scope.new_local(::Myco.branch_op(:"||", self.name) {:*}))}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:bytecode,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |g| nil}
|
24
|
+
)
|
9
25
|
)}}
|
10
26
|
.tap { |__c__| __c__.__name__ = :RestParameter })})}}.instance
|
@@ -2,28 +2,56 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::Script = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
5
|
+
declare_meme(
|
6
|
+
:script,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:file,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:body,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:variable_scope,
|
22
|
+
[:var],
|
23
|
+
::Object::Proc.new { |*| nil}
|
24
|
+
)
|
25
|
+
declare_meme(
|
26
|
+
:nest_scope,
|
27
|
+
[],
|
28
|
+
::Object::Proc.new { |scope| (scope.__send__(
|
29
|
+
:parent=,
|
30
|
+
self
|
31
|
+
))}
|
32
|
+
)
|
33
|
+
declare_meme(
|
34
|
+
:search_local,
|
35
|
+
[],
|
36
|
+
::Object::Proc.new { |*| (nil)}
|
37
|
+
)
|
38
|
+
declare_meme(
|
39
|
+
:bytecode,
|
40
|
+
[],
|
41
|
+
::Object::Proc.new { |g| (
|
42
|
+
g.__send__(
|
43
|
+
:name=,
|
44
|
+
:__script__
|
45
|
+
)
|
46
|
+
g.__send__(
|
47
|
+
:file=,
|
48
|
+
self.file.to_sym
|
49
|
+
)
|
50
|
+
g.push_state(self)
|
51
|
+
self.body.bytecode(g)
|
52
|
+
g.ret
|
53
|
+
g.pop_state
|
54
|
+
)}
|
55
|
+
)
|
28
56
|
)}}
|
29
57
|
.tap { |__c__| __c__.__name__ = :Script })})}}.instance
|
@@ -2,16 +2,28 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::Sequence = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
declare_meme(
|
6
|
+
:sequence,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:array,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:bytecode,
|
17
|
+
[],
|
18
|
+
::Object::Proc.new { |g| (
|
19
|
+
ary = self.array.dup
|
20
|
+
last = ary.pop
|
21
|
+
ary.each { |item| (
|
22
|
+
item.bytecode(g)
|
23
|
+
g.pop
|
24
|
+
)}
|
25
|
+
last.bytecode(g)
|
13
26
|
)}
|
14
|
-
|
15
|
-
)}
|
27
|
+
)
|
16
28
|
)}}
|
17
29
|
.tap { |__c__| __c__.__name__ = :Sequence })})}}.instance
|
@@ -2,21 +2,33 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::SplatValue = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
g
|
19
|
-
|
20
|
-
|
5
|
+
declare_meme(
|
6
|
+
:splat,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:value,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:bytecode,
|
17
|
+
[],
|
18
|
+
::Object::Proc.new { |g| (
|
19
|
+
self.value.bytecode(g)
|
20
|
+
g.dup
|
21
|
+
g.push_rubinius
|
22
|
+
g.find_const(:Runtime)
|
23
|
+
g.swap
|
24
|
+
g.send(
|
25
|
+
:dup_as_array,
|
26
|
+
1,
|
27
|
+
true
|
28
|
+
)
|
29
|
+
g.swap
|
30
|
+
g.pop
|
31
|
+
)}
|
32
|
+
)
|
21
33
|
)}}
|
22
34
|
.tap { |__c__| __c__.__name__ = :SplatValue })})}}.instance
|
@@ -2,18 +2,30 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(::Myco.cscope.for_method_definition::StringCompose = ::Myco::Component.new([::Myco.find_constant(:Node)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
4
4
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
5
|
-
declare_meme(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
declare_meme(
|
6
|
+
:string_compose,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:body,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:bytecode,
|
17
|
+
[],
|
18
|
+
::Object::Proc.new { |g| (
|
19
|
+
self.pos(g)
|
20
|
+
self.body.each_slice(2) { |string, other| (
|
21
|
+
g.push_literal(string.value.to_s)
|
22
|
+
::Myco.branch_op(:"&&", other) {(
|
23
|
+
other.bytecode(g)
|
24
|
+
g.meta_to_s
|
25
|
+
)}
|
14
26
|
)}
|
27
|
+
g.string_build(self.body.size)
|
15
28
|
)}
|
16
|
-
|
17
|
-
)}
|
29
|
+
)
|
18
30
|
)}}
|
19
31
|
.tap { |__c__| __c__.__name__ = :StringCompose })})}}.instance
|