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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee9e5cedec16c7d921644a998eec8c6ee901443
|
4
|
+
data.tar.gz: c94e691503c0b83682e51a292f9bee7007be22c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1296828e31cb12b25fc17bee1d92e6922e5a0767e1347bcf374a00975d35652d0ef081967e29f6fa90fbcf7c9e6e279df3f6c6bf23b71f4dc362ef50d78251fc
|
7
|
+
data.tar.gz: d8cd85ae93f67d7670fd4cfb7b52a0e56a609f777c5ac33f1a03797c9b7a2055edea6a6b7e286b340a824d4396307f9a46be5c5ad41d93a574a202966ccef964
|
data/lib/myco/bootstrap.my.rb
CHANGED
@@ -2,10 +2,14 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
4
4
|
::Myco::RubyEval = ::Myco::Component.new([::Myco::EmptyObject], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
5
|
-
.tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
|
6
|
-
:
|
7
|
-
|
8
|
-
|
5
|
+
.tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
|
6
|
+
:from_string,
|
7
|
+
[],
|
8
|
+
::Object::Proc.new { |string| (::Object.__send__(
|
9
|
+
:eval,
|
10
|
+
string
|
11
|
+
))}
|
12
|
+
))}}
|
9
13
|
.tap { |__c__| __c__.__name__ = :RubyEval }
|
10
14
|
::Myco::Category = ::Myco::Component.new([::Myco::EmptyObject], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
11
15
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
|
@@ -26,21 +30,53 @@
|
|
26
30
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
|
27
31
|
.tap { |__c__| __c__.__name__ = :FileToplevel }
|
28
32
|
__category__(:decorators).component_eval {(
|
29
|
-
declare_meme(
|
33
|
+
declare_meme(
|
34
|
+
:load,
|
35
|
+
[],
|
36
|
+
::Object::Proc.new { |*| (::Myco.find_constant(:LoadDecorator))}
|
37
|
+
)
|
30
38
|
::Myco.cscope.for_method_definition::LoadDecorator = (::Myco::Component.new([::Myco::Decorator], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
31
39
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
32
|
-
declare_meme(
|
33
|
-
|
34
|
-
[
|
40
|
+
declare_meme(
|
41
|
+
:apply,
|
42
|
+
[],
|
43
|
+
::Object::Proc.new { |meme| (::Myco.eval_file(
|
44
|
+
meme.name.to_s,
|
45
|
+
[::Myco::CoreLoadPath]
|
46
|
+
))}
|
47
|
+
)
|
48
|
+
__category__(:transforms).component_eval {(declare_meme(
|
49
|
+
:apply,
|
50
|
+
[],
|
51
|
+
::Object::Proc.new { |*| nil}
|
35
52
|
))}
|
36
|
-
__category__(:transforms).component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |*| nil})}
|
37
53
|
)}}.instance)
|
38
54
|
)}
|
39
55
|
__category__(:main).component_eval {(
|
40
|
-
declare_meme(
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
56
|
+
declare_meme(
|
57
|
+
:"core/Category.my",
|
58
|
+
[:load],
|
59
|
+
::Object::Proc.new { |*| nil}
|
60
|
+
)
|
61
|
+
declare_meme(
|
62
|
+
:"core/Decorator.my",
|
63
|
+
[:load],
|
64
|
+
::Object::Proc.new { |*| nil}
|
65
|
+
)
|
66
|
+
declare_meme(
|
67
|
+
:"core/BasicDecorators.my",
|
68
|
+
[:load],
|
69
|
+
::Object::Proc.new { |*| nil}
|
70
|
+
)
|
71
|
+
declare_meme(
|
72
|
+
:"core/BasicObject.my",
|
73
|
+
[:load],
|
74
|
+
::Object::Proc.new { |*| nil}
|
75
|
+
)
|
76
|
+
declare_meme(
|
77
|
+
:"core/FileToplevel.my",
|
78
|
+
[:load],
|
79
|
+
::Object::Proc.new { |*| nil}
|
80
|
+
)
|
45
81
|
)}
|
46
82
|
)}}.instance
|
@@ -3,8 +3,8 @@ module Myco
|
|
3
3
|
# In Myco, try to always use Myco.add_method instead of Rubinius.add_method
|
4
4
|
# to bypass all of the Ruby-specific logic therein.
|
5
5
|
|
6
|
-
def self.add_method mod, name, executable
|
7
|
-
mod.method_table.store(name, executable, :public)
|
6
|
+
def self.add_method mod, name, executable, cscope
|
7
|
+
mod.method_table.store(name, nil, executable, cscope, 0, :public)
|
8
8
|
Rubinius::VM.reset_method_cache(mod, name)
|
9
9
|
end
|
10
10
|
|
@@ -14,7 +14,7 @@ module Myco
|
|
14
14
|
|
15
15
|
# Use instead of Module#thunk_method
|
16
16
|
def self.add_thunk_method mod, name, value
|
17
|
-
add_method(mod, name, Rubinius::Thunk.new(value))
|
17
|
+
add_method(mod, name, Rubinius::Thunk.new(value), nil)
|
18
18
|
end
|
19
19
|
|
20
20
|
# Use instead of Module#dynamic_method
|
@@ -31,8 +31,8 @@ module Myco
|
|
31
31
|
g.encode
|
32
32
|
|
33
33
|
code = g.package Rubinius::CompiledCode
|
34
|
-
|
34
|
+
cscope = Rubinius::ConstantScope.new(mod, Rubinius::ConstantScope.new(Myco))
|
35
35
|
|
36
|
-
add_method(mod, name, code)
|
36
|
+
add_method(mod, name, code, cscope)
|
37
37
|
end
|
38
38
|
end
|
data/lib/myco/bootstrap/meme.rb
CHANGED
@@ -152,7 +152,8 @@ module Myco
|
|
152
152
|
bind_cache_method
|
153
153
|
@effective_body = @target.instance_method(@name).executable
|
154
154
|
else
|
155
|
-
|
155
|
+
cscope = @body.respond_to?(:scope) ? @body.scope : nil
|
156
|
+
Myco.add_method(@target, @name, @body, cscope)
|
156
157
|
end
|
157
158
|
end
|
158
159
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
3
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
4
4
|
::Myco.find_constant(:CodeTools)::AST.component_eval {(
|
5
|
-
::Myco.cscope.for_method_definition::BuilderMethods = (::Myco.find_constant(:Module).new {
|
5
|
+
::Myco.cscope.for_method_definition::BuilderMethods = (::Myco.find_constant(:Module).new { |*| nil})
|
6
6
|
::Myco.cscope.for_method_definition::Builder = ::Myco::Component.new([
|
7
7
|
::Myco.find_constant(:BasicObject),
|
8
8
|
::Myco.find_constant(:BuilderMethods)
|
@@ -10,46 +10,214 @@
|
|
10
10
|
.tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
|
11
11
|
.tap { |__c__| __c__.__name__ = :Builder }
|
12
12
|
)}
|
13
|
-
declare_meme(
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
declare_meme(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
declare_meme(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
declare_meme(
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
declare_meme(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
declare_meme(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
declare_meme(
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
declare_meme(
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
declare_meme(
|
54
|
-
|
13
|
+
declare_meme(
|
14
|
+
:"AST/Node.my",
|
15
|
+
[:import],
|
16
|
+
::Object::Proc.new { |*| nil}
|
17
|
+
)
|
18
|
+
declare_meme(
|
19
|
+
:"AST/Script.my",
|
20
|
+
[:import],
|
21
|
+
::Object::Proc.new { |*| nil}
|
22
|
+
)
|
23
|
+
declare_meme(
|
24
|
+
:"AST/NumericLiteral.my",
|
25
|
+
[:import],
|
26
|
+
::Object::Proc.new { |*| nil}
|
27
|
+
)
|
28
|
+
declare_meme(
|
29
|
+
:"AST/StringLiteral.my",
|
30
|
+
[:import],
|
31
|
+
::Object::Proc.new { |*| nil}
|
32
|
+
)
|
33
|
+
declare_meme(
|
34
|
+
:"AST/SymbolLiteral.my",
|
35
|
+
[:import],
|
36
|
+
::Object::Proc.new { |*| nil}
|
37
|
+
)
|
38
|
+
declare_meme(
|
39
|
+
:"AST/StringCompose.my",
|
40
|
+
[:import],
|
41
|
+
::Object::Proc.new { |*| nil}
|
42
|
+
)
|
43
|
+
declare_meme(
|
44
|
+
:"AST/SymbolCompose.my",
|
45
|
+
[:import],
|
46
|
+
::Object::Proc.new { |*| nil}
|
47
|
+
)
|
48
|
+
declare_meme(
|
49
|
+
:"AST/Sequence.my",
|
50
|
+
[:import],
|
51
|
+
::Object::Proc.new { |*| nil}
|
52
|
+
)
|
53
|
+
declare_meme(
|
54
|
+
:"AST/SplatValue.my",
|
55
|
+
[:import],
|
56
|
+
::Object::Proc.new { |*| nil}
|
57
|
+
)
|
58
|
+
declare_meme(
|
59
|
+
:"AST/ArrayAssembly.my",
|
60
|
+
[:import],
|
61
|
+
::Object::Proc.new { |*| nil}
|
62
|
+
)
|
63
|
+
declare_meme(
|
64
|
+
:"AST/KeywordAssembly.my",
|
65
|
+
[:import],
|
66
|
+
::Object::Proc.new { |*| nil}
|
67
|
+
)
|
68
|
+
declare_meme(
|
69
|
+
:"AST/ArgumentAssembly.my",
|
70
|
+
[:import],
|
71
|
+
::Object::Proc.new { |*| nil}
|
72
|
+
)
|
73
|
+
declare_meme(
|
74
|
+
:"AST/BlockArgument.my",
|
75
|
+
[:import],
|
76
|
+
::Object::Proc.new { |*| nil}
|
77
|
+
)
|
78
|
+
declare_meme(
|
79
|
+
:"AST/Block.my",
|
80
|
+
[:import],
|
81
|
+
::Object::Proc.new { |*| nil}
|
82
|
+
)
|
83
|
+
declare_meme(
|
84
|
+
:"AST/RequiredParameter.my",
|
85
|
+
[:import],
|
86
|
+
::Object::Proc.new { |*| nil}
|
87
|
+
)
|
88
|
+
declare_meme(
|
89
|
+
:"AST/OptionalParameter.my",
|
90
|
+
[:import],
|
91
|
+
::Object::Proc.new { |*| nil}
|
92
|
+
)
|
93
|
+
declare_meme(
|
94
|
+
:"AST/RestParameter.my",
|
95
|
+
[:import],
|
96
|
+
::Object::Proc.new { |*| nil}
|
97
|
+
)
|
98
|
+
declare_meme(
|
99
|
+
:"AST/KeywordRequiredParameter.my",
|
100
|
+
[:import],
|
101
|
+
::Object::Proc.new { |*| nil}
|
102
|
+
)
|
103
|
+
declare_meme(
|
104
|
+
:"AST/KeywordOptionalParameter.my",
|
105
|
+
[:import],
|
106
|
+
::Object::Proc.new { |*| nil}
|
107
|
+
)
|
108
|
+
declare_meme(
|
109
|
+
:"AST/KeywordRestParameter.my",
|
110
|
+
[:import],
|
111
|
+
::Object::Proc.new { |*| nil}
|
112
|
+
)
|
113
|
+
declare_meme(
|
114
|
+
:"AST/BlockParameter.my",
|
115
|
+
[:import],
|
116
|
+
::Object::Proc.new { |*| nil}
|
117
|
+
)
|
118
|
+
declare_meme(
|
119
|
+
:"AST/ParameterAssembly.my",
|
120
|
+
[:import],
|
121
|
+
::Object::Proc.new { |*| nil}
|
122
|
+
)
|
123
|
+
declare_meme(
|
124
|
+
:"AST/BlockLiteral.my",
|
125
|
+
[:import],
|
126
|
+
::Object::Proc.new { |*| nil}
|
127
|
+
)
|
128
|
+
declare_meme(
|
129
|
+
:"AST/ConstantAccess.my",
|
130
|
+
[:import],
|
131
|
+
::Object::Proc.new { |*| nil}
|
132
|
+
)
|
133
|
+
declare_meme(
|
134
|
+
:"AST/ConstantAssignment.my",
|
135
|
+
[:import],
|
136
|
+
::Object::Proc.new { |*| nil}
|
137
|
+
)
|
138
|
+
declare_meme(
|
139
|
+
:"AST/ConstantDefine.my",
|
140
|
+
[:import],
|
141
|
+
::Object::Proc.new { |*| nil}
|
142
|
+
)
|
143
|
+
declare_meme(
|
144
|
+
:"AST/DeclaredScope.my",
|
145
|
+
[:import],
|
146
|
+
::Object::Proc.new { |*| nil}
|
147
|
+
)
|
148
|
+
declare_meme(
|
149
|
+
:"AST/DeclareObject.my",
|
150
|
+
[:import],
|
151
|
+
::Object::Proc.new { |*| nil}
|
152
|
+
)
|
153
|
+
declare_meme(
|
154
|
+
:"AST/DeclareString.my",
|
155
|
+
[:import],
|
156
|
+
::Object::Proc.new { |*| nil}
|
157
|
+
)
|
158
|
+
declare_meme(
|
159
|
+
:"AST/DeclareFile.my",
|
160
|
+
[:import],
|
161
|
+
::Object::Proc.new { |*| nil}
|
162
|
+
)
|
163
|
+
declare_meme(
|
164
|
+
:"AST/DeclareExtension.my",
|
165
|
+
[:import],
|
166
|
+
::Object::Proc.new { |*| nil}
|
167
|
+
)
|
168
|
+
declare_meme(
|
169
|
+
:"AST/DeclareCategory.my",
|
170
|
+
[:import],
|
171
|
+
::Object::Proc.new { |*| nil}
|
172
|
+
)
|
173
|
+
declare_meme(
|
174
|
+
:"AST/DeclareMeme.my",
|
175
|
+
[:import],
|
176
|
+
::Object::Proc.new { |*| nil}
|
177
|
+
)
|
178
|
+
declare_meme(
|
179
|
+
:"AST/Invoke.my",
|
180
|
+
[:import],
|
181
|
+
::Object::Proc.new { |*| nil}
|
182
|
+
)
|
183
|
+
declare_meme(
|
184
|
+
:"AST/InvokeMethod.my",
|
185
|
+
[:import],
|
186
|
+
::Object::Proc.new { |*| nil}
|
187
|
+
)
|
188
|
+
declare_meme(
|
189
|
+
:"AST/LocalVariableAccessAmbiguous.my",
|
190
|
+
[:import],
|
191
|
+
::Object::Proc.new { |*| nil}
|
192
|
+
)
|
193
|
+
declare_meme(
|
194
|
+
:"AST/LocalVariableAssignment.my",
|
195
|
+
[:import],
|
196
|
+
::Object::Proc.new { |*| nil}
|
197
|
+
)
|
198
|
+
declare_meme(
|
199
|
+
:"AST/Quest.my",
|
200
|
+
[:import],
|
201
|
+
::Object::Proc.new { |*| nil}
|
202
|
+
)
|
203
|
+
declare_meme(
|
204
|
+
:"AST/BranchOperator.my",
|
205
|
+
[:import],
|
206
|
+
::Object::Proc.new { |*| nil}
|
207
|
+
)
|
208
|
+
declare_meme(
|
209
|
+
:"AST/PipeOperator.my",
|
210
|
+
[:import],
|
211
|
+
::Object::Proc.new { |*| nil}
|
212
|
+
)
|
213
|
+
declare_meme(
|
214
|
+
:"AST/misc.my",
|
215
|
+
[:import],
|
216
|
+
::Object::Proc.new { |*| nil}
|
217
|
+
)
|
218
|
+
declare_meme(
|
219
|
+
:"AST/ToRuby.my",
|
220
|
+
[:import],
|
221
|
+
::Object::Proc.new { |*| nil}
|
222
|
+
)
|
55
223
|
)}}.instance
|
@@ -2,57 +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::ArgumentAssembly = ::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
|
-
|
5
|
+
declare_meme(
|
6
|
+
:args,
|
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
|
+
:block,
|
17
|
+
[:var],
|
18
|
+
::Object::Proc.new { |*| nil}
|
19
|
+
)
|
20
|
+
declare_meme(
|
21
|
+
:body,
|
22
|
+
[:setter],
|
23
|
+
::Object::Proc.new { |given_body| (
|
24
|
+
::Myco.branch_op(:"&&", given_body.last.__send__(
|
25
|
+
:is_a?,
|
26
|
+
::Myco.find_constant(:BlockArgument)
|
27
|
+
)) {self.__send__(
|
28
|
+
:block=,
|
29
|
+
given_body.pop
|
30
|
+
)}
|
31
|
+
given_body
|
15
32
|
)}
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
::
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
33
|
+
)
|
34
|
+
declare_meme(
|
35
|
+
:pre_group,
|
36
|
+
[],
|
37
|
+
::Object::Proc.new { |*| (self.body.take_while { |item| (item.__send__(
|
38
|
+
:is_a?,
|
39
|
+
::Myco.find_constant(:SplatValue)
|
40
|
+
).__send__(:!))})}
|
41
|
+
)
|
42
|
+
declare_meme(
|
43
|
+
:post_group,
|
44
|
+
[],
|
45
|
+
::Object::Proc.new { |*| (self.body.drop_while { |item| (item.__send__(
|
28
46
|
:is_a?,
|
29
47
|
::Myco.find_constant(:SplatValue)
|
30
|
-
))}
|
31
|
-
|
32
|
-
|
33
|
-
:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
).__send__(:!))})}
|
49
|
+
)
|
50
|
+
declare_meme(
|
51
|
+
:send_op,
|
52
|
+
[],
|
53
|
+
::Object::Proc.new { |*| (self.cond(
|
54
|
+
self.body.detect { |item| (item.__send__(
|
55
|
+
:is_a?,
|
56
|
+
::Myco.find_constant(:SplatValue)
|
57
|
+
))},
|
58
|
+
:send_with_splat,
|
59
|
+
self.block,
|
60
|
+
:send_with_block,
|
61
|
+
:send
|
62
|
+
))}
|
63
|
+
)
|
64
|
+
declare_meme(
|
65
|
+
:send_count,
|
66
|
+
[],
|
67
|
+
::Object::Proc.new { |*| (self.pre_group.size)}
|
68
|
+
)
|
69
|
+
declare_meme(
|
70
|
+
:splat_bytecode,
|
71
|
+
[],
|
72
|
+
::Object::Proc.new { |g| (::Myco.find_constant(:ArrayAssembly).new({
|
73
|
+
:line => self.line,
|
74
|
+
:body => self.post_group
|
75
|
+
}).bytecode(g))}
|
76
|
+
)
|
77
|
+
declare_meme(
|
78
|
+
:block_bytecode,
|
79
|
+
[],
|
80
|
+
::Object::Proc.new { |g| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.block) {self.block.bytecode(g)}) {g.push_null})}
|
81
|
+
)
|
82
|
+
declare_meme(
|
83
|
+
:bytecode,
|
84
|
+
[],
|
85
|
+
::Object::Proc.new { |g| (
|
86
|
+
self.pos(g)
|
87
|
+
self.pre_group.each { |item| (item.bytecode(g))}
|
88
|
+
::Myco.branch_op(:"&&", self.send_op.__send__(
|
89
|
+
:==,
|
90
|
+
:send_with_splat
|
91
|
+
)) {(
|
92
|
+
self.splat_bytecode(g)
|
93
|
+
self.block_bytecode(g)
|
94
|
+
)}
|
95
|
+
::Myco.branch_op(:"&&", self.send_op.__send__(
|
96
|
+
:==,
|
97
|
+
:send_with_block
|
98
|
+
)) {self.block_bytecode(g)}
|
51
99
|
)}
|
52
|
-
|
53
|
-
:==,
|
54
|
-
:send_with_block
|
55
|
-
)) {self.block_bytecode(g)}
|
56
|
-
)}
|
100
|
+
)
|
57
101
|
)}}
|
58
102
|
.tap { |__c__| __c__.__name__ = :ArgumentAssembly })})}}.instance
|