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,25 +2,45 @@
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::DeclareString = ::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(:declstr, [[:node_type, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:types, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:string, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
8
- declare_meme(:implementation, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:InvokeMethod).new({
9
- :line => self.string.line,
10
- :name => :from_string,
11
- :arguments => ::Myco.find_constant(:ArgumentAssembly).new({
5
+ declare_meme(
6
+ :declstr,
7
+ [:node_type],
8
+ ::Object::Proc.new { |*| nil}
9
+ )
10
+ declare_meme(
11
+ :types,
12
+ [:field],
13
+ ::Object::Proc.new { |*| nil}
14
+ )
15
+ declare_meme(
16
+ :string,
17
+ [:field],
18
+ ::Object::Proc.new { |*| nil}
19
+ )
20
+ declare_meme(
21
+ :implementation,
22
+ [],
23
+ ::Object::Proc.new { |*| (::Myco.find_constant(:InvokeMethod).new({
12
24
  :line => self.string.line,
13
- :body => [self.string]
14
- }),
15
- :receiver => ::Myco.find_constant(:DeclareObject).new({
16
- :line => self.line,
17
- :types => self.types,
18
- :body => ::Myco.find_constant(:NullLiteral).new({:line => self.line})
19
- })
20
- }))}
21
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
22
- self.pos(g)
23
- self.implementation.bytecode(g)
24
- )}
25
+ :name => :from_string,
26
+ :arguments => ::Myco.find_constant(:ArgumentAssembly).new({
27
+ :line => self.string.line,
28
+ :body => [self.string]
29
+ }),
30
+ :receiver => ::Myco.find_constant(:DeclareObject).new({
31
+ :line => self.line,
32
+ :types => self.types,
33
+ :body => ::Myco.find_constant(:NullLiteral).new({:line => self.line})
34
+ })
35
+ }))}
36
+ )
37
+ declare_meme(
38
+ :bytecode,
39
+ [],
40
+ ::Object::Proc.new { |g| (
41
+ self.pos(g)
42
+ self.implementation.bytecode(g)
43
+ )}
44
+ )
25
45
  )}}
26
46
  .tap { |__c__| __c__.__name__ = :DeclareString })})}}.instance
@@ -5,73 +5,101 @@
5
5
  ::Myco.find_constant(:Node)
6
6
  ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
7
7
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
8
- declare_meme(:name, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
9
- declare_meme(:body, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
10
- declare_meme(:scope_method, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
11
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
12
- self.pos(g)
13
- g.state.scope.nest_scope(self)
14
- name = :__declaration__
15
- meth = self.new_generator(
16
- g,
17
- name
18
- )
19
- meth.push_state(self)
20
- meth.__send__(
21
- :for_module_body=,
22
- true
23
- )
24
- meth.push_self
25
- meth.add_scope
26
- meth.state.push_name(name.to_sym)
27
- ::Myco.branch_op(:"&&", self.scope_method) {(
28
- meth.push_scope
29
- meth.send(
30
- self.scope_method,
31
- 0
8
+ declare_meme(
9
+ :name,
10
+ [:var],
11
+ ::Object::Proc.new { |*| nil}
12
+ )
13
+ declare_meme(
14
+ :body,
15
+ [:var],
16
+ ::Object::Proc.new { |*| nil}
17
+ )
18
+ declare_meme(
19
+ :scope_method,
20
+ [:var],
21
+ ::Object::Proc.new { |*| nil}
22
+ )
23
+ declare_meme(
24
+ :bytecode,
25
+ [],
26
+ ::Object::Proc.new { |g| (
27
+ self.pos(g)
28
+ g.state.scope.nest_scope(self)
29
+ name = :__declaration__
30
+ meth = self.new_generator(
31
+ g,
32
+ name
32
33
  )
33
- meth.pop
34
- )}
35
- self.body.bytecode(meth)
36
- meth.state.pop_name
37
- meth.ret
38
- meth.close
39
- meth.__send__(
40
- :local_count=,
41
- self.local_count
42
- )
43
- meth.__send__(
44
- :local_names=,
45
- self.local_names
46
- )
47
- meth.pop_state
48
- g.create_block(meth)
49
- g.swap
50
- g.push_scope
51
- g.push_true
52
- g.send(
53
- :call_under,
54
- 3
55
- )
56
- meth
57
- )}
58
- declare_meme(:nest_scope, [], nil, ::Myco.cscope.dup) { |scope| (scope.__send__(
59
- :parent=,
60
- self
61
- ))}
62
- declare_meme(:parent, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
63
- declare_meme(:search_local, [], nil, ::Myco.cscope.dup) { |name| (
64
- reference = self.parent.search_local(name)
65
- ::Myco.branch_op(:"&&", reference) {(
66
- reference.__send__(
67
- :depth=,
68
- reference.depth.__send__(
69
- :+,
70
- 1
34
+ meth.push_state(self)
35
+ meth.__send__(
36
+ :for_module_body=,
37
+ true
38
+ )
39
+ meth.push_self
40
+ meth.add_scope
41
+ meth.state.push_name(name.to_sym)
42
+ ::Myco.branch_op(:"&&", self.scope_method) {(
43
+ meth.push_scope
44
+ meth.send(
45
+ self.scope_method,
46
+ 0
71
47
  )
48
+ meth.pop
49
+ )}
50
+ self.body.bytecode(meth)
51
+ meth.state.pop_name
52
+ meth.ret
53
+ meth.close
54
+ meth.__send__(
55
+ :local_count=,
56
+ self.local_count
57
+ )
58
+ meth.__send__(
59
+ :local_names=,
60
+ self.local_names
72
61
  )
73
- reference
62
+ meth.pop_state
63
+ g.create_block(meth)
64
+ g.swap
65
+ g.push_scope
66
+ g.push_true
67
+ g.send(
68
+ :call_under,
69
+ 3
70
+ )
71
+ meth
72
+ )}
73
+ )
74
+ declare_meme(
75
+ :nest_scope,
76
+ [],
77
+ ::Object::Proc.new { |scope| (scope.__send__(
78
+ :parent=,
79
+ self
80
+ ))}
81
+ )
82
+ declare_meme(
83
+ :parent,
84
+ [:var],
85
+ ::Object::Proc.new { |*| nil}
86
+ )
87
+ declare_meme(
88
+ :search_local,
89
+ [],
90
+ ::Object::Proc.new { |name| (
91
+ reference = self.parent.search_local(name)
92
+ ::Myco.branch_op(:"&&", reference) {(
93
+ reference.__send__(
94
+ :depth=,
95
+ reference.depth.__send__(
96
+ :+,
97
+ 1
98
+ )
99
+ )
100
+ reference
101
+ )}
74
102
  )}
75
- )}
103
+ )
76
104
  )}}
77
105
  .tap { |__c__| __c__.__name__ = :DeclaredScope })})}}.instance
@@ -18,10 +18,14 @@ CodeTools::AST << {
18
18
  )
19
19
 
20
20
  !self.receiver && !use_args &? (
21
- LocalVariableAccessAmbiguous.new(
22
- line: self.line
23
- name: self.name
24
- )
21
+ (self.name == :self) &? (Self .new(line: self.line)
22
+ ) ?? ((self.name == :null) &? (NullLiteral .new(line: self.line)
23
+ ) ?? ((self.name == :void) &? (VoidLiteral .new(line: self.line)
24
+ ) ?? ((self.name == :true) &? (TrueLiteral .new(line: self.line)
25
+ ) ?? ((self.name == :false) &? (FalseLiteral.new(line: self.line)
26
+ ) ?? (
27
+ LocalVariableAccessAmbiguous.new(line: self.line, name: self.name)
28
+ )))))
25
29
  ) ?? (
26
30
  InvokeMethod.new(
27
31
  line: self.line
@@ -2,39 +2,82 @@
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::Invoke = ::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(:invoke, [[:node_type, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:receiver, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:name, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
8
- declare_meme(:arguments, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
9
- declare_meme(:block, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
10
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
11
- self.pos(g)
12
- self.implementation.bytecode(g)
13
- )}
14
- declare_meme(:implementation, [], nil, ::Myco.cscope.dup) { |*| (
15
- use_args = self.arguments
16
- ::Myco.branch_op(:"&&", self.block) {(
17
- use_args = ::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", use_args) {use_args.dup}) {::Myco.find_constant(:ArgumentAssembly).new({
18
- :line => self.line,
19
- :body => []
20
- })}
21
- use_args.__send__(
22
- :block=,
23
- self.block
24
- )
5
+ declare_meme(
6
+ :invoke,
7
+ [:node_type],
8
+ ::Object::Proc.new { |*| nil}
9
+ )
10
+ declare_meme(
11
+ :receiver,
12
+ [:field],
13
+ ::Object::Proc.new { |*| nil}
14
+ )
15
+ declare_meme(
16
+ :name,
17
+ [:field],
18
+ ::Object::Proc.new { |*| nil}
19
+ )
20
+ declare_meme(
21
+ :arguments,
22
+ [:field],
23
+ ::Object::Proc.new { |*| nil}
24
+ )
25
+ declare_meme(
26
+ :block,
27
+ [:field],
28
+ ::Object::Proc.new { |*| nil}
29
+ )
30
+ declare_meme(
31
+ :bytecode,
32
+ [],
33
+ ::Object::Proc.new { |g| (
34
+ self.pos(g)
35
+ self.implementation.bytecode(g)
25
36
  )}
26
- ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", ::Myco.branch_op(:"&&", self.receiver.__send__(:!)) {use_args.__send__(:!)}) {::Myco.find_constant(:LocalVariableAccessAmbiguous).new({
27
- :line => self.line,
28
- :name => self.name
29
- })}) {::Myco.find_constant(:InvokeMethod).new({
30
- :line => self.line,
31
- :receiver => ::Myco.branch_op(:"||", self.receiver) {::Myco.find_constant(:Self).new({:line => self.line})},
32
- :name => self.name,
33
- :arguments => ::Myco.branch_op(:"||", use_args) {::Myco.find_constant(:ArgumentAssembly).new({
37
+ )
38
+ declare_meme(
39
+ :implementation,
40
+ [],
41
+ ::Object::Proc.new { |*| (
42
+ use_args = self.arguments
43
+ ::Myco.branch_op(:"&&", self.block) {(
44
+ use_args = ::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", use_args) {use_args.dup}) {::Myco.find_constant(:ArgumentAssembly).new({
45
+ :line => self.line,
46
+ :body => []
47
+ })}
48
+ use_args.__send__(
49
+ :block=,
50
+ self.block
51
+ )
52
+ )}
53
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", ::Myco.branch_op(:"&&", self.receiver.__send__(:!)) {use_args.__send__(:!)}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
54
+ :==,
55
+ :self
56
+ )) {::Myco.find_constant(:Self).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
57
+ :==,
58
+ :null
59
+ )) {::Myco.find_constant(:NullLiteral).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
60
+ :==,
61
+ :void
62
+ )) {::Myco.find_constant(:VoidLiteral).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
63
+ :==,
64
+ :true
65
+ )) {::Myco.find_constant(:TrueLiteral).new({:line => self.line})}) {::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.name.__send__(
66
+ :==,
67
+ :false
68
+ )) {::Myco.find_constant(:FalseLiteral).new({:line => self.line})}) {::Myco.find_constant(:LocalVariableAccessAmbiguous).new({
34
69
  :line => self.line,
35
- :body => []
70
+ :name => self.name
71
+ })}}}}}}) {::Myco.find_constant(:InvokeMethod).new({
72
+ :line => self.line,
73
+ :receiver => ::Myco.branch_op(:"||", self.receiver) {::Myco.find_constant(:Self).new({:line => self.line})},
74
+ :name => self.name,
75
+ :arguments => ::Myco.branch_op(:"||", use_args) {::Myco.find_constant(:ArgumentAssembly).new({
76
+ :line => self.line,
77
+ :body => []
78
+ })}
36
79
  })}
37
- })}
38
- )}
80
+ )}
81
+ )
39
82
  )}}
40
83
  .tap { |__c__| __c__.__name__ = :Invoke })})}}.instance
@@ -2,19 +2,39 @@
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::InvokeMethod = ::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(:call, [[:node_type, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:receiver, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:name, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
8
- declare_meme(:arguments, [[:field, []]], nil, ::Myco.cscope.dup) { |*| nil}
9
- declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |g| (
10
- self.receiver.bytecode(g)
11
- self.arguments.bytecode(g)
12
- self.pos(g)
13
- g.__send__(
14
- self.arguments.send_op,
15
- self.name,
16
- self.arguments.send_count
17
- )
18
- )}
5
+ declare_meme(
6
+ :call,
7
+ [:node_type],
8
+ ::Object::Proc.new { |*| nil}
9
+ )
10
+ declare_meme(
11
+ :receiver,
12
+ [:field],
13
+ ::Object::Proc.new { |*| nil}
14
+ )
15
+ declare_meme(
16
+ :name,
17
+ [:field],
18
+ ::Object::Proc.new { |*| nil}
19
+ )
20
+ declare_meme(
21
+ :arguments,
22
+ [:field],
23
+ ::Object::Proc.new { |*| nil}
24
+ )
25
+ declare_meme(
26
+ :bytecode,
27
+ [],
28
+ ::Object::Proc.new { |g| (
29
+ self.receiver.bytecode(g)
30
+ self.arguments.bytecode(g)
31
+ self.pos(g)
32
+ g.__send__(
33
+ self.arguments.send_op,
34
+ self.name,
35
+ self.arguments.send_count
36
+ )
37
+ )}
38
+ )
19
39
  )}}
20
40
  .tap { |__c__| __c__.__name__ = :InvokeMethod })})}}.instance
@@ -2,32 +2,44 @@
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::KeywordAssembly = ::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(:hash, [[: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
- g.push_cpath_top
10
- g.find_const(:Hash)
11
- g.push(self.body.size.__send__(
12
- :/,
13
- 2
14
- ))
15
- g.send(
16
- :new_from_literal,
17
- 1
18
- )
19
- self.body.each_slice(2) { |pair| (
20
- key = pair.first
21
- value = pair.last
22
- g.dup
23
- key.bytecode(g)
24
- value.bytecode(g)
25
- g.send(
26
- :[]=,
5
+ declare_meme(
6
+ :hash,
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
+ g.push_cpath_top
21
+ g.find_const(:Hash)
22
+ g.push(self.body.size.__send__(
23
+ :/,
27
24
  2
25
+ ))
26
+ g.send(
27
+ :new_from_literal,
28
+ 1
28
29
  )
29
- g.pop
30
+ self.body.each_slice(2) { |pair| (
31
+ key = pair.first
32
+ value = pair.last
33
+ g.dup
34
+ key.bytecode(g)
35
+ value.bytecode(g)
36
+ g.send(
37
+ :[]=,
38
+ 2
39
+ )
40
+ g.pop
41
+ )}
30
42
  )}
31
- )}
43
+ )
32
44
  )}}
33
45
  .tap { |__c__| __c__.__name__ = :KeywordAssembly })})}}.instance