myco 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/myco/bootstrap.my.rb +50 -14
  3. data/lib/myco/bootstrap/add_method.rb +5 -5
  4. data/lib/myco/bootstrap/meme.rb +2 -1
  5. data/lib/myco/code_tools/AST.my.rb +211 -43
  6. data/lib/myco/code_tools/AST/ArgumentAssembly.my.rb +92 -48
  7. data/lib/myco/code_tools/AST/ArrayAssembly.my.rb +39 -27
  8. data/lib/myco/code_tools/AST/Block.my.rb +176 -112
  9. data/lib/myco/code_tools/AST/BlockArgument.my.rb +29 -17
  10. data/lib/myco/code_tools/AST/BlockLiteral.my.rb +37 -17
  11. data/lib/myco/code_tools/AST/BlockParameter.my.rb +25 -9
  12. data/lib/myco/code_tools/AST/BranchOperator.my.rb +95 -75
  13. data/lib/myco/code_tools/AST/ConstantAccess.my.rb +52 -32
  14. data/lib/myco/code_tools/AST/ConstantAssignment.my.rb +52 -36
  15. data/lib/myco/code_tools/AST/ConstantDefine.my.rb +50 -26
  16. data/lib/myco/code_tools/AST/DeclareCategory.my.rb +38 -18
  17. data/lib/myco/code_tools/AST/DeclareExtension.my.rb +29 -13
  18. data/lib/myco/code_tools/AST/DeclareFile.my.rb +51 -31
  19. data/lib/myco/code_tools/AST/DeclareMeme.my.rb +96 -68
  20. data/lib/myco/code_tools/AST/DeclareObject.my.rb +66 -42
  21. data/lib/myco/code_tools/AST/DeclareString.my.rb +39 -19
  22. data/lib/myco/code_tools/AST/DeclaredScope.my.rb +92 -64
  23. data/lib/myco/code_tools/AST/Invoke.my +8 -4
  24. data/lib/myco/code_tools/AST/Invoke.my.rb +74 -31
  25. data/lib/myco/code_tools/AST/InvokeMethod.my.rb +34 -14
  26. data/lib/myco/code_tools/AST/KeywordAssembly.my.rb +36 -24
  27. data/lib/myco/code_tools/AST/KeywordOptionalParameter.my.rb +28 -8
  28. data/lib/myco/code_tools/AST/KeywordRequiredParameter.my.rb +23 -7
  29. data/lib/myco/code_tools/AST/KeywordRestParameter.my.rb +23 -7
  30. data/lib/myco/code_tools/AST/LocalVariableAccessAmbiguous.my.rb +24 -12
  31. data/lib/myco/code_tools/AST/LocalVariableAssignment.my.rb +30 -10
  32. data/lib/myco/code_tools/AST/Node.my.rb +234 -102
  33. data/lib/myco/code_tools/AST/NumericLiteral.my.rb +18 -6
  34. data/lib/myco/code_tools/AST/OptionalParameter.my.rb +33 -13
  35. data/lib/myco/code_tools/AST/ParameterAssembly.my.rb +275 -211
  36. data/lib/myco/code_tools/AST/PipeOperator.my.rb +42 -18
  37. data/lib/myco/code_tools/AST/Quest.my.rb +65 -37
  38. data/lib/myco/code_tools/AST/RequiredParameter.my.rb +20 -4
  39. data/lib/myco/code_tools/AST/RestParameter.my.rb +20 -4
  40. data/lib/myco/code_tools/AST/Script.my.rb +51 -23
  41. data/lib/myco/code_tools/AST/Sequence.my.rb +22 -10
  42. data/lib/myco/code_tools/AST/SplatValue.my.rb +28 -16
  43. data/lib/myco/code_tools/AST/StringCompose.my.rb +23 -11
  44. data/lib/myco/code_tools/AST/StringLiteral.my.rb +19 -7
  45. data/lib/myco/code_tools/AST/SymbolCompose.my.rb +27 -15
  46. data/lib/myco/code_tools/AST/SymbolLiteral.my.rb +18 -6
  47. data/lib/myco/code_tools/AST/ToRuby.my.rb +581 -341
  48. data/lib/myco/code_tools/AST/misc.my.rb +87 -35
  49. data/lib/myco/code_tools/Parser.my.rb +39 -12
  50. data/lib/myco/code_tools/parser/MycoBuilder.my.rb +106 -90
  51. data/lib/myco/code_tools/parser/MycoCharacterClasses.my.rb +98 -50
  52. data/lib/myco/code_tools/parser/MycoGrammar.my +1 -6
  53. data/lib/myco/code_tools/parser/MycoGrammar.my.rb +2124 -1710
  54. data/lib/myco/code_tools/parser/MycoTokens.my +0 -5
  55. data/lib/myco/code_tools/parser/MycoTokens.my.rb +387 -156
  56. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces.my.rb +55 -11
  57. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my.rb +321 -205
  58. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Capture.my.rb +223 -127
  59. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common.my.rb +188 -72
  60. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common/Parser.my +48 -0
  61. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common/Parser.my.rb +365 -189
  62. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Composite.my.rb +313 -233
  63. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my.rb +99 -55
  64. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my.rb +493 -325
  65. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream.my.rb +138 -114
  66. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream/Parser.my.rb +56 -44
  67. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String.my.rb +173 -93
  68. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String/Parser.my.rb +90 -70
  69. data/lib/myco/command.my.rb +85 -25
  70. data/lib/myco/command/inoculate.my.rb +219 -127
  71. data/lib/myco/core.my.rb +20 -4
  72. data/lib/myco/core/BasicDecorators.my.rb +211 -119
  73. data/lib/myco/core/BasicObject.my.rb +108 -44
  74. data/lib/myco/core/Category.my.rb +37 -13
  75. data/lib/myco/core/Decorator.my.rb +35 -27
  76. data/lib/myco/core/FileToplevel.my.rb +55 -27
  77. data/lib/myco/core/Loop.my.rb +16 -8
  78. data/lib/myco/core/Object.my.rb +34 -14
  79. data/lib/myco/core/Ruby.my.rb +13 -5
  80. data/lib/myco/core/Switch.my.rb +79 -47
  81. data/lib/myco/tools/BasicCommand.my.rb +79 -47
  82. data/lib/myco/tools/mycompile.my.rb +153 -69
  83. data/lib/myco/version.rb +1 -1
  84. metadata +34 -52
  85. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my +0 -144
  86. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my.rb +0 -221
  87. data/lib/myco/code_tools/parser/pegleromyces/spec/BasicSpec.my +0 -35
  88. data/lib/myco/code_tools/parser/pegleromyces/spec/BasicSpec.my.rb +0 -35
  89. data/lib/myco/code_tools/parser/pegleromyces/spec/Grammar.test.my +0 -10
  90. data/lib/myco/code_tools/parser/pegleromyces/spec/Grammar.test.my.rb +0 -9
  91. data/lib/myco/code_tools/parser/pegleromyces/spec/Patterns.test.my +0 -162
  92. data/lib/myco/code_tools/parser/pegleromyces/spec/Patterns.test.my.rb +0 -353
  93. data/lib/myco/code_tools/parser/pegleromyces/spec/Processor.test.my +0 -10
  94. data/lib/myco/code_tools/parser/pegleromyces/spec/Processor.test.my.rb +0 -9
  95. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Parser.test.my +0 -49
  96. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Parser.test.my.rb +0 -119
  97. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Patterns.test.my +0 -131
  98. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Patterns.test.my.rb +0 -595
  99. data/lib/myco/code_tools/parser/pegleromyces/spec/String/Parser.test.my +0 -120
  100. data/lib/myco/code_tools/parser/pegleromyces/spec/String/Parser.test.my.rb +0 -350
  101. data/lib/myco/code_tools/parser/pegleromyces/spec/run.my +0 -14
  102. data/lib/myco/code_tools/parser/pegleromyces/spec/run.my.rb +0 -12
@@ -1,8 +1,24 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
3
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
4
- declare_meme(:"core/Object.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
5
- declare_meme(:"core/Switch.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:"core/Ruby.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:"core/Loop.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
4
+ declare_meme(
5
+ :"core/Object.my",
6
+ [:import],
7
+ ::Object::Proc.new { |*| nil}
8
+ )
9
+ declare_meme(
10
+ :"core/Switch.my",
11
+ [:import],
12
+ ::Object::Proc.new { |*| nil}
13
+ )
14
+ declare_meme(
15
+ :"core/Ruby.my",
16
+ [:import],
17
+ ::Object::Proc.new { |*| nil}
18
+ )
19
+ declare_meme(
20
+ :"core/Loop.my",
21
+ [:import],
22
+ ::Object::Proc.new { |*| nil}
23
+ )
8
24
  )}}.instance
@@ -1,138 +1,230 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
3
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco::BasicDecorators.component_eval {(__category__(:decorators).component_eval {(
4
- declare_meme(:const, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:ConstDecorator))}
4
+ declare_meme(
5
+ :const,
6
+ [],
7
+ ::Object::Proc.new { |*| (::Myco.find_constant(:ConstDecorator))}
8
+ )
5
9
  ::Myco.cscope.for_method_definition::ConstDecorator = (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (meme.__send__(
7
- :body=,
8
- ::Myco.find_constant(:Rubinius)::Thunk.new(meme.result)
9
- ))})}}.instance)
10
- declare_meme(:storage, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
11
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(
12
- declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (meme.target.declare_meme(:"#{meme.name}=") { |new_value, *args| (meme.set_result_for(
13
- self,
14
- new_value,
15
- *args
16
- ))})}
17
- __category__(:transforms).component_eval {(declare_meme(:cache, [], nil, ::Myco.cscope.dup) { |*| (true)})}
18
- )}}.instance)}
19
- declare_meme(:var, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
20
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(__category__(:transforms).component_eval {(declare_meme(:var, [], nil, ::Myco.cscope.dup) { |*| (true)})})}}.instance)}
21
- declare_meme(:memoize, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
22
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(__category__(:transforms).component_eval {(declare_meme(:cache, [], nil, ::Myco.cscope.dup) { |*| (true)})})}}.instance)}
23
- declare_meme(:static, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
24
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(__category__(:transforms).component_eval {(declare_meme(:target, [], nil, ::Myco.cscope.dup) { |meme| (meme.target.singleton_class)})})}}.instance)}
25
- declare_meme(:before, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
26
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
27
- orig_meme = meme.target.memes.__send__(
28
- :[],
29
- meme.name
30
- )
31
- wrap_meme = meme.dup
32
- meme.__send__(
10
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
11
+ :apply,
12
+ [],
13
+ ::Object::Proc.new { |meme| (meme.__send__(
33
14
  :body=,
34
- ::Object::Proc.new { |*a, &b| (
35
- wrap_meme.result_for(
15
+ ::Myco.find_constant(:Rubinius)::Thunk.new(meme.result)
16
+ ))}
17
+ ))}}.instance)
18
+ declare_meme(
19
+ :storage,
20
+ [:const],
21
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
22
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(
23
+ declare_meme(
24
+ :apply,
25
+ [],
26
+ ::Object::Proc.new { |meme| (meme.target.declare_meme(:"#{meme.name}=") { |new_value, *args| (meme.set_result_for(
36
27
  self,
37
- *a,
38
- &b
28
+ new_value,
29
+ *args
30
+ ))})}
31
+ )
32
+ __category__(:transforms).component_eval {(declare_meme(
33
+ :cache,
34
+ [],
35
+ ::Object::Proc.new { |*| (true)}
36
+ ))}
37
+ )}}.instance)}
38
+ )
39
+ declare_meme(
40
+ :var,
41
+ [:const],
42
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
43
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(__category__(:transforms).component_eval {(declare_meme(
44
+ :var,
45
+ [],
46
+ ::Object::Proc.new { |*| (true)}
47
+ ))})}}.instance)}
48
+ )
49
+ declare_meme(
50
+ :memoize,
51
+ [:const],
52
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
53
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(__category__(:transforms).component_eval {(declare_meme(
54
+ :cache,
55
+ [],
56
+ ::Object::Proc.new { |*| (true)}
57
+ ))})}}.instance)}
58
+ )
59
+ declare_meme(
60
+ :static,
61
+ [:const],
62
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
63
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(__category__(:transforms).component_eval {(declare_meme(
64
+ :target,
65
+ [],
66
+ ::Object::Proc.new { |meme| (meme.target.singleton_class)}
67
+ ))})}}.instance)}
68
+ )
69
+ declare_meme(
70
+ :before,
71
+ [:const],
72
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
73
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
74
+ :apply,
75
+ [],
76
+ ::Object::Proc.new { |meme| (
77
+ orig_meme = meme.target.memes.__send__(
78
+ :[],
79
+ meme.name
39
80
  )
40
- orig_meme.result_for(
41
- self,
42
- *a,
43
- &b
81
+ wrap_meme = meme.dup
82
+ meme.__send__(
83
+ :body=,
84
+ ::Object::Proc.new { |*a, &b| (
85
+ wrap_meme.result_for(
86
+ self,
87
+ *a,
88
+ &b
89
+ )
90
+ orig_meme.result_for(
91
+ self,
92
+ *a,
93
+ &b
94
+ )
95
+ )}
44
96
  )
45
97
  )}
46
- )
47
- )})}}.instance)}
48
- declare_meme(:after, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
49
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
50
- orig_meme = meme.target.memes.__send__(
51
- :[],
52
- meme.name
53
- )
54
- wrap_meme = meme.dup
55
- meme.__send__(
56
- :body=,
57
- ::Object::Proc.new { |*a, &b| (
58
- result = orig_meme.result_for(
59
- self,
60
- *a,
61
- &b
98
+ ))}}.instance)}
99
+ )
100
+ declare_meme(
101
+ :after,
102
+ [:const],
103
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
104
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
105
+ :apply,
106
+ [],
107
+ ::Object::Proc.new { |meme| (
108
+ orig_meme = meme.target.memes.__send__(
109
+ :[],
110
+ meme.name
62
111
  )
63
- wrap_meme.result_for(
64
- self,
65
- *a,
66
- &b
112
+ wrap_meme = meme.dup
113
+ meme.__send__(
114
+ :body=,
115
+ ::Object::Proc.new { |*a, &b| (
116
+ result = orig_meme.result_for(
117
+ self,
118
+ *a,
119
+ &b
120
+ )
121
+ wrap_meme.result_for(
122
+ self,
123
+ *a,
124
+ &b
125
+ )
126
+ result
127
+ )}
67
128
  )
68
- result
69
129
  )}
70
- )
71
- )})}}.instance)}
72
- declare_meme(:pre, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
73
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
74
- orig_meme = meme.target.memes.__send__(
75
- :[],
76
- meme.name
77
- )
78
- wrap_meme = meme.dup
79
- meme.__send__(
80
- :body=,
81
- ::Object::Proc.new { |*a, &b| (
82
- new_a = wrap_meme.result_for(
83
- self,
84
- *a
130
+ ))}}.instance)}
131
+ )
132
+ declare_meme(
133
+ :pre,
134
+ [:const],
135
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
136
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
137
+ :apply,
138
+ [],
139
+ ::Object::Proc.new { |meme| (
140
+ orig_meme = meme.target.memes.__send__(
141
+ :[],
142
+ meme.name
85
143
  )
86
- orig_meme.result_for(
87
- self,
88
- *new_a,
89
- &b
144
+ wrap_meme = meme.dup
145
+ meme.__send__(
146
+ :body=,
147
+ ::Object::Proc.new { |*a, &b| (
148
+ new_a = wrap_meme.result_for(
149
+ self,
150
+ *a
151
+ )
152
+ orig_meme.result_for(
153
+ self,
154
+ *new_a,
155
+ &b
156
+ )
157
+ )}
90
158
  )
91
159
  )}
92
- )
93
- )})}}.instance)}
94
- declare_meme(:post, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
95
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
96
- orig_meme = meme.target.memes.__send__(
97
- :[],
98
- meme.name
99
- )
100
- wrap_meme = meme.dup
101
- meme.__send__(
102
- :body=,
103
- ::Object::Proc.new { |*a, &b| (
104
- result = orig_meme.result_for(
105
- self,
106
- *a,
107
- &b
160
+ ))}}.instance)}
161
+ )
162
+ declare_meme(
163
+ :post,
164
+ [:const],
165
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
166
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
167
+ :apply,
168
+ [],
169
+ ::Object::Proc.new { |meme| (
170
+ orig_meme = meme.target.memes.__send__(
171
+ :[],
172
+ meme.name
108
173
  )
109
- wrap_meme.result_for(
110
- self,
111
- result
174
+ wrap_meme = meme.dup
175
+ meme.__send__(
176
+ :body=,
177
+ ::Object::Proc.new { |*a, &b| (
178
+ result = orig_meme.result_for(
179
+ self,
180
+ *a,
181
+ &b
182
+ )
183
+ wrap_meme.result_for(
184
+ self,
185
+ result
186
+ )
187
+ )}
112
188
  )
113
189
  )}
114
- )
115
- )})}}.instance)}
116
- declare_meme(:setter, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
117
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
118
- wrap_meme = meme.dup
119
- meme.__send__(
120
- :setter=,
121
- ::Object::Proc.new { |orig_value| (wrap_meme.result_for(
122
- self,
123
- orig_value
124
- ))}
125
- )
126
- )})}}.instance)}
127
- declare_meme(:getter, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
128
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
129
- wrap_meme = meme.dup
130
- meme.__send__(
131
- :getter=,
132
- ::Object::Proc.new { |orig_value| (wrap_meme.result_for(
133
- self,
134
- orig_value
135
- ))}
136
- )
137
- )})}}.instance)}
190
+ ))}}.instance)}
191
+ )
192
+ declare_meme(
193
+ :setter,
194
+ [:const],
195
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
196
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
197
+ :apply,
198
+ [],
199
+ ::Object::Proc.new { |meme| (
200
+ wrap_meme = meme.dup
201
+ meme.__send__(
202
+ :setter=,
203
+ ::Object::Proc.new { |orig_value| (wrap_meme.result_for(
204
+ self,
205
+ orig_value
206
+ ))}
207
+ )
208
+ )}
209
+ ))}}.instance)}
210
+ )
211
+ declare_meme(
212
+ :getter,
213
+ [:const],
214
+ ::Object::Proc.new { |*| (::Myco::Component.new([::Myco.find_constant(:Decorator)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
215
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(
216
+ :apply,
217
+ [],
218
+ ::Object::Proc.new { |meme| (
219
+ wrap_meme = meme.dup
220
+ meme.__send__(
221
+ :getter=,
222
+ ::Object::Proc.new { |orig_value| (wrap_meme.result_for(
223
+ self,
224
+ orig_value
225
+ ))}
226
+ )
227
+ )}
228
+ ))}}.instance)}
229
+ )
138
230
  )})})}}.instance
@@ -1,49 +1,113 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
3
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco::BasicObject.component_eval {(
4
- declare_meme(:if, [], nil, ::Myco.cscope.dup) { |cond, &blk| (::Myco.branch_op(:"&&", cond) {blk.call})}
5
- declare_meme(:unless, [], nil, ::Myco.cscope.dup) { |cond, &blk| (::Myco.branch_op(:"||", cond) {blk.call})}
6
- declare_meme(:case, [], nil, ::Myco.cscope.dup) { |input, *rest| (
7
- use_strategy = ::Myco.branch_op(:"&&", rest.size.__send__(:odd?)) {rest.pop}
8
- rest.each_slice(2).detect { |test_value, strategy| (::Myco.branch_op(:"&&", test_value.__send__(
9
- :==,
10
- input
11
- )) {(
12
- use_strategy = strategy
13
- true
14
- )})}
15
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", use_strategy) {::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(use_strategy, :call).false? ? ::Myco::Void : use_strategy.call(input))) {use_strategy}}) {self.raise("No match for case(#{input})")}
16
- )}
17
- declare_meme(:cond, [], nil, ::Myco.cscope.dup) { |*rest| (
18
- use_strategy = ::Myco.branch_op(:"&&", rest.size.__send__(:odd?)) {rest.pop}
19
- rest.each_slice(2).detect { |test_value, strategy| (::Myco.branch_op(:"&&", ::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(test_value, :call).false? ? ::Myco::Void : test_value.call)) {test_value}) {(
20
- use_strategy = strategy
21
- true
22
- )})}
23
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", use_strategy) {::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(use_strategy, :call).false? ? ::Myco::Void : use_strategy.call)) {use_strategy}}) {self.raise("No match for cond")}
24
- )}
25
- declare_meme(:switch, [], nil, ::Myco.cscope.dup) { |input, comparator=:==| (::Myco.find_constant(:Switch).new({
26
- :input => input,
27
- :comparator => comparator
28
- }))}
29
- declare_meme(:raise, [], nil, ::Myco.cscope.dup) { |*args| (::Object.__send__(
4
+ declare_meme(
5
+ :if,
6
+ [],
7
+ ::Object::Proc.new { |cond, &blk| (::Myco.branch_op(:"&&", cond) {blk.call})}
8
+ )
9
+ declare_meme(
10
+ :unless,
11
+ [],
12
+ ::Object::Proc.new { |cond, &blk| (::Myco.branch_op(:"||", cond) {blk.call})}
13
+ )
14
+ declare_meme(
15
+ :case,
16
+ [],
17
+ ::Object::Proc.new { |input, *rest| (
18
+ use_strategy = ::Myco.branch_op(:"&&", rest.size.__send__(:odd?)) {rest.pop}
19
+ rest.each_slice(2).detect { |test_value, strategy| (::Myco.branch_op(:"&&", test_value.__send__(
20
+ :==,
21
+ input
22
+ )) {(
23
+ use_strategy = strategy
24
+ true
25
+ )})}
26
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", use_strategy) {::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(use_strategy, :call).false? ? ::Myco::Void : use_strategy.call(input))) {use_strategy}}) {self.raise("No match for case(#{input})")}
27
+ )}
28
+ )
29
+ declare_meme(
30
+ :cond,
31
+ [],
32
+ ::Object::Proc.new { |*rest| (
33
+ use_strategy = ::Myco.branch_op(:"&&", rest.size.__send__(:odd?)) {rest.pop}
34
+ rest.each_slice(2).detect { |test_value, strategy| (::Myco.branch_op(:"&&", ::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(test_value, :call).false? ? ::Myco::Void : test_value.call)) {test_value}) {(
35
+ use_strategy = strategy
36
+ true
37
+ )})}
38
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", use_strategy) {::Myco.branch_op(:"??", (Rubinius::Type.object_respond_to?(use_strategy, :call).false? ? ::Myco::Void : use_strategy.call)) {use_strategy}}) {self.raise("No match for cond")}
39
+ )}
40
+ )
41
+ declare_meme(
42
+ :switch,
43
+ [],
44
+ ::Object::Proc.new { |input, comparator=:==| (::Myco.find_constant(:Switch).new({
45
+ :input => input,
46
+ :comparator => comparator
47
+ }))}
48
+ )
49
+ declare_meme(
30
50
  :raise,
31
- *args
32
- ))}
33
- declare_meme(:loop, [], nil, ::Myco.cscope.dup) { |&block| (::Myco.find_constant(:Loop).run(&block))}
34
- declare_meme(:break, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:Loop).__send__(:break))}
35
- declare_meme(:send, [], nil, ::Myco.cscope.dup) { |*args, &block| (self.__send__(
36
- *args,
37
- &block
38
- ))}
39
- declare_meme(:kind_of?, [], nil, ::Myco.cscope.dup) { |mod| (self.__kind_of__(mod))}
40
- declare_meme(:is_a?, [], nil, ::Myco.cscope.dup) { |mod| (self.__kind_of__(mod))}
41
- declare_meme(:class, [], nil, ::Myco.cscope.dup) { |*| (self.__class__)}
42
- declare_meme(:dup, [], nil, ::Myco.cscope.dup) { |*| (self.__dup__)}
43
- declare_meme(:puts, [], nil, ::Myco.cscope.dup) { |*args| (::Myco.find_constant(:STDOUT).puts(*args))}
44
- declare_meme(:p, [], nil, ::Myco.cscope.dup) { |*args| (::Myco.find_constant(:STDOUT).puts(args.map { |a| (a.inspect)}.join(", ")))}
45
- declare_meme(:ruby_require, [], nil, ::Myco.cscope.dup) { |arg| (::Object.send(
46
- :require,
47
- arg
48
- ))}
51
+ [],
52
+ ::Object::Proc.new { |*args| (::Object.__send__(
53
+ :raise,
54
+ *args
55
+ ))}
56
+ )
57
+ declare_meme(
58
+ :loop,
59
+ [],
60
+ ::Object::Proc.new { |&block| (::Myco.find_constant(:Loop).run(&block))}
61
+ )
62
+ declare_meme(
63
+ :break,
64
+ [],
65
+ ::Object::Proc.new { |*| (::Myco.find_constant(:Loop).__send__(:break))}
66
+ )
67
+ declare_meme(
68
+ :send,
69
+ [],
70
+ ::Object::Proc.new { |*args, &block| (self.__send__(
71
+ *args,
72
+ &block
73
+ ))}
74
+ )
75
+ declare_meme(
76
+ :kind_of?,
77
+ [],
78
+ ::Object::Proc.new { |mod| (self.__kind_of__(mod))}
79
+ )
80
+ declare_meme(
81
+ :is_a?,
82
+ [],
83
+ ::Object::Proc.new { |mod| (self.__kind_of__(mod))}
84
+ )
85
+ declare_meme(
86
+ :class,
87
+ [],
88
+ ::Object::Proc.new { |*| (self.__class__)}
89
+ )
90
+ declare_meme(
91
+ :dup,
92
+ [],
93
+ ::Object::Proc.new { |*| (self.__dup__)}
94
+ )
95
+ declare_meme(
96
+ :puts,
97
+ [],
98
+ ::Object::Proc.new { |*args| (::Myco.find_constant(:STDOUT).puts(*args))}
99
+ )
100
+ declare_meme(
101
+ :p,
102
+ [],
103
+ ::Object::Proc.new { |*args| (::Myco.find_constant(:STDOUT).puts(args.map { |a| (a.inspect)}.join(", ")))}
104
+ )
105
+ declare_meme(
106
+ :ruby_require,
107
+ [],
108
+ ::Object::Proc.new { |arg| (::Object.send(
109
+ :require,
110
+ arg
111
+ ))}
112
+ )
49
113
  )})}}.instance