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