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
@@ -2,12 +2,24 @@
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::StringLiteral = ::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(:str, [[:node_type, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:value, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
8
- self.pos(g)
9
- g.push_literal(self.value)
10
- g.string_dup
11
- )}
5
+ declare_meme(
6
+ :str,
7
+ [:node_type],
8
+ ::Object::Proc.new { |*| nil}
9
+ )
10
+ declare_meme(
11
+ :value,
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_literal(self.value)
21
+ g.string_dup
22
+ )}
23
+ )
12
24
  )}}
13
25
  .tap { |__c__| __c__.__name__ = :StringLiteral })})}}.instance
@@ -2,22 +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::SymbolCompose = ::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(:symbol_compose, [[:node_type, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:body, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
8
- self.pos(g)
9
- self.body.each_slice(2) { |string, other| (
10
- g.push_literal(string.value.to_s)
11
- ::Myco.branch_op(:"&&", other) {(
12
- other.bytecode(g)
13
- g.meta_to_s
5
+ declare_meme(
6
+ :symbol_compose,
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
+ self.body.each_slice(2) { |string, other| (
21
+ g.push_literal(string.value.to_s)
22
+ ::Myco.branch_op(:"&&", other) {(
23
+ other.bytecode(g)
24
+ g.meta_to_s
25
+ )}
14
26
  )}
27
+ g.string_build(self.body.size)
28
+ g.send(
29
+ :to_sym,
30
+ 0
31
+ )
15
32
  )}
16
- g.string_build(self.body.size)
17
- g.send(
18
- :to_sym,
19
- 0
20
- )
21
- )}
33
+ )
22
34
  )}}
23
35
  .tap { |__c__| __c__.__name__ = :SymbolCompose })})}}.instance
@@ -2,11 +2,23 @@
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::SymbolLiteral = ::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(:symbol, [[:node_type, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:value, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
8
- self.pos(g)
9
- g.push_literal(self.value)
10
- )}
5
+ declare_meme(
6
+ :symbol,
7
+ [:node_type],
8
+ ::Object::Proc.new { |*| nil}
9
+ )
10
+ declare_meme(
11
+ :value,
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_literal(self.value)
21
+ )}
22
+ )
11
23
  )}}
12
24
  .tap { |__c__| __c__.__name__ = :SymbolLiteral })})}}.instance
@@ -3,368 +3,608 @@
3
3
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.find_constant(:CodeTools)::AST.component_eval {(
4
4
  ::Myco.cscope.for_method_definition::ToRuby = ::Myco::Component.new([::Myco::Object], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
5
5
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
6
- declare_meme(:lines, [[:var, []]], nil, ::Myco.cscope.dup) { |*| ([""])}
7
- declare_meme(:to_s, [], nil, ::Myco.cscope.dup) { |*| (self.lines.join("\n"))}
8
- declare_meme(:add, [], nil, ::Myco.cscope.dup) { |*strings| (strings.each { |string| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", string.__send__(
9
- :is_a?,
10
- ::Myco.find_constant(:String)
11
- )) {self.lines.last.concat(string.dup)}) {string.to_ruby(self)})})}
12
- declare_meme(:line, [], nil, ::Myco.cscope.dup) { |*strings| (
13
- self.lines.push(self.indents.last.dup)
14
- self.add(*strings)
15
- )}
16
- declare_meme(:list, [], nil, ::Myco.cscope.dup) { |items, separator="", auto_lines:false, &block| (::Myco.branch_op(:"&&", items.__send__(:any?)) {(
17
- items = items.dup
18
- last_item = items.pop
19
- use_lines = ::Myco.branch_op(:"&&", items.__send__(:any?)) {auto_lines}
20
- ::Myco.branch_op(:"&&", use_lines) {self.push_indent}
21
- items.each { |item| (
6
+ declare_meme(
7
+ :lines,
8
+ [:var],
9
+ ::Object::Proc.new { |*| ([""])}
10
+ )
11
+ declare_meme(
12
+ :to_s,
13
+ [],
14
+ ::Object::Proc.new { |*| (self.lines.join("\n"))}
15
+ )
16
+ declare_meme(
17
+ :add,
18
+ [],
19
+ ::Object::Proc.new { |*strings| (strings.each { |string| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", string.__send__(
20
+ :is_a?,
21
+ ::Myco.find_constant(:String)
22
+ )) {self.lines.last.concat(string.dup)}) {string.to_ruby(self)})})}
23
+ )
24
+ declare_meme(
25
+ :line,
26
+ [],
27
+ ::Object::Proc.new { |*strings| (
28
+ self.lines.push(self.indents.last.dup)
29
+ self.add(*strings)
30
+ )}
31
+ )
32
+ declare_meme(
33
+ :list,
34
+ [],
35
+ ::Object::Proc.new { |items, separator="", auto_lines:false, &block| (::Myco.branch_op(:"&&", items.__send__(:any?)) {(
36
+ items = items.dup
37
+ last_item = items.pop
38
+ use_lines = ::Myco.branch_op(:"&&", items.__send__(:any?)) {auto_lines}
39
+ ::Myco.branch_op(:"&&", use_lines) {self.push_indent}
40
+ items.each { |item| (
41
+ ::Myco.branch_op(:"&&", use_lines) {self.line}
42
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", block) {block.call(item)}) {self.add(item)}
43
+ self.add(separator)
44
+ )}
45
+ ::Myco.branch_op(:"&&", use_lines) {self.line}
46
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", block) {block.call(last_item)}) {self.add(last_item)}
47
+ ::Myco.branch_op(:"&&", use_lines) {self.pop_indent}
22
48
  ::Myco.branch_op(:"&&", use_lines) {self.line}
23
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", block) {block.call(item)}) {self.add(item)}
24
- self.add(separator)
49
+ )})}
50
+ )
51
+ declare_meme(
52
+ :indents,
53
+ [:var],
54
+ ::Object::Proc.new { |*| ([""])}
55
+ )
56
+ declare_meme(
57
+ :indent_amount,
58
+ [:var],
59
+ ::Object::Proc.new { |*| (2)}
60
+ )
61
+ declare_meme(
62
+ :pop_indent,
63
+ [],
64
+ ::Object::Proc.new { |*| (self.indents.pop)}
65
+ )
66
+ declare_meme(
67
+ :push_indent,
68
+ [],
69
+ ::Object::Proc.new { |amount=self.indent_amount| (self.indents.push(self.indents.last.__send__(
70
+ :+,
71
+ " ".__send__(
72
+ :*,
73
+ amount
74
+ )
75
+ )))}
76
+ )
77
+ declare_meme(
78
+ :var_scopes,
79
+ [:var],
80
+ ::Object::Proc.new { |*| ([])}
81
+ )
82
+ declare_meme(
83
+ :var_scope,
84
+ [],
85
+ ::Object::Proc.new { |*| (self.var_scopes.last)}
86
+ )
87
+ declare_meme(
88
+ :with_nested_var_scope,
89
+ [],
90
+ ::Object::Proc.new { |node, &block| (
91
+ self.var_scopes.push(node)
92
+ block.call
93
+ self.var_scopes.pop
25
94
  )}
26
- ::Myco.branch_op(:"&&", use_lines) {self.line}
27
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", block) {block.call(last_item)}) {self.add(last_item)}
28
- ::Myco.branch_op(:"&&", use_lines) {self.pop_indent}
29
- ::Myco.branch_op(:"&&", use_lines) {self.line}
30
- )})}
31
- declare_meme(:indents, [[:var, []]], nil, ::Myco.cscope.dup) { |*| ([""])}
32
- declare_meme(:indent_amount, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (2)}
33
- declare_meme(:pop_indent, [], nil, ::Myco.cscope.dup) { |*| (self.indents.pop)}
34
- declare_meme(:push_indent, [], nil, ::Myco.cscope.dup) { |amount=self.indent_amount| (self.indents.push(self.indents.last.__send__(
35
- :+,
36
- " ".__send__(
37
- :*,
38
- amount
39
- )
40
- )))}
41
- declare_meme(:var_scopes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| ([])}
42
- declare_meme(:var_scope, [], nil, ::Myco.cscope.dup) { |*| (self.var_scopes.last)}
43
- declare_meme(:with_nested_var_scope, [], nil, ::Myco.cscope.dup) { |node, &block| (
44
- self.var_scopes.push(node)
45
- block.call
46
- self.var_scopes.pop
47
- )}
48
- declare_meme(:var_scope_declare_local, [], nil, ::Myco.cscope.dup) { |name| (self.var_scope.variables.__send__(
49
- :[]=,
50
- name,
51
- true
52
- ))}
53
- declare_meme(:var_scope_declare_locals, [], nil, ::Myco.cscope.dup) { |*names| (names.each { |name| (self.var_scope_declare_local(name))})}
54
- declare_meme(:var_scope_has_local?, [], nil, ::Myco.cscope.dup) { |name| (self.var_scopes.reverse.detect { |scope| (scope.variables.__send__(
55
- :has_key?,
56
- name
57
- ))}.__send__(:!).__send__(:!))}
58
- declare_meme(:easy_ident?, [], nil, ::Myco.cscope.dup) { |sym| (
59
- str = sym.to_s
60
- ::Myco.branch_op(:"&&", str.__send__(
61
- :=~,
62
- ::Myco.find_constant(:Regexp).new("^[a-z_][A-Za-z_]*$")
63
- )) {[
64
- :if,
65
- :unless,
66
- :and,
67
- :or,
68
- :def,
69
- :do,
70
- :class,
71
- :module,
72
- :end,
73
- :break,
74
- :begin,
75
- :rescue,
76
- :ensure
77
- ].__send__(
78
- :include?,
79
- sym
80
- ).__send__(:!)}
81
- )}
95
+ )
96
+ declare_meme(
97
+ :var_scope_declare_local,
98
+ [],
99
+ ::Object::Proc.new { |name| (self.var_scope.variables.__send__(
100
+ :[]=,
101
+ name,
102
+ true
103
+ ))}
104
+ )
105
+ declare_meme(
106
+ :var_scope_declare_locals,
107
+ [],
108
+ ::Object::Proc.new { |*names| (names.each { |name| (self.var_scope_declare_local(name))})}
109
+ )
110
+ declare_meme(
111
+ :var_scope_has_local?,
112
+ [],
113
+ ::Object::Proc.new { |name| (self.var_scopes.reverse.detect { |scope| (scope.variables.__send__(
114
+ :has_key?,
115
+ name
116
+ ))}.__send__(:!).__send__(:!))}
117
+ )
118
+ declare_meme(
119
+ :easy_ident?,
120
+ [],
121
+ ::Object::Proc.new { |sym| (
122
+ str = sym.to_s
123
+ ::Myco.branch_op(:"&&", str.__send__(
124
+ :=~,
125
+ ::Myco.find_constant(:Regexp).new("^[a-z_][A-Za-z_]*$")
126
+ )) {[
127
+ :if,
128
+ :unless,
129
+ :and,
130
+ :or,
131
+ :def,
132
+ :do,
133
+ :class,
134
+ :module,
135
+ :end,
136
+ :break,
137
+ :begin,
138
+ :rescue,
139
+ :ensure
140
+ ].__send__(
141
+ :include?,
142
+ sym
143
+ ).__send__(:!)}
144
+ )}
145
+ )
82
146
  )}}
83
147
  .tap { |__c__| __c__.__name__ = :ToRuby }
84
- ::Myco.find_constant(:Node).component_eval {(declare_meme(:to_ruby_code, [], nil, ::Myco.cscope.dup) { |*| (
85
- g = ::Myco.find_constant(:ToRuby).new
86
- self.to_ruby(g)
87
- g.to_s
88
- )})}
89
- ::Myco.find_constant(:Self).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("self"))})}
90
- ::Myco.find_constant(:NullLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("nil"))})}
91
- ::Myco.find_constant(:VoidLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("::Myco::Void"))})}
92
- ::Myco.find_constant(:TrueLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("true"))})}
93
- ::Myco.find_constant(:FalseLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("false"))})}
94
- ::Myco.find_constant(:NumericLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.value.inspect))})}
95
- ::Myco.find_constant(:StringLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.value.inspect))})}
96
- ::Myco.find_constant(:SymbolLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.value.inspect))})}
97
- ::Myco.find_constant(:StringCompose).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
98
- g.add("\"")
99
- self.body.each_slice(2) { |string, to_string| (
100
- g.add(string.value.to_s.inspect.slice(::Myco.find_constant(:Range).new(
101
- 1,
102
- -2
103
- )))
104
- ::Myco.branch_op(:"&&", to_string) {(
105
- g.add("\#{")
106
- g.add(to_string)
107
- g.add("}")
148
+ ::Myco.find_constant(:Node).component_eval {(declare_meme(
149
+ :to_ruby_code,
150
+ [],
151
+ ::Object::Proc.new { |*| (
152
+ g = ::Myco.find_constant(:ToRuby).new
153
+ self.to_ruby(g)
154
+ g.to_s
155
+ )}
156
+ ))}
157
+ ::Myco.find_constant(:Self).component_eval {(declare_meme(
158
+ :to_ruby,
159
+ [],
160
+ ::Object::Proc.new { |g| (g.add("self"))}
161
+ ))}
162
+ ::Myco.find_constant(:NullLiteral).component_eval {(declare_meme(
163
+ :to_ruby,
164
+ [],
165
+ ::Object::Proc.new { |g| (g.add("nil"))}
166
+ ))}
167
+ ::Myco.find_constant(:VoidLiteral).component_eval {(declare_meme(
168
+ :to_ruby,
169
+ [],
170
+ ::Object::Proc.new { |g| (g.add("::Myco::Void"))}
171
+ ))}
172
+ ::Myco.find_constant(:TrueLiteral).component_eval {(declare_meme(
173
+ :to_ruby,
174
+ [],
175
+ ::Object::Proc.new { |g| (g.add("true"))}
176
+ ))}
177
+ ::Myco.find_constant(:FalseLiteral).component_eval {(declare_meme(
178
+ :to_ruby,
179
+ [],
180
+ ::Object::Proc.new { |g| (g.add("false"))}
181
+ ))}
182
+ ::Myco.find_constant(:NumericLiteral).component_eval {(declare_meme(
183
+ :to_ruby,
184
+ [],
185
+ ::Object::Proc.new { |g| (g.add(self.value.inspect))}
186
+ ))}
187
+ ::Myco.find_constant(:StringLiteral).component_eval {(declare_meme(
188
+ :to_ruby,
189
+ [],
190
+ ::Object::Proc.new { |g| (g.add(self.value.inspect))}
191
+ ))}
192
+ ::Myco.find_constant(:SymbolLiteral).component_eval {(declare_meme(
193
+ :to_ruby,
194
+ [],
195
+ ::Object::Proc.new { |g| (g.add(self.value.inspect))}
196
+ ))}
197
+ ::Myco.find_constant(:StringCompose).component_eval {(declare_meme(
198
+ :to_ruby,
199
+ [],
200
+ ::Object::Proc.new { |g| (
201
+ g.add("\"")
202
+ self.body.each_slice(2) { |string, to_string| (
203
+ g.add(string.value.to_s.inspect.slice(::Myco.find_constant(:Range).new(
204
+ 1,
205
+ -2
206
+ )))
207
+ ::Myco.branch_op(:"&&", to_string) {(
208
+ g.add("\#{")
209
+ g.add(to_string)
210
+ g.add("}")
211
+ )}
108
212
  )}
213
+ g.add("\"")
109
214
  )}
110
- g.add("\"")
111
- )})}
112
- ::Myco.find_constant(:SymbolCompose).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
113
- g.add(":\"")
114
- self.body.each_slice(2) { |string, to_string| (
115
- g.add(string.value.to_s.inspect.slice(::Myco.find_constant(:Range).new(
116
- 1,
117
- -2
118
- )))
119
- ::Myco.branch_op(:"&&", to_string) {(
120
- g.add("\#{")
121
- g.add(to_string)
122
- g.add("}")
215
+ ))}
216
+ ::Myco.find_constant(:SymbolCompose).component_eval {(declare_meme(
217
+ :to_ruby,
218
+ [],
219
+ ::Object::Proc.new { |g| (
220
+ g.add(":\"")
221
+ self.body.each_slice(2) { |string, to_string| (
222
+ g.add(string.value.to_s.inspect.slice(::Myco.find_constant(:Range).new(
223
+ 1,
224
+ -2
225
+ )))
226
+ ::Myco.branch_op(:"&&", to_string) {(
227
+ g.add("\#{")
228
+ g.add(to_string)
229
+ g.add("}")
230
+ )}
123
231
  )}
232
+ g.add("\"")
124
233
  )}
125
- g.add("\"")
126
- )})}
127
- ::Myco.find_constant(:ArrayAssembly).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
128
- g.add("[")
129
- g.list(
130
- self.body,
131
- ",",
132
- {:auto_lines => true}
133
- )
134
- g.add("]")
135
- )})}
136
- ::Myco.find_constant(:KeywordAssembly).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
137
- g.add("{")
138
- g.list(
139
- self.body.each_slice(2).to_a,
140
- ",",
141
- {:auto_lines => true}
142
- ) { |pair| (g.add(
143
- pair.first,
144
- " => ",
145
- pair.last
146
- ))}
147
- g.add("}")
148
- )})}
149
- ::Myco.find_constant(:ConstantAccess).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
150
- name_list = self.names.map(&:to_sym)
151
- first_name = name_list.shift
152
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.toplevel) {self.case(
153
- first_name,
154
- :Myco,
155
- ::Object::Proc.new { || (g.add("::Myco"))},
156
- :Ruby,
157
- ::Object::Proc.new { || (g.add("::Object"))},
158
- :Rubinius,
159
- ::Object::Proc.new { || (g.add("::Rubinius"))},
160
- ::Object::Proc.new { || (g.add("::Myco::#{first_name}"))}
161
- )}) {g.add("::Myco.find_constant(#{first_name.inspect})")}
162
- name_list.each { |name| (g.add("::#{name}"))}
163
- )})}
164
- ::Myco.find_constant(:ConstantAssignment).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
165
- name_list = self.constant.names.map(&:to_sym)
166
- last_name = name_list.pop
167
- first_name = ::Myco.branch_op(:"&&", name_list.__send__(:any?)) {name_list.shift}
168
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.constant.toplevel) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", first_name) {self.case(
169
- first_name,
170
- :Myco,
171
- ::Object::Proc.new { || (g.add("::Myco"))},
172
- :Ruby,
173
- ::Object::Proc.new { || (g.add("::Object"))},
174
- :Rubinius,
175
- ::Object::Proc.new { || (g.add("::Rubinius"))},
176
- ::Object::Proc.new { || (g.add("::Myco::#{first_name}"))}
177
- )}) {g.add("::Myco")}}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", first_name) {g.add("::Myco.find_constant(#{first_name.inspect})")}) {g.add("::Myco.cscope.for_method_definition")}}
178
- name_list.each { |name| (g.add("::#{name}"))}
179
- g.add("::#{last_name} = ")
180
- g.add(self.value)
181
- )})}
182
- ::Myco.find_constant(:ConstantDefine).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
183
- g.add(self.implementation)
184
- g.line(".tap { |__c__| __c__.__name__ = ")
185
- g.add(self.constant.names.last.inspect)
186
- g.add(" }")
187
- )})}
188
- ::Myco.find_constant(:DeclareExtension).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
189
- g.add(self.constant)
190
- g.add(".component_eval {")
191
- g.add(self.body)
192
- g.add("}")
193
- )})}
194
- ::Myco.find_constant(:DeclaredScope).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.with_nested_var_scope(self) { || (g.add(self.body))})})}
195
- ::Myco.find_constant(:Script).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.body))})}
196
- ::Myco.find_constant(:DeclareFile).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
197
- g.line
198
- self.implementation.to_ruby(g)
199
- g.line
200
- )})}
201
- ::Myco.find_constant(:DeclareObject).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
202
- g.add("::Myco::Component.new(")
203
- g.add(self.types)
204
- g.add(", ::Myco.cscope.for_method_definition, __FILE__, __LINE__)")
205
- g.line(".tap { |__c__| __c__.__last__ = __c__.component_eval {")
206
- g.add(self.scope_implementation)
207
- g.add("}}")
208
- ::Myco.branch_op(:"&&", self.create) {g.add(".instance")}
209
- )})}
210
- ::Myco.find_constant(:DeclareString).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.implementation))})}
211
- ::Myco.find_constant(:DeclareCategory).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
212
- g.add("__category__(#{self.name.inspect})")
213
- g.add(".component_eval {")
214
- g.add(self.body)
215
- g.add("}")
216
- )})}
217
- ::Myco.find_constant(:DeclareMeme).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
218
- name = self.decorations.last
219
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", name.node_type.__send__(
220
- :==,
221
- :symbol
222
- )) {(
223
- g.add("declare_meme(")
234
+ ))}
235
+ ::Myco.find_constant(:ArrayAssembly).component_eval {(declare_meme(
236
+ :to_ruby,
237
+ [],
238
+ ::Object::Proc.new { |g| (
239
+ g.add("[")
224
240
  g.list(
225
- [
226
- self.effective_name,
227
- self.effective_decorations,
228
- self.effective_body
229
- ],
241
+ self.body,
230
242
  ",",
231
243
  {:auto_lines => true}
232
244
  )
233
- g.add(")")
234
- )}) {g.add(::Myco.find_constant(:ConstantAssignment).new({
235
- :line => self.line,
236
- :constant => self.effective_name,
237
- :value => self.effective_body.block.body
238
- }))}
239
- )})}
240
- ::Myco.find_constant(:RequiredParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("#{self.name}"))})}
241
- ::Myco.find_constant(:OptionalParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
242
- g.add("#{self.name}=")
243
- g.add(self.value)
244
- )})}
245
- ::Myco.find_constant(:RestParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("*#{self.name}"))})}
246
- ::Myco.find_constant(:KeywordRequiredParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("#{self.name}:"))})}
247
- ::Myco.find_constant(:KeywordOptionalParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
248
- g.add("#{self.name}:")
249
- g.add(self.value)
250
- )})}
251
- ::Myco.find_constant(:KeywordRestParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("**#{self.name}"))})}
252
- ::Myco.find_constant(:BlockParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("&#{self.name}"))})}
253
- ::Myco.find_constant(:ParameterAssembly).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
254
- g.add("|")
255
- g.list(
256
- self.all_params,
257
- ", "
258
- )
259
- g.add("|")
260
- )})}
261
- ::Myco.find_constant(:Sequence).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
262
- g.add("(")
263
- g.list(
264
- self.array,
265
- "",
266
- {:auto_lines => true}
267
- )
268
- g.add(")")
269
- )})}
270
- ::Myco.find_constant(:Invoke).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.implementation))})}
271
- ::Myco.find_constant(:InvokeMethod).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
272
- list = ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.arguments) {self.arguments.body.dup}) {[]}
273
- ::Myco.branch_op(:"&&", self.arguments.block.__send__(
274
- :is_a?,
275
- ::Myco.find_constant(:BlockArgument)
276
- )) {list.push(self.arguments.block)}
277
- g.add(self.receiver)
278
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", g.__send__(
279
- :easy_ident?,
280
- self.name
281
- )) {g.add(".#{self.name}")}) {(
282
- g.add(".__send__")
283
- list.unshift(::Myco.find_constant(:SymbolLiteral).new({
245
+ g.add("]")
246
+ )}
247
+ ))}
248
+ ::Myco.find_constant(:KeywordAssembly).component_eval {(declare_meme(
249
+ :to_ruby,
250
+ [],
251
+ ::Object::Proc.new { |g| (
252
+ g.add("{")
253
+ g.list(
254
+ self.body.each_slice(2).to_a,
255
+ ",",
256
+ {:auto_lines => true}
257
+ ) { |pair| (g.add(
258
+ pair.first,
259
+ " => ",
260
+ pair.last
261
+ ))}
262
+ g.add("}")
263
+ )}
264
+ ))}
265
+ ::Myco.find_constant(:ConstantAccess).component_eval {(declare_meme(
266
+ :to_ruby,
267
+ [],
268
+ ::Object::Proc.new { |g| (
269
+ name_list = self.names.map(&:to_sym)
270
+ first_name = name_list.shift
271
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.toplevel) {self.case(
272
+ first_name,
273
+ :Myco,
274
+ ::Object::Proc.new { |*| (g.add("::Myco"))},
275
+ :Ruby,
276
+ ::Object::Proc.new { |*| (g.add("::Object"))},
277
+ :Rubinius,
278
+ ::Object::Proc.new { |*| (g.add("::Rubinius"))},
279
+ ::Object::Proc.new { |*| (g.add("::Myco::#{first_name}"))}
280
+ )}) {g.add("::Myco.find_constant(#{first_name.inspect})")}
281
+ name_list.each { |name| (g.add("::#{name}"))}
282
+ )}
283
+ ))}
284
+ ::Myco.find_constant(:ConstantAssignment).component_eval {(declare_meme(
285
+ :to_ruby,
286
+ [],
287
+ ::Object::Proc.new { |g| (
288
+ name_list = self.constant.names.map(&:to_sym)
289
+ last_name = name_list.pop
290
+ first_name = ::Myco.branch_op(:"&&", name_list.__send__(:any?)) {name_list.shift}
291
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.constant.toplevel) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", first_name) {self.case(
292
+ first_name,
293
+ :Myco,
294
+ ::Object::Proc.new { |*| (g.add("::Myco"))},
295
+ :Ruby,
296
+ ::Object::Proc.new { |*| (g.add("::Object"))},
297
+ :Rubinius,
298
+ ::Object::Proc.new { |*| (g.add("::Rubinius"))},
299
+ ::Object::Proc.new { |*| (g.add("::Myco::#{first_name}"))}
300
+ )}) {g.add("::Myco")}}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", first_name) {g.add("::Myco.find_constant(#{first_name.inspect})")}) {g.add("::Myco.cscope.for_method_definition")}}
301
+ name_list.each { |name| (g.add("::#{name}"))}
302
+ g.add("::#{last_name} = ")
303
+ g.add(self.value)
304
+ )}
305
+ ))}
306
+ ::Myco.find_constant(:ConstantDefine).component_eval {(declare_meme(
307
+ :to_ruby,
308
+ [],
309
+ ::Object::Proc.new { |g| (
310
+ g.add(self.implementation)
311
+ g.line(".tap { |__c__| __c__.__name__ = ")
312
+ g.add(self.constant.names.last.inspect)
313
+ g.add(" }")
314
+ )}
315
+ ))}
316
+ ::Myco.find_constant(:DeclareExtension).component_eval {(declare_meme(
317
+ :to_ruby,
318
+ [],
319
+ ::Object::Proc.new { |g| (
320
+ g.add(self.constant)
321
+ g.add(".component_eval {")
322
+ g.add(self.body)
323
+ g.add("}")
324
+ )}
325
+ ))}
326
+ ::Myco.find_constant(:DeclaredScope).component_eval {(declare_meme(
327
+ :to_ruby,
328
+ [],
329
+ ::Object::Proc.new { |g| (g.with_nested_var_scope(self) { |*| (g.add(self.body))})}
330
+ ))}
331
+ ::Myco.find_constant(:Script).component_eval {(declare_meme(
332
+ :to_ruby,
333
+ [],
334
+ ::Object::Proc.new { |g| (g.add(self.body))}
335
+ ))}
336
+ ::Myco.find_constant(:DeclareFile).component_eval {(declare_meme(
337
+ :to_ruby,
338
+ [],
339
+ ::Object::Proc.new { |g| (
340
+ g.line
341
+ self.implementation.to_ruby(g)
342
+ g.line
343
+ )}
344
+ ))}
345
+ ::Myco.find_constant(:DeclareObject).component_eval {(declare_meme(
346
+ :to_ruby,
347
+ [],
348
+ ::Object::Proc.new { |g| (
349
+ g.add("::Myco::Component.new(")
350
+ g.add(self.types)
351
+ g.add(", ::Myco.cscope.for_method_definition, __FILE__, __LINE__)")
352
+ g.line(".tap { |__c__| __c__.__last__ = __c__.component_eval {")
353
+ g.add(self.scope_implementation)
354
+ g.add("}}")
355
+ ::Myco.branch_op(:"&&", self.create) {g.add(".instance")}
356
+ )}
357
+ ))}
358
+ ::Myco.find_constant(:DeclareString).component_eval {(declare_meme(
359
+ :to_ruby,
360
+ [],
361
+ ::Object::Proc.new { |g| (g.add(self.implementation))}
362
+ ))}
363
+ ::Myco.find_constant(:DeclareCategory).component_eval {(declare_meme(
364
+ :to_ruby,
365
+ [],
366
+ ::Object::Proc.new { |g| (
367
+ g.add("__category__(#{self.name.inspect})")
368
+ g.add(".component_eval {")
369
+ g.add(self.body)
370
+ g.add("}")
371
+ )}
372
+ ))}
373
+ ::Myco.find_constant(:DeclareMeme).component_eval {(declare_meme(
374
+ :to_ruby,
375
+ [],
376
+ ::Object::Proc.new { |g| (
377
+ name = self.decorations.last
378
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", name.node_type.__send__(
379
+ :==,
380
+ :symbol
381
+ )) {(
382
+ g.add("declare_meme(")
383
+ g.list(
384
+ [
385
+ self.effective_name,
386
+ self.effective_decorations,
387
+ self.effective_body
388
+ ],
389
+ ",",
390
+ {:auto_lines => true}
391
+ )
392
+ g.add(")")
393
+ )}) {g.add(::Myco.find_constant(:ConstantAssignment).new({
284
394
  :line => self.line,
285
- :value => self.name
286
- }))
395
+ :constant => self.effective_name,
396
+ :value => self.effective_body.block.body
397
+ }))}
398
+ )}
399
+ ))}
400
+ ::Myco.find_constant(:RequiredParameter).component_eval {(declare_meme(
401
+ :to_ruby,
402
+ [],
403
+ ::Object::Proc.new { |g| (g.add("#{self.name}"))}
404
+ ))}
405
+ ::Myco.find_constant(:OptionalParameter).component_eval {(declare_meme(
406
+ :to_ruby,
407
+ [],
408
+ ::Object::Proc.new { |g| (
409
+ g.add("#{self.name}=")
410
+ g.add(self.value)
287
411
  )}
288
- ::Myco.branch_op(:"&&", list.__send__(:any?)) {(
412
+ ))}
413
+ ::Myco.find_constant(:RestParameter).component_eval {(declare_meme(
414
+ :to_ruby,
415
+ [],
416
+ ::Object::Proc.new { |g| (g.add("*#{self.name}"))}
417
+ ))}
418
+ ::Myco.find_constant(:KeywordRequiredParameter).component_eval {(declare_meme(
419
+ :to_ruby,
420
+ [],
421
+ ::Object::Proc.new { |g| (g.add("#{self.name}:"))}
422
+ ))}
423
+ ::Myco.find_constant(:KeywordOptionalParameter).component_eval {(declare_meme(
424
+ :to_ruby,
425
+ [],
426
+ ::Object::Proc.new { |g| (
427
+ g.add("#{self.name}:")
428
+ g.add(self.value)
429
+ )}
430
+ ))}
431
+ ::Myco.find_constant(:KeywordRestParameter).component_eval {(declare_meme(
432
+ :to_ruby,
433
+ [],
434
+ ::Object::Proc.new { |g| (g.add("**#{self.name}"))}
435
+ ))}
436
+ ::Myco.find_constant(:BlockParameter).component_eval {(declare_meme(
437
+ :to_ruby,
438
+ [],
439
+ ::Object::Proc.new { |g| (g.add("&#{self.name}"))}
440
+ ))}
441
+ ::Myco.find_constant(:ParameterAssembly).component_eval {(declare_meme(
442
+ :to_ruby,
443
+ [],
444
+ ::Object::Proc.new { |g| (
445
+ g.add("|")
446
+ g.list(
447
+ self.all_params,
448
+ ", "
449
+ )
450
+ g.add("|")
451
+ )}
452
+ ))}
453
+ ::Myco.find_constant(:Sequence).component_eval {(declare_meme(
454
+ :to_ruby,
455
+ [],
456
+ ::Object::Proc.new { |g| (
289
457
  g.add("(")
290
458
  g.list(
291
- list,
292
- ",",
459
+ self.array,
460
+ "",
293
461
  {:auto_lines => true}
294
462
  )
295
463
  g.add(")")
296
464
  )}
297
- ::Myco.branch_op(:"&&", self.arguments.block.__send__(
465
+ ))}
466
+ ::Myco.find_constant(:Invoke).component_eval {(declare_meme(
467
+ :to_ruby,
468
+ [],
469
+ ::Object::Proc.new { |g| (g.add(self.implementation))}
470
+ ))}
471
+ ::Myco.find_constant(:InvokeMethod).component_eval {(declare_meme(
472
+ :to_ruby,
473
+ [],
474
+ ::Object::Proc.new { |g| (
475
+ list = ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.arguments) {self.arguments.body.dup}) {[]}
476
+ ::Myco.branch_op(:"&&", self.arguments.block.__send__(
477
+ :is_a?,
478
+ ::Myco.find_constant(:BlockArgument)
479
+ )) {list.push(self.arguments.block)}
480
+ g.add(self.receiver)
481
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", g.__send__(
482
+ :easy_ident?,
483
+ self.name
484
+ )) {g.add(".#{self.name}")}) {(
485
+ g.add(".__send__")
486
+ list.unshift(::Myco.find_constant(:SymbolLiteral).new({
487
+ :line => self.line,
488
+ :value => self.name
489
+ }))
490
+ )}
491
+ ::Myco.branch_op(:"&&", list.__send__(:any?)) {(
492
+ g.add("(")
493
+ g.list(
494
+ list,
495
+ ",",
496
+ {:auto_lines => true}
497
+ )
498
+ g.add(")")
499
+ )}
500
+ ::Myco.branch_op(:"&&", self.arguments.block.__send__(
501
+ :is_a?,
502
+ ::Myco.find_constant(:Block)
503
+ )) {(
504
+ g.add(" {")
505
+ g.add(self.arguments.block)
506
+ g.add("}")
507
+ )}
508
+ )}
509
+ ))}
510
+ ::Myco.find_constant(:LocalVariableAssignment).component_eval {(declare_meme(
511
+ :to_ruby,
512
+ [],
513
+ ::Object::Proc.new { |g| (
514
+ g.var_scope_declare_local(self.name)
515
+ g.var_scope.variables.__send__(
516
+ :[]=,
517
+ self.name,
518
+ true
519
+ )
520
+ g.add(self.name.to_s)
521
+ g.add(" = ")
522
+ g.add(self.value)
523
+ )}
524
+ ))}
525
+ ::Myco.find_constant(:LocalVariableAccessAmbiguous).component_eval {(declare_meme(
526
+ :to_ruby,
527
+ [],
528
+ ::Object::Proc.new { |g| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", g.__send__(
529
+ :var_scope_has_local?,
530
+ self.name
531
+ )) {g.add(self.name.to_s)}) {(
532
+ g.add("self")
533
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", g.__send__(
534
+ :easy_ident?,
535
+ self.name
536
+ )) {g.add(".#{self.name}")}) {g.add(".__send__(#{self.name.inspect})")}
537
+ )})}
538
+ ))}
539
+ ::Myco.find_constant(:SplatValue).component_eval {(declare_meme(
540
+ :to_ruby,
541
+ [],
542
+ ::Object::Proc.new { |g| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.value.__send__(
298
543
  :is_a?,
299
- ::Myco.find_constant(:Block)
300
- )) {(
301
- g.add(" {")
302
- g.add(self.arguments.block)
544
+ self.__send__(:class)
545
+ )) {self.value.to_ruby(g)}) {(
546
+ g.add("*")
547
+ self.value.to_ruby(g)
548
+ )})}
549
+ ))}
550
+ ::Myco.find_constant(:BlockArgument).component_eval {(declare_meme(
551
+ :to_ruby,
552
+ [],
553
+ ::Object::Proc.new { |g| (
554
+ g.add("&")
555
+ g.add(self.body)
556
+ )}
557
+ ))}
558
+ ::Myco.find_constant(:Block).component_eval {(declare_meme(
559
+ :to_ruby,
560
+ [],
561
+ ::Object::Proc.new { |g| (g.with_nested_var_scope(self) { |*| (
562
+ g.var_scope_declare_locals(*self.effective_parameters.names)
563
+ g.add(" ")
564
+ g.add(self.effective_parameters)
565
+ g.add(" ")
566
+ g.add(self.body)
567
+ )})}
568
+ ))}
569
+ ::Myco.find_constant(:BlockLiteral).component_eval {(declare_meme(
570
+ :to_ruby,
571
+ [],
572
+ ::Object::Proc.new { |g| (g.add(self.implementation))}
573
+ ))}
574
+ ::Myco.find_constant(:Quest).component_eval {(declare_meme(
575
+ :to_ruby,
576
+ [],
577
+ ::Object::Proc.new { |g| (
578
+ associated_questable = self.questable.dup
579
+ associated_questable.__send__(
580
+ :receiver=,
581
+ self.receiver
582
+ )
583
+ g.add("(")
584
+ g.add("Rubinius::Type.object_respond_to?(")
585
+ g.add(self.receiver)
586
+ g.add(", #{self.questable.name.inspect}).false?")
587
+ g.add(" ? ::Myco::Void : ")
588
+ g.add(associated_questable)
589
+ g.add(")")
590
+ )}
591
+ ))}
592
+ ::Myco.find_constant(:BranchOperator).component_eval {(declare_meme(
593
+ :to_ruby,
594
+ [],
595
+ ::Object::Proc.new { |g| (
596
+ g.add("::Myco.branch_op(")
597
+ g.add(self.type.inspect)
598
+ g.add(", ")
599
+ g.add(self.left)
600
+ g.add(") {")
601
+ g.add(self.right)
303
602
  g.add("}")
304
603
  )}
305
- )})}
306
- ::Myco.find_constant(:LocalVariableAssignment).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
307
- g.var_scope_declare_local(self.name)
308
- g.var_scope.variables.__send__(
309
- :[]=,
310
- self.name,
311
- true
312
- )
313
- g.add(self.name.to_s)
314
- g.add(" = ")
315
- g.add(self.value)
316
- )})}
317
- ::Myco.find_constant(:LocalVariableAccessAmbiguous).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", g.__send__(
318
- :var_scope_has_local?,
319
- self.name
320
- )) {g.add(self.name.to_s)}) {(
321
- g.add("self")
322
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", g.__send__(
323
- :easy_ident?,
324
- self.name
325
- )) {g.add(".#{self.name}")}) {g.add(".__send__(#{self.name.inspect})")}
326
- )})})}
327
- ::Myco.find_constant(:SplatValue).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.value.__send__(
328
- :is_a?,
329
- self.__send__(:class)
330
- )) {self.value.to_ruby(g)}) {(
331
- g.add("*")
332
- self.value.to_ruby(g)
333
- )})})}
334
- ::Myco.find_constant(:BlockArgument).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
335
- g.add("&")
336
- g.add(self.body)
337
- )})}
338
- ::Myco.find_constant(:Block).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.with_nested_var_scope(self) { || (
339
- g.var_scope_declare_locals(*self.effective_parameters.names)
340
- g.add(" ")
341
- g.add(self.effective_parameters)
342
- g.add(" ")
343
- g.add(self.body)
344
- )})})}
345
- ::Myco.find_constant(:BlockLiteral).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.implementation))})}
346
- ::Myco.find_constant(:Quest).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
347
- associated_questable = self.questable.dup
348
- associated_questable.__send__(
349
- :receiver=,
350
- self.receiver
351
- )
352
- g.add("(")
353
- g.add("Rubinius::Type.object_respond_to?(")
354
- g.add(self.receiver)
355
- g.add(", #{self.questable.name.inspect}).false?")
356
- g.add(" ? ::Myco::Void : ")
357
- g.add(associated_questable)
358
- g.add(")")
359
- )})}
360
- ::Myco.find_constant(:BranchOperator).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
361
- g.add("::Myco.branch_op(")
362
- g.add(self.type.inspect)
363
- g.add(", ")
364
- g.add(self.left)
365
- g.add(") {")
366
- g.add(self.right)
367
- g.add("}")
368
- )})}
369
- ::Myco.find_constant(:PipeOperator).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add(self.implementation))})}
604
+ ))}
605
+ ::Myco.find_constant(:PipeOperator).component_eval {(declare_meme(
606
+ :to_ruby,
607
+ [],
608
+ ::Object::Proc.new { |g| (g.add(self.implementation))}
609
+ ))}
370
610
  )})}}.instance