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,43 @@
|
|
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::DeclareCategory = ::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
|
+
:category,
|
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
|
+
:body,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:scope_implementation,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:DeclaredScope).new({
|
24
|
+
:line => self.line,
|
25
|
+
:body => self.body,
|
26
|
+
:scope_method => :set_myco_category
|
27
|
+
}))}
|
28
|
+
)
|
29
|
+
declare_meme(
|
30
|
+
:bytecode,
|
31
|
+
[],
|
32
|
+
::Object::Proc.new { |g| (
|
33
|
+
self.pos(g)
|
34
|
+
g.push_self
|
35
|
+
g.push_literal(self.name)
|
36
|
+
g.send(
|
37
|
+
:__category__,
|
38
|
+
1
|
39
|
+
)
|
40
|
+
self.scope_implementation.bytecode(g)
|
41
|
+
)}
|
42
|
+
)
|
23
43
|
)}}
|
24
44
|
.tap { |__c__| __c__.__name__ = :DeclareCategory })})}}.instance
|
@@ -2,18 +2,34 @@
|
|
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::DeclareExtension = ::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
|
-
|
5
|
+
declare_meme(
|
6
|
+
:copen,
|
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
|
+
:body,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:bytecode,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |g| (
|
24
|
+
self.pos(g)
|
25
|
+
scope = ::Myco.find_constant(:DeclaredScope).new({
|
26
|
+
:line => self.line,
|
27
|
+
:body => self.body,
|
28
|
+
:scope_method => :set_myco_component
|
29
|
+
})
|
30
|
+
self.constant.bytecode(g)
|
31
|
+
scope.bytecode(g)
|
32
|
+
)}
|
33
|
+
)
|
18
34
|
)}}
|
19
35
|
.tap { |__c__| __c__.__name__ = :DeclareExtension })})}}.instance
|
@@ -2,36 +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::DeclareFile = ::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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
5
|
+
declare_meme(
|
6
|
+
:declfile,
|
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
|
+
:inspect,
|
17
|
+
[],
|
18
|
+
::Object::Proc.new { |*| (self.to_s)}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:implementation,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |*| (
|
24
|
+
type = ::Myco.find_constant(:ConstantAccess).new({
|
25
|
+
:line => self.line,
|
26
|
+
:toplevel => true,
|
27
|
+
:names => [
|
28
|
+
:Myco,
|
29
|
+
:FileToplevel
|
30
|
+
]
|
31
|
+
})
|
32
|
+
types = ::Myco.find_constant(:ArrayAssembly).new({
|
33
|
+
:line => self.line,
|
34
|
+
:body => [type]
|
35
|
+
})
|
36
|
+
decl = ::Myco.find_constant(:DeclareObject).new({
|
37
|
+
:line => self.line,
|
38
|
+
:types => types,
|
39
|
+
:body => self.body
|
40
|
+
})
|
41
|
+
decl.scope_implementation.__send__(
|
42
|
+
:scope_method=,
|
43
|
+
:set_myco_file
|
44
|
+
)
|
45
|
+
decl
|
46
|
+
)}
|
47
|
+
)
|
48
|
+
declare_meme(
|
49
|
+
:bytecode,
|
50
|
+
[],
|
51
|
+
::Object::Proc.new { |g| (
|
52
|
+
self.pos(g)
|
53
|
+
self.implementation.bytecode(g)
|
54
|
+
)}
|
55
|
+
)
|
36
56
|
)}}
|
37
57
|
.tap { |__c__| __c__.__name__ = :DeclareFile })})}}.instance
|
@@ -2,76 +2,104 @@
|
|
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::DeclareMeme = ::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
|
-
)}) {::Myco.find_constant(:ConstantAssignment).new({
|
27
|
-
:line => self.line,
|
28
|
-
:constant => self.effective_name,
|
29
|
-
:value => self.effective_body.block.body
|
30
|
-
}).bytecode(g)}
|
31
|
-
)}
|
32
|
-
declare_meme(:effective_name, [], nil, ::Myco.cscope.dup) { |*| (self.decorations.last)}
|
33
|
-
declare_meme(:effective_decorations, [], nil, ::Myco.cscope.dup) { |*| (
|
34
|
-
decorations = self.decorations.__send__(
|
35
|
-
:[],
|
36
|
-
::Myco.find_constant(:Ruby)::Range.new(
|
37
|
-
0,
|
38
|
-
-1,
|
39
|
-
true
|
40
|
-
)
|
41
|
-
)
|
42
|
-
::Myco.find_constant(:ArrayAssembly).new({
|
43
|
-
:line => self.line,
|
44
|
-
:body => decorations.reverse.map { |d| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", d.node_type.__send__(
|
5
|
+
declare_meme(
|
6
|
+
:meme,
|
7
|
+
[:node_type],
|
8
|
+
::Object::Proc.new { |*| nil}
|
9
|
+
)
|
10
|
+
declare_meme(
|
11
|
+
:decorations,
|
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
|
+
:bytecode,
|
22
|
+
[],
|
23
|
+
::Object::Proc.new { |g| (
|
24
|
+
self.pos(g)
|
25
|
+
::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.effective_name.node_type.__send__(
|
45
26
|
:==,
|
46
|
-
:
|
47
|
-
)) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
)}
|
62
|
-
declare_meme(:effective_body, [], nil, ::Myco.cscope.dup) { |*| (
|
63
|
-
body = ::Myco.branch_op(:"||", self.body) {::Myco.find_constant(:BlockLiteral).new({
|
64
|
-
:line => self.line,
|
65
|
-
:block => ::Myco.find_constant(:Block).new({
|
27
|
+
:symbol
|
28
|
+
)) {(
|
29
|
+
g.push_scope
|
30
|
+
g.send(
|
31
|
+
:for_method_definition,
|
32
|
+
0
|
33
|
+
)
|
34
|
+
self.effective_name.bytecode(g)
|
35
|
+
self.effective_decorations.bytecode(g)
|
36
|
+
self.effective_body.bytecode(g)
|
37
|
+
g.send(
|
38
|
+
:declare_meme,
|
39
|
+
3
|
40
|
+
)
|
41
|
+
)}) {::Myco.find_constant(:ConstantAssignment).new({
|
66
42
|
:line => self.line,
|
67
|
-
:
|
43
|
+
:constant => self.effective_name,
|
44
|
+
:value => self.effective_body.block.body
|
45
|
+
}).bytecode(g)}
|
46
|
+
)}
|
47
|
+
)
|
48
|
+
declare_meme(
|
49
|
+
:effective_name,
|
50
|
+
[],
|
51
|
+
::Object::Proc.new { |*| (self.decorations.last)}
|
52
|
+
)
|
53
|
+
declare_meme(
|
54
|
+
:effective_decorations,
|
55
|
+
[],
|
56
|
+
::Object::Proc.new { |*| (
|
57
|
+
decorations = self.decorations.__send__(
|
58
|
+
:[],
|
59
|
+
::Myco.find_constant(:Ruby)::Range.new(
|
60
|
+
0,
|
61
|
+
-1,
|
62
|
+
true
|
63
|
+
)
|
64
|
+
)
|
65
|
+
::Myco.find_constant(:ArrayAssembly).new({
|
66
|
+
:line => self.line,
|
67
|
+
:body => decorations.reverse.map { |d| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", d.node_type.__send__(
|
68
|
+
:==,
|
69
|
+
:invoke
|
70
|
+
)) {::Myco.find_constant(:ArrayAssembly).new({
|
71
|
+
:line => d.line,
|
72
|
+
:body => [
|
73
|
+
::Myco.find_constant(:SymbolLiteral).new({
|
74
|
+
:line => d.line,
|
75
|
+
:value => d.name
|
76
|
+
}),
|
77
|
+
::Myco.find_constant(:ArrayAssembly).new({
|
78
|
+
:line => d.line,
|
79
|
+
:body => d.arguments.body
|
80
|
+
})
|
81
|
+
]
|
82
|
+
})}) {d})}
|
68
83
|
})
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
84
|
+
)}
|
85
|
+
)
|
86
|
+
declare_meme(
|
87
|
+
:effective_body,
|
88
|
+
[],
|
89
|
+
::Object::Proc.new { |*| (
|
90
|
+
body = ::Myco.branch_op(:"||", self.body) {::Myco.find_constant(:BlockLiteral).new({
|
91
|
+
:line => self.line,
|
92
|
+
:block => ::Myco.find_constant(:Block).new({
|
93
|
+
:line => self.line,
|
94
|
+
:body => ::Myco.find_constant(:NullLiteral).new({:line => self.line})
|
95
|
+
})
|
96
|
+
})}
|
97
|
+
body.block.__send__(
|
98
|
+
:new_cscope=,
|
99
|
+
true
|
100
|
+
)
|
101
|
+
body
|
102
|
+
)}
|
103
|
+
)
|
76
104
|
)}}
|
77
105
|
.tap { |__c__| __c__.__name__ = :DeclareMeme })})}}.instance
|
@@ -2,48 +2,72 @@
|
|
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::DeclareObject = ::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
|
-
|
28
|
-
)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
5
|
+
declare_meme(
|
6
|
+
:declobj,
|
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
|
+
:body,
|
17
|
+
[:field],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:create,
|
22
|
+
[:var],
|
23
|
+
::Object::Proc.new { |*| (true)}
|
24
|
+
)
|
25
|
+
declare_meme(
|
26
|
+
:scope_implementation,
|
27
|
+
[:var],
|
28
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:DeclaredScope).new({
|
29
|
+
:line => self.line,
|
30
|
+
:body => self.body,
|
31
|
+
:scope_method => :set_myco_component
|
32
|
+
}))}
|
33
|
+
)
|
34
|
+
declare_meme(
|
35
|
+
:bytecode,
|
36
|
+
[],
|
37
|
+
::Object::Proc.new { |g| (
|
38
|
+
self.pos(g)
|
39
|
+
g.push_myco
|
40
|
+
g.find_const(:Component)
|
41
|
+
self.types.bytecode(g)
|
42
|
+
g.push_scope
|
43
|
+
g.send(
|
44
|
+
:for_method_definition,
|
45
|
+
0
|
46
|
+
)
|
47
|
+
g.push_scope
|
48
|
+
g.send(
|
49
|
+
:active_path,
|
50
|
+
0
|
51
|
+
)
|
52
|
+
g.meta_to_s
|
53
|
+
g.push_int(self.line)
|
54
|
+
g.send(
|
55
|
+
:new,
|
56
|
+
4
|
57
|
+
)
|
58
|
+
g.dup_top
|
59
|
+
g.dup_top
|
60
|
+
self.scope_implementation.bytecode(g)
|
61
|
+
g.send(
|
62
|
+
:__last__=,
|
63
|
+
1
|
64
|
+
)
|
65
|
+
g.pop
|
66
|
+
::Myco.branch_op(:"&&", self.create) {g.send(
|
67
|
+
:instance,
|
68
|
+
0
|
69
|
+
)}
|
46
70
|
)}
|
47
|
-
)
|
71
|
+
)
|
48
72
|
)}}
|
49
73
|
.tap { |__c__| __c__.__name__ = :DeclareObject })})}}.instance
|