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,25 +2,45 @@
|
|
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::DeclareString = ::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
|
-
:
|
5
|
+
declare_meme(
|
6
|
+
:declstr,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:types,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:string,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:implementation,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:InvokeMethod).new({
|
12
24
|
:line => self.string.line,
|
13
|
-
:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
)
|
25
|
+
:name => :from_string,
|
26
|
+
:arguments => ::Myco.find_constant(:ArgumentAssembly).new({
|
27
|
+
:line => self.string.line,
|
28
|
+
:body => [self.string]
|
29
|
+
}),
|
30
|
+
:receiver => ::Myco.find_constant(:DeclareObject).new({
|
31
|
+
:line => self.line,
|
32
|
+
:types => self.types,
|
33
|
+
:body => ::Myco.find_constant(:NullLiteral).new({:line => self.line})
|
34
|
+
})
|
35
|
+
}))}
|
36
|
+
)
|
37
|
+
declare_meme(
|
38
|
+
:bytecode,
|
39
|
+
[],
|
40
|
+
::Object::Proc.new { |g| (
|
41
|
+
self.pos(g)
|
42
|
+
self.implementation.bytecode(g)
|
43
|
+
)}
|
44
|
+
)
|
25
45
|
)}}
|
26
46
|
.tap { |__c__| __c__.__name__ = :DeclareString })})}}.instance
|
@@ -5,73 +5,101 @@
|
|
5
5
|
::Myco.find_constant(:Node)
|
6
6
|
], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
7
7
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
8
|
-
declare_meme(
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
8
|
+
declare_meme(
|
9
|
+
:name,
|
10
|
+
[:var],
|
11
|
+
::Object::Proc.new { |*| nil}
|
12
|
+
)
|
13
|
+
declare_meme(
|
14
|
+
:body,
|
15
|
+
[:var],
|
16
|
+
::Object::Proc.new { |*| nil}
|
17
|
+
)
|
18
|
+
declare_meme(
|
19
|
+
:scope_method,
|
20
|
+
[:var],
|
21
|
+
::Object::Proc.new { |*| nil}
|
22
|
+
)
|
23
|
+
declare_meme(
|
24
|
+
:bytecode,
|
25
|
+
[],
|
26
|
+
::Object::Proc.new { |g| (
|
27
|
+
self.pos(g)
|
28
|
+
g.state.scope.nest_scope(self)
|
29
|
+
name = :__declaration__
|
30
|
+
meth = self.new_generator(
|
31
|
+
g,
|
32
|
+
name
|
32
33
|
)
|
33
|
-
meth.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
self.
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
)
|
47
|
-
meth.pop_state
|
48
|
-
g.create_block(meth)
|
49
|
-
g.swap
|
50
|
-
g.push_scope
|
51
|
-
g.push_true
|
52
|
-
g.send(
|
53
|
-
:call_under,
|
54
|
-
3
|
55
|
-
)
|
56
|
-
meth
|
57
|
-
)}
|
58
|
-
declare_meme(:nest_scope, [], nil, ::Myco.cscope.dup) { |scope| (scope.__send__(
|
59
|
-
:parent=,
|
60
|
-
self
|
61
|
-
))}
|
62
|
-
declare_meme(:parent, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
|
63
|
-
declare_meme(:search_local, [], nil, ::Myco.cscope.dup) { |name| (
|
64
|
-
reference = self.parent.search_local(name)
|
65
|
-
::Myco.branch_op(:"&&", reference) {(
|
66
|
-
reference.__send__(
|
67
|
-
:depth=,
|
68
|
-
reference.depth.__send__(
|
69
|
-
:+,
|
70
|
-
1
|
34
|
+
meth.push_state(self)
|
35
|
+
meth.__send__(
|
36
|
+
:for_module_body=,
|
37
|
+
true
|
38
|
+
)
|
39
|
+
meth.push_self
|
40
|
+
meth.add_scope
|
41
|
+
meth.state.push_name(name.to_sym)
|
42
|
+
::Myco.branch_op(:"&&", self.scope_method) {(
|
43
|
+
meth.push_scope
|
44
|
+
meth.send(
|
45
|
+
self.scope_method,
|
46
|
+
0
|
71
47
|
)
|
48
|
+
meth.pop
|
49
|
+
)}
|
50
|
+
self.body.bytecode(meth)
|
51
|
+
meth.state.pop_name
|
52
|
+
meth.ret
|
53
|
+
meth.close
|
54
|
+
meth.__send__(
|
55
|
+
:local_count=,
|
56
|
+
self.local_count
|
57
|
+
)
|
58
|
+
meth.__send__(
|
59
|
+
:local_names=,
|
60
|
+
self.local_names
|
72
61
|
)
|
73
|
-
|
62
|
+
meth.pop_state
|
63
|
+
g.create_block(meth)
|
64
|
+
g.swap
|
65
|
+
g.push_scope
|
66
|
+
g.push_true
|
67
|
+
g.send(
|
68
|
+
:call_under,
|
69
|
+
3
|
70
|
+
)
|
71
|
+
meth
|
72
|
+
)}
|
73
|
+
)
|
74
|
+
declare_meme(
|
75
|
+
:nest_scope,
|
76
|
+
[],
|
77
|
+
::Object::Proc.new { |scope| (scope.__send__(
|
78
|
+
:parent=,
|
79
|
+
self
|
80
|
+
))}
|
81
|
+
)
|
82
|
+
declare_meme(
|
83
|
+
:parent,
|
84
|
+
[:var],
|
85
|
+
::Object::Proc.new { |*| nil}
|
86
|
+
)
|
87
|
+
declare_meme(
|
88
|
+
:search_local,
|
89
|
+
[],
|
90
|
+
::Object::Proc.new { |name| (
|
91
|
+
reference = self.parent.search_local(name)
|
92
|
+
::Myco.branch_op(:"&&", reference) {(
|
93
|
+
reference.__send__(
|
94
|
+
:depth=,
|
95
|
+
reference.depth.__send__(
|
96
|
+
:+,
|
97
|
+
1
|
98
|
+
)
|
99
|
+
)
|
100
|
+
reference
|
101
|
+
)}
|
74
102
|
)}
|
75
|
-
)
|
103
|
+
)
|
76
104
|
)}}
|
77
105
|
.tap { |__c__| __c__.__name__ = :DeclaredScope })})}}.instance
|
@@ -18,10 +18,14 @@ CodeTools::AST << {
|
|
18
18
|
)
|
19
19
|
|
20
20
|
!self.receiver && !use_args &? (
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
)
|
21
|
+
(self.name == :self) &? (Self .new(line: self.line)
|
22
|
+
) ?? ((self.name == :null) &? (NullLiteral .new(line: self.line)
|
23
|
+
) ?? ((self.name == :void) &? (VoidLiteral .new(line: self.line)
|
24
|
+
) ?? ((self.name == :true) &? (TrueLiteral .new(line: self.line)
|
25
|
+
) ?? ((self.name == :false) &? (FalseLiteral.new(line: self.line)
|
26
|
+
) ?? (
|
27
|
+
LocalVariableAccessAmbiguous.new(line: self.line, name: self.name)
|
28
|
+
)))))
|
25
29
|
) ?? (
|
26
30
|
InvokeMethod.new(
|
27
31
|
line: self.line
|
@@ -2,39 +2,82 @@
|
|
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::Invoke = ::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
|
-
declare_meme(
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
5
|
+
declare_meme(
|
6
|
+
:invoke,
|
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
|
+
:name,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:arguments,
|
22
|
+
[:field],
|
23
|
+
::Object::Proc.new { |*| nil}
|
24
|
+
)
|
25
|
+
declare_meme(
|
26
|
+
:block,
|
27
|
+
[:field],
|
28
|
+
::Object::Proc.new { |*| nil}
|
29
|
+
)
|
30
|
+
declare_meme(
|
31
|
+
:bytecode,
|
32
|
+
[],
|
33
|
+
::Object::Proc.new { |g| (
|
34
|
+
self.pos(g)
|
35
|
+
self.implementation.bytecode(g)
|
25
36
|
)}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
:
|
33
|
-
|
37
|
+
)
|
38
|
+
declare_meme(
|
39
|
+
:implementation,
|
40
|
+
[],
|
41
|
+
::Object::Proc.new { |*| (
|
42
|
+
use_args = self.arguments
|
43
|
+
::Myco.branch_op(:"&&", self.block) {(
|
44
|
+
use_args = ::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", use_args) {use_args.dup}) {::Myco.find_constant(:ArgumentAssembly).new({
|
45
|
+
:line => self.line,
|
46
|
+
:body => []
|
47
|
+
})}
|
48
|
+
use_args.__send__(
|
49
|
+
:block=,
|
50
|
+
self.block
|
51
|
+
)
|
52
|
+
)}
|
53
|
+
::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", ::Myco.branch_op(:"&&", self.receiver.__send__(:!)) {use_args.__send__(:!)}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
|
54
|
+
:==,
|
55
|
+
:self
|
56
|
+
)) {::Myco.find_constant(:Self).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
|
57
|
+
:==,
|
58
|
+
:null
|
59
|
+
)) {::Myco.find_constant(:NullLiteral).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
|
60
|
+
:==,
|
61
|
+
:void
|
62
|
+
)) {::Myco.find_constant(:VoidLiteral).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
|
63
|
+
:==,
|
64
|
+
:true
|
65
|
+
)) {::Myco.find_constant(:TrueLiteral).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
|
66
|
+
:==,
|
67
|
+
:false
|
68
|
+
)) {::Myco.find_constant(:FalseLiteral).new({:line => self.line})}) {::Myco.find_constant(:LocalVariableAccessAmbiguous).new({
|
34
69
|
:line => self.line,
|
35
|
-
:
|
70
|
+
:name => self.name
|
71
|
+
})}}}}}}) {::Myco.find_constant(:InvokeMethod).new({
|
72
|
+
:line => self.line,
|
73
|
+
:receiver => ::Myco.branch_op(:"||", self.receiver) {::Myco.find_constant(:Self).new({:line => self.line})},
|
74
|
+
:name => self.name,
|
75
|
+
:arguments => ::Myco.branch_op(:"||", use_args) {::Myco.find_constant(:ArgumentAssembly).new({
|
76
|
+
:line => self.line,
|
77
|
+
:body => []
|
78
|
+
})}
|
36
79
|
})}
|
37
|
-
|
38
|
-
)
|
80
|
+
)}
|
81
|
+
)
|
39
82
|
)}}
|
40
83
|
.tap { |__c__| __c__.__name__ = :Invoke })})}}.instance
|
@@ -2,19 +2,39 @@
|
|
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::InvokeMethod = ::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
|
-
|
5
|
+
declare_meme(
|
6
|
+
:call,
|
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
|
+
:name,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:arguments,
|
22
|
+
[:field],
|
23
|
+
::Object::Proc.new { |*| nil}
|
24
|
+
)
|
25
|
+
declare_meme(
|
26
|
+
:bytecode,
|
27
|
+
[],
|
28
|
+
::Object::Proc.new { |g| (
|
29
|
+
self.receiver.bytecode(g)
|
30
|
+
self.arguments.bytecode(g)
|
31
|
+
self.pos(g)
|
32
|
+
g.__send__(
|
33
|
+
self.arguments.send_op,
|
34
|
+
self.name,
|
35
|
+
self.arguments.send_count
|
36
|
+
)
|
37
|
+
)}
|
38
|
+
)
|
19
39
|
)}}
|
20
40
|
.tap { |__c__| __c__.__name__ = :InvokeMethod })})}}.instance
|
@@ -2,32 +2,44 @@
|
|
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::KeywordAssembly = ::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
|
-
g.
|
23
|
-
|
24
|
-
value.bytecode(g)
|
25
|
-
g.send(
|
26
|
-
:[]=,
|
5
|
+
declare_meme(
|
6
|
+
:hash,
|
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
|
+
g.push_cpath_top
|
21
|
+
g.find_const(:Hash)
|
22
|
+
g.push(self.body.size.__send__(
|
23
|
+
:/,
|
27
24
|
2
|
25
|
+
))
|
26
|
+
g.send(
|
27
|
+
:new_from_literal,
|
28
|
+
1
|
28
29
|
)
|
29
|
-
|
30
|
+
self.body.each_slice(2) { |pair| (
|
31
|
+
key = pair.first
|
32
|
+
value = pair.last
|
33
|
+
g.dup
|
34
|
+
key.bytecode(g)
|
35
|
+
value.bytecode(g)
|
36
|
+
g.send(
|
37
|
+
:[]=,
|
38
|
+
2
|
39
|
+
)
|
40
|
+
g.pop
|
41
|
+
)}
|
30
42
|
)}
|
31
|
-
)
|
43
|
+
)
|
32
44
|
)}}
|
33
45
|
.tap { |__c__| __c__.__name__ = :KeywordAssembly })})}}.instance
|