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,14 +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::BlockParameter = ::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
|
+
:blkprm,
|
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| (
|
24
|
+
self.pos(g)
|
25
|
+
g.push_proc
|
26
|
+
g.state.scope.search_local(self.name).set_bytecode(g)
|
27
|
+
g.pop
|
28
|
+
)}
|
29
|
+
)
|
14
30
|
)}}
|
15
31
|
.tap { |__c__| __c__.__name__ = :BlockParameter })})}}.instance
|
@@ -2,81 +2,101 @@
|
|
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::BranchOperator = ::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
|
-
|
5
|
+
declare_meme(
|
6
|
+
:branch_op,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:type,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:left,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:right,
|
22
|
+
[:field],
|
23
|
+
::Object::Proc.new { |*| nil}
|
24
|
+
)
|
25
|
+
declare_meme(
|
26
|
+
:bytecode,
|
27
|
+
[],
|
28
|
+
::Object::Proc.new { |g| (
|
29
|
+
self.pos(g)
|
30
|
+
done_label = g.new_label
|
31
|
+
right_label = g.new_label
|
32
|
+
otherwise_push_void = false
|
33
|
+
self.left.bytecode(g)
|
34
|
+
::Myco.branch_op(:"&&", self.type.__send__(
|
35
|
+
:==,
|
36
|
+
:"&&"
|
37
|
+
)) {(
|
38
|
+
g.dup_top
|
39
|
+
g.send(
|
40
|
+
:false?,
|
41
|
+
0
|
42
|
+
)
|
43
|
+
g.goto_if_true(done_label)
|
44
|
+
g.pop
|
45
|
+
)}
|
46
|
+
::Myco.branch_op(:"&&", self.type.__send__(
|
47
|
+
:==,
|
48
|
+
:"||"
|
49
|
+
)) {(
|
50
|
+
g.dup_top
|
51
|
+
g.send(
|
52
|
+
:false?,
|
53
|
+
0
|
54
|
+
)
|
55
|
+
g.goto_if_false(done_label)
|
56
|
+
g.pop
|
57
|
+
)}
|
58
|
+
::Myco.branch_op(:"&&", self.type.__send__(
|
59
|
+
:==,
|
60
|
+
:"??"
|
61
|
+
)) {(
|
62
|
+
g.dup_top
|
63
|
+
g.send(
|
64
|
+
:void?,
|
65
|
+
0
|
66
|
+
)
|
67
|
+
g.goto_if_false(done_label)
|
68
|
+
g.pop
|
69
|
+
)}
|
70
|
+
::Myco.branch_op(:"&&", self.type.__send__(
|
71
|
+
:==,
|
72
|
+
:"&?"
|
73
|
+
)) {(
|
74
|
+
g.send(
|
75
|
+
:false?,
|
76
|
+
0
|
77
|
+
)
|
78
|
+
g.goto_if_false(right_label)
|
79
|
+
otherwise_push_void = true
|
80
|
+
)}
|
81
|
+
::Myco.branch_op(:"&&", self.type.__send__(
|
82
|
+
:==,
|
83
|
+
:"|?"
|
84
|
+
)) {(
|
85
|
+
g.send(
|
86
|
+
:false?,
|
87
|
+
0
|
88
|
+
)
|
89
|
+
g.goto_if_true(right_label)
|
90
|
+
otherwise_push_void = true
|
91
|
+
)}
|
92
|
+
::Myco.branch_op(:"&&", otherwise_push_void) {(
|
93
|
+
g.push_void
|
94
|
+
g.goto(done_label)
|
95
|
+
right_label.__send__(:set!)
|
96
|
+
)}
|
97
|
+
self.right.bytecode(g)
|
98
|
+
done_label.__send__(:set!)
|
26
99
|
)}
|
27
|
-
|
28
|
-
:==,
|
29
|
-
:"||"
|
30
|
-
)) {(
|
31
|
-
g.dup_top
|
32
|
-
g.send(
|
33
|
-
:false?,
|
34
|
-
0
|
35
|
-
)
|
36
|
-
g.goto_if_false(done_label)
|
37
|
-
g.pop
|
38
|
-
)}
|
39
|
-
::Myco.branch_op(:"&&", self.type.__send__(
|
40
|
-
:==,
|
41
|
-
:"??"
|
42
|
-
)) {(
|
43
|
-
g.dup_top
|
44
|
-
g.send(
|
45
|
-
:void?,
|
46
|
-
0
|
47
|
-
)
|
48
|
-
g.goto_if_false(done_label)
|
49
|
-
g.pop
|
50
|
-
)}
|
51
|
-
::Myco.branch_op(:"&&", self.type.__send__(
|
52
|
-
:==,
|
53
|
-
:"&?"
|
54
|
-
)) {(
|
55
|
-
g.send(
|
56
|
-
:false?,
|
57
|
-
0
|
58
|
-
)
|
59
|
-
g.goto_if_false(right_label)
|
60
|
-
otherwise_push_void = true
|
61
|
-
)}
|
62
|
-
::Myco.branch_op(:"&&", self.type.__send__(
|
63
|
-
:==,
|
64
|
-
:"|?"
|
65
|
-
)) {(
|
66
|
-
g.send(
|
67
|
-
:false?,
|
68
|
-
0
|
69
|
-
)
|
70
|
-
g.goto_if_true(right_label)
|
71
|
-
otherwise_push_void = true
|
72
|
-
)}
|
73
|
-
::Myco.branch_op(:"&&", otherwise_push_void) {(
|
74
|
-
g.push_void
|
75
|
-
g.goto(done_label)
|
76
|
-
right_label.__send__(:set!)
|
77
|
-
)}
|
78
|
-
self.right.bytecode(g)
|
79
|
-
done_label.__send__(:set!)
|
80
|
-
)}
|
100
|
+
)
|
81
101
|
)}}
|
82
102
|
.tap { |__c__| __c__.__name__ = :BranchOperator })})}}.instance
|
@@ -2,39 +2,59 @@
|
|
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::ConstantAccess = ::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
|
-
|
5
|
+
declare_meme(
|
6
|
+
:const,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:toplevel,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:names,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:bytecode,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |g| (
|
24
|
+
self.pos(g)
|
25
|
+
name_list = self.names.map(&:to_sym)
|
26
|
+
first_name = name_list.shift
|
27
|
+
::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.toplevel) {self.case(
|
28
|
+
first_name,
|
29
|
+
:Myco,
|
30
|
+
::Object::Proc.new { |*| (g.push_myco)},
|
31
|
+
:Ruby,
|
32
|
+
::Object::Proc.new { |*| (g.push_cpath_top)},
|
33
|
+
:Rubinius,
|
34
|
+
::Object::Proc.new { |*| (g.push_rubinius)},
|
35
|
+
::Object::Proc.new { |*| (
|
36
|
+
g.push_myco
|
37
|
+
g.find_const(first_name)
|
38
|
+
)}
|
39
|
+
)}) {::Myco.find_constant(:Myco).find_constant_bytecode(
|
40
|
+
g,
|
41
|
+
first_name
|
23
42
|
)}
|
24
|
-
|
25
|
-
g,
|
26
|
-
first_name
|
43
|
+
name_list.each { |name| (g.find_const(name))}
|
27
44
|
)}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
g
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
45
|
+
)
|
46
|
+
::Myco::SingletonClass.component_eval {(declare_meme(
|
47
|
+
:find_constant_bytecode,
|
48
|
+
[],
|
49
|
+
::Object::Proc.new { |g, name| (
|
50
|
+
g.push_myco
|
51
|
+
g.push_literal(name)
|
52
|
+
g.push_scope
|
53
|
+
g.send(
|
54
|
+
:find_constant,
|
55
|
+
2
|
56
|
+
)
|
57
|
+
)}
|
58
|
+
))}
|
39
59
|
)}}
|
40
60
|
.tap { |__c__| __c__.__name__ = :ConstantAccess })})}}.instance
|
@@ -2,43 +2,59 @@
|
|
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::ConstantAssignment = ::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
|
-
first_name
|
28
|
-
|
29
|
-
|
5
|
+
declare_meme(
|
6
|
+
:cdecl,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:constant,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:value,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:bytecode,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |g| (
|
24
|
+
self.pos(g)
|
25
|
+
name_list = self.constant.names.map(&:to_sym)
|
26
|
+
last_name = name_list.pop
|
27
|
+
first_name = ::Myco.branch_op(:"&&", name_list.__send__(:any?)) {name_list.shift}
|
28
|
+
::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.constant.toplevel) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", first_name) {self.case(
|
29
|
+
first_name,
|
30
|
+
:Myco,
|
31
|
+
::Object::Proc.new { |*| (g.push_myco)},
|
32
|
+
:Ruby,
|
33
|
+
::Object::Proc.new { |*| (g.push_cpath_top)},
|
34
|
+
:Rubinius,
|
35
|
+
::Object::Proc.new { |*| (g.push_rubinius)},
|
36
|
+
::Object::Proc.new { |*| (
|
37
|
+
g.push_myco
|
38
|
+
g.find_const(first_name)
|
39
|
+
)}
|
40
|
+
)}) {g.push_myco}}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", first_name) {::Myco.find_constant(:Myco).find_constant_bytecode(
|
41
|
+
g,
|
42
|
+
first_name
|
43
|
+
)}) {(
|
44
|
+
g.push_scope
|
45
|
+
g.send(
|
46
|
+
:for_method_definition,
|
47
|
+
0
|
48
|
+
)
|
49
|
+
)}}
|
50
|
+
name_list.each { |name| (g.find_const(name))}
|
51
|
+
g.push_literal(last_name)
|
52
|
+
self.value.bytecode(g)
|
30
53
|
g.send(
|
31
|
-
:
|
32
|
-
|
54
|
+
:const_set,
|
55
|
+
2
|
33
56
|
)
|
34
|
-
)}
|
35
|
-
|
36
|
-
g.push_literal(last_name)
|
37
|
-
self.value.bytecode(g)
|
38
|
-
g.send(
|
39
|
-
:const_set,
|
40
|
-
2
|
41
|
-
)
|
42
|
-
)}
|
57
|
+
)}
|
58
|
+
)
|
43
59
|
)}}
|
44
60
|
.tap { |__c__| __c__.__name__ = :ConstantAssignment })})}}.instance
|
@@ -2,31 +2,55 @@
|
|
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::ConstantDefine = ::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
|
-
declare_meme(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
5
|
+
declare_meme(
|
6
|
+
:cdefn,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:constant,
|
12
|
+
[:field],
|
13
|
+
::Object::Proc.new { |*| nil}
|
14
|
+
)
|
15
|
+
declare_meme(
|
16
|
+
:object,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:implementation,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:ConstantAssignment).new({
|
24
|
+
:line => self.line,
|
25
|
+
:constant => self.constant,
|
26
|
+
:value => self.object
|
27
|
+
}))}
|
28
|
+
)
|
29
|
+
declare_meme(
|
30
|
+
:object,
|
31
|
+
[:setter],
|
32
|
+
::Object::Proc.new { |given| (
|
33
|
+
given.__send__(
|
34
|
+
:create=,
|
35
|
+
false
|
36
|
+
)
|
37
|
+
given
|
38
|
+
)}
|
39
|
+
)
|
40
|
+
declare_meme(
|
41
|
+
:bytecode,
|
42
|
+
[],
|
43
|
+
::Object::Proc.new { |g| (
|
44
|
+
self.pos(g)
|
45
|
+
self.implementation.bytecode(g)
|
46
|
+
g.dup_top
|
47
|
+
g.push_literal(self.constant.names.last)
|
48
|
+
g.send(
|
49
|
+
:__name__=,
|
50
|
+
1
|
51
|
+
)
|
52
|
+
g.pop
|
53
|
+
)}
|
54
|
+
)
|
31
55
|
)}}
|
32
56
|
.tap { |__c__| __c__.__name__ = :ConstantDefine })})}}.instance
|