atomy 0.1.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +13 -0
- data/LICENSE.md +201 -0
- data/bin/atomy +16 -133
- data/kernel/array.ay +6 -0
- data/kernel/atomy.ay +18 -0
- data/kernel/condition.ay +171 -271
- data/kernel/control-flow.ay +197 -192
- data/kernel/core.ay +120 -0
- data/kernel/data.ay +83 -39
- data/kernel/define.ay +84 -93
- data/kernel/doc.ay +282 -449
- data/kernel/dynamic.ay +25 -29
- data/kernel/file.ay +9 -0
- data/kernel/grammar.ay +267 -0
- data/kernel/hash.ay +17 -0
- data/kernel/interpolation.ay +59 -0
- data/kernel/io.ay +70 -244
- data/kernel/let-macro.ay +24 -0
- data/kernel/let-pattern.ay +24 -0
- data/kernel/loop.ay +80 -0
- data/kernel/mutation.ay +53 -0
- data/kernel/particles.ay +176 -39
- data/kernel/patterns.ay +527 -191
- data/kernel/pretty.ay +311 -277
- data/kernel/quotes.ay +29 -0
- data/kernel/range.ay +4 -0
- data/kernel/regexp.ay +23 -0
- data/kernel/repl.ay +83 -109
- data/kernel/stack-local.ay +21 -0
- data/lib/atomy.rb +37 -0
- data/lib/atomy/bootstrap.rb +256 -0
- data/lib/atomy/code/assign.rb +64 -0
- data/lib/atomy/code/block.rb +98 -0
- data/lib/atomy/code/class_variable.rb +17 -0
- data/lib/atomy/code/constant.rb +21 -0
- data/lib/atomy/code/define.rb +242 -0
- data/lib/atomy/code/define_function.rb +51 -0
- data/lib/atomy/code/define_method.rb +20 -0
- data/lib/atomy/code/false.rb +9 -0
- data/lib/atomy/code/instance_variable.rb +15 -0
- data/lib/atomy/code/integer.rb +13 -0
- data/lib/atomy/code/list.rb +17 -0
- data/lib/atomy/code/nil.rb +9 -0
- data/lib/atomy/code/pattern.rb +23 -0
- data/lib/atomy/code/pattern/and.rb +61 -0
- data/lib/atomy/code/pattern/quasi_quote.rb +185 -0
- data/lib/atomy/code/pattern/splat.rb +29 -0
- data/lib/atomy/code/pattern/wildcard.rb +37 -0
- data/lib/atomy/code/quasi_quote.rb +118 -0
- data/lib/atomy/code/quote.rb +13 -0
- data/lib/atomy/code/self.rb +9 -0
- data/lib/atomy/code/send.rb +110 -0
- data/lib/atomy/code/sequence.rb +23 -0
- data/lib/atomy/code/string_literal.rb +53 -0
- data/lib/atomy/code/symbol.rb +13 -0
- data/lib/atomy/code/true.rb +9 -0
- data/lib/atomy/code/undefined.rb +9 -0
- data/lib/atomy/code/variable.rb +17 -0
- data/lib/atomy/codeloader.rb +218 -0
- data/lib/atomy/compiler.rb +57 -0
- data/lib/atomy/errors.rb +54 -0
- data/lib/atomy/grammar.rb +2278 -0
- data/lib/atomy/locals.rb +75 -0
- data/lib/atomy/message_structure.rb +277 -0
- data/lib/atomy/method.rb +343 -0
- data/lib/atomy/module.rb +144 -0
- data/lib/atomy/node/constructable.rb +169 -0
- data/lib/atomy/node/equality.rb +113 -0
- data/lib/atomy/node/meta.rb +206 -0
- data/lib/atomy/node/pretty.rb +108 -0
- data/lib/atomy/parser.rb +21 -0
- data/lib/atomy/pattern.rb +26 -0
- data/lib/atomy/pattern/and.rb +59 -0
- data/lib/atomy/pattern/attribute.rb +16 -0
- data/lib/atomy/pattern/class_variable.rb +15 -0
- data/lib/atomy/pattern/equality.rb +42 -0
- data/lib/atomy/pattern/instance_variable.rb +15 -0
- data/lib/atomy/pattern/kind_of.rb +20 -0
- data/lib/atomy/pattern/or.rb +48 -0
- data/lib/atomy/pattern/quasi_quote.rb +164 -0
- data/lib/atomy/pattern/splat.rb +15 -0
- data/lib/atomy/pattern/wildcard.rb +18 -0
- data/lib/atomy/rubygems.rb +48 -0
- data/lib/atomy/version.rb +3 -0
- metadata +169 -134
- data/COPYING +0 -30
- data/README.md +0 -1
- data/kernel/block.ay +0 -30
- data/kernel/boot.ay +0 -10
- data/kernel/comparison.ay +0 -61
- data/kernel/concurrency.ay +0 -84
- data/kernel/cosmetics.ay +0 -3
- data/kernel/data-delta.ay +0 -105
- data/kernel/documentation.ay +0 -135
- data/kernel/errors.ay +0 -6
- data/kernel/format.ay +0 -13
- data/kernel/format/data.ay +0 -89
- data/kernel/format/formatter.ay +0 -345
- data/kernel/format/parser.ay +0 -13
- data/kernel/hashes.ay +0 -39
- data/kernel/namespaces.ay +0 -63
- data/kernel/node.ay +0 -48
- data/kernel/operators.ay +0 -28
- data/kernel/precision.ay +0 -148
- data/kernel/therie.ay +0 -204
- data/lib/ast/binary_send.rb +0 -44
- data/lib/ast/block.rb +0 -268
- data/lib/ast/constant.rb +0 -88
- data/lib/ast/internal/assign.rb +0 -19
- data/lib/ast/internal/block_pass.rb +0 -21
- data/lib/ast/internal/catch.rb +0 -247
- data/lib/ast/internal/class.rb +0 -30
- data/lib/ast/internal/class_variable.rb +0 -23
- data/lib/ast/internal/define.rb +0 -174
- data/lib/ast/internal/ensure.rb +0 -135
- data/lib/ast/internal/file.rb +0 -14
- data/lib/ast/internal/global_variable.rb +0 -20
- data/lib/ast/internal/if_then_else.rb +0 -24
- data/lib/ast/internal/instance_variable.rb +0 -17
- data/lib/ast/internal/let_macro.rb +0 -35
- data/lib/ast/internal/macro_quote.rb +0 -23
- data/lib/ast/internal/match.rb +0 -53
- data/lib/ast/internal/module.rb +0 -30
- data/lib/ast/internal/pattern.rb +0 -17
- data/lib/ast/internal/return.rb +0 -29
- data/lib/ast/internal/set.rb +0 -19
- data/lib/ast/internal/singleton_class.rb +0 -18
- data/lib/ast/internal/splat.rb +0 -14
- data/lib/ast/internal/when.rb +0 -24
- data/lib/ast/list.rb +0 -25
- data/lib/ast/macro.rb +0 -37
- data/lib/ast/node.rb +0 -599
- data/lib/ast/operator.rb +0 -21
- data/lib/ast/particle.rb +0 -13
- data/lib/ast/primitive.rb +0 -20
- data/lib/ast/quasi_quote.rb +0 -20
- data/lib/ast/quote.rb +0 -13
- data/lib/ast/send.rb +0 -104
- data/lib/ast/splice.rb +0 -32
- data/lib/ast/string.rb +0 -23
- data/lib/ast/unary.rb +0 -44
- data/lib/ast/unquote.rb +0 -45
- data/lib/ast/variable.rb +0 -64
- data/lib/atomy.kpeg.rb +0 -3995
- data/lib/code_loader.rb +0 -137
- data/lib/compiler/compiler.rb +0 -155
- data/lib/compiler/stages.rb +0 -81
- data/lib/formatter.kpeg.rb +0 -1394
- data/lib/macros.rb +0 -317
- data/lib/method.rb +0 -261
- data/lib/namespace.rb +0 -236
- data/lib/parser.rb +0 -28
- data/lib/patterns.rb +0 -276
- data/lib/patterns/any.rb +0 -21
- data/lib/patterns/attribute.rb +0 -59
- data/lib/patterns/block_pass.rb +0 -54
- data/lib/patterns/constant.rb +0 -33
- data/lib/patterns/default.rb +0 -44
- data/lib/patterns/head_tail.rb +0 -63
- data/lib/patterns/list.rb +0 -77
- data/lib/patterns/match.rb +0 -45
- data/lib/patterns/named.rb +0 -55
- data/lib/patterns/named_class.rb +0 -46
- data/lib/patterns/named_global.rb +0 -46
- data/lib/patterns/named_instance.rb +0 -46
- data/lib/patterns/particle.rb +0 -29
- data/lib/patterns/quasi_quote.rb +0 -184
- data/lib/patterns/quote.rb +0 -33
- data/lib/patterns/singleton_class.rb +0 -31
- data/lib/patterns/splat.rb +0 -57
- data/lib/util.rb +0 -37
data/lib/patterns/any.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class Any < Pattern
|
3
|
-
def construct(g)
|
4
|
-
get(g)
|
5
|
-
g.send :new, 0
|
6
|
-
end
|
7
|
-
|
8
|
-
def ==(b)
|
9
|
-
b.kind_of?(Any)
|
10
|
-
end
|
11
|
-
|
12
|
-
def target(g)
|
13
|
-
g.push_const :Object
|
14
|
-
end
|
15
|
-
|
16
|
-
def matches?(g)
|
17
|
-
g.pop
|
18
|
-
g.push_true
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/patterns/attribute.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class Attribute < Pattern
|
3
|
-
attr_reader :receiver, :name, :arguments
|
4
|
-
|
5
|
-
def initialize(r, n, as = [])
|
6
|
-
@receiver = r
|
7
|
-
@name = n
|
8
|
-
@arguments = as
|
9
|
-
end
|
10
|
-
|
11
|
-
def construct(g)
|
12
|
-
get(g)
|
13
|
-
@receiver.construct(g, nil)
|
14
|
-
g.push_literal @name
|
15
|
-
@arguments.each do |a|
|
16
|
-
a.construct(g)
|
17
|
-
end
|
18
|
-
g.make_array @arguments.size
|
19
|
-
g.send :new, 3
|
20
|
-
end
|
21
|
-
|
22
|
-
def ==(b)
|
23
|
-
b.kind_of?(Attribute) and \
|
24
|
-
@receiver == b.receiver and \
|
25
|
-
@name == b.name and \
|
26
|
-
@arguments == b.arguments
|
27
|
-
end
|
28
|
-
|
29
|
-
def target(g)
|
30
|
-
# this should be pretty rare, but seems sensible
|
31
|
-
@receiver.construct(g)
|
32
|
-
end
|
33
|
-
|
34
|
-
def matches?(g)
|
35
|
-
g.pop
|
36
|
-
g.push_true
|
37
|
-
end
|
38
|
-
|
39
|
-
def deconstruct(g, locals = {})
|
40
|
-
@receiver.compile(g)
|
41
|
-
g.swap
|
42
|
-
@arguments.each do |a|
|
43
|
-
a.compile(g)
|
44
|
-
g.swap
|
45
|
-
end
|
46
|
-
g.send((@name + "=").to_sym, 1 + @arguments.size)
|
47
|
-
g.pop
|
48
|
-
end
|
49
|
-
|
50
|
-
def local_names
|
51
|
-
[]
|
52
|
-
end
|
53
|
-
|
54
|
-
def bindings
|
55
|
-
1
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
data/lib/patterns/block_pass.rb
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class BlockPass < Pattern
|
3
|
-
attr_reader :pattern
|
4
|
-
|
5
|
-
def initialize(p)
|
6
|
-
@pattern = p
|
7
|
-
end
|
8
|
-
|
9
|
-
def construct(g)
|
10
|
-
get(g)
|
11
|
-
@pattern.construct(g)
|
12
|
-
g.send :new, 1
|
13
|
-
end
|
14
|
-
|
15
|
-
def ==(b)
|
16
|
-
b.kind_of?(BlockPass) and \
|
17
|
-
@pattern == b.pattern
|
18
|
-
end
|
19
|
-
|
20
|
-
def target(g)
|
21
|
-
g.push_const :Object
|
22
|
-
end
|
23
|
-
|
24
|
-
def matches?(g)
|
25
|
-
g.pop
|
26
|
-
g.push_true
|
27
|
-
end
|
28
|
-
|
29
|
-
def deconstruct(g, locals = {})
|
30
|
-
nil_block = g.new_label
|
31
|
-
done = g.new_label
|
32
|
-
|
33
|
-
g.dup
|
34
|
-
g.is_nil
|
35
|
-
g.git nil_block
|
36
|
-
|
37
|
-
g.push_cpath_top
|
38
|
-
g.find_const :Proc
|
39
|
-
g.swap
|
40
|
-
g.send :__from_block__, 1
|
41
|
-
@pattern.deconstruct(g, locals)
|
42
|
-
g.goto done
|
43
|
-
|
44
|
-
nil_block.set!
|
45
|
-
g.pop
|
46
|
-
|
47
|
-
done.set!
|
48
|
-
end
|
49
|
-
|
50
|
-
def local_names
|
51
|
-
@pattern.local_names
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
data/lib/patterns/constant.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class Constant < Pattern
|
3
|
-
attr_reader :constant, :ancestors
|
4
|
-
|
5
|
-
def initialize(constant, ancestors = nil)
|
6
|
-
@constant = constant
|
7
|
-
@ancestors = ancestors
|
8
|
-
end
|
9
|
-
|
10
|
-
def construct(g)
|
11
|
-
get(g)
|
12
|
-
@constant.construct(g)
|
13
|
-
@constant.bytecode(g)
|
14
|
-
g.send :ancestors, 0
|
15
|
-
g.send :new, 2
|
16
|
-
end
|
17
|
-
|
18
|
-
def ==(b)
|
19
|
-
b.kind_of?(Constant) and \
|
20
|
-
@constant == b.constant
|
21
|
-
end
|
22
|
-
|
23
|
-
def target(g)
|
24
|
-
@constant.bytecode(g)
|
25
|
-
end
|
26
|
-
|
27
|
-
def matches?(g)
|
28
|
-
target(g)
|
29
|
-
g.swap
|
30
|
-
g.kind_of
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
data/lib/patterns/default.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class Default < Pattern
|
3
|
-
attr_reader :pattern, :default
|
4
|
-
|
5
|
-
def initialize(p, d)
|
6
|
-
@pattern = p
|
7
|
-
@default = d
|
8
|
-
end
|
9
|
-
|
10
|
-
def construct(g)
|
11
|
-
get(g)
|
12
|
-
@pattern.construct(g)
|
13
|
-
@default.construct(g, nil)
|
14
|
-
g.send :new, 2
|
15
|
-
end
|
16
|
-
|
17
|
-
def ==(b)
|
18
|
-
b.kind_of?(Default) and \
|
19
|
-
@pattern == b.pattern and \
|
20
|
-
@default == b.default
|
21
|
-
end
|
22
|
-
|
23
|
-
def target(g)
|
24
|
-
@pattern.target(g)
|
25
|
-
end
|
26
|
-
|
27
|
-
def matches?(g)
|
28
|
-
@pattern.matches?(g)
|
29
|
-
end
|
30
|
-
|
31
|
-
def deconstruct(g, locals = {})
|
32
|
-
@pattern.deconstruct(g, locals)
|
33
|
-
end
|
34
|
-
|
35
|
-
def local_names
|
36
|
-
@pattern.local_names
|
37
|
-
end
|
38
|
-
|
39
|
-
def bindings
|
40
|
-
@pattern.bindings
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
data/lib/patterns/head_tail.rb
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class HeadTail < Pattern
|
3
|
-
attr_reader :head, :tail
|
4
|
-
|
5
|
-
def initialize(head, tail)
|
6
|
-
@head = head
|
7
|
-
@tail = tail
|
8
|
-
end
|
9
|
-
|
10
|
-
def construct(g)
|
11
|
-
get(g)
|
12
|
-
@head.construct(g)
|
13
|
-
@tail.construct(g)
|
14
|
-
g.send :new, 2
|
15
|
-
end
|
16
|
-
|
17
|
-
def ==(b)
|
18
|
-
b.kind_of?(HeadTail) and \
|
19
|
-
@head == b.head and \
|
20
|
-
@tail == b.tail
|
21
|
-
end
|
22
|
-
|
23
|
-
def target(g)
|
24
|
-
g.push_const :Array
|
25
|
-
end
|
26
|
-
|
27
|
-
def matches?(g)
|
28
|
-
mismatch = g.new_label
|
29
|
-
matched = g.new_label
|
30
|
-
|
31
|
-
g.dup
|
32
|
-
g.send :empty?, 0
|
33
|
-
g.git mismatch
|
34
|
-
|
35
|
-
g.shift_array
|
36
|
-
@head.matches?(g)
|
37
|
-
g.gif mismatch
|
38
|
-
|
39
|
-
@tail.matches?(g)
|
40
|
-
g.goto matched
|
41
|
-
|
42
|
-
mismatch.set!
|
43
|
-
g.pop
|
44
|
-
g.push_false
|
45
|
-
|
46
|
-
matched.set!
|
47
|
-
end
|
48
|
-
|
49
|
-
def deconstruct(g, locals = {})
|
50
|
-
g.shift_array
|
51
|
-
@head.deconstruct(g, locals)
|
52
|
-
@tail.deconstruct(g, locals)
|
53
|
-
end
|
54
|
-
|
55
|
-
def local_names
|
56
|
-
@head.local_names + @tail.local_names
|
57
|
-
end
|
58
|
-
|
59
|
-
def bindings
|
60
|
-
@head.bindings + @tail.bindings
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
data/lib/patterns/list.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class List < Pattern
|
3
|
-
attr_reader :patterns
|
4
|
-
|
5
|
-
def initialize(ps)
|
6
|
-
@patterns = ps
|
7
|
-
end
|
8
|
-
|
9
|
-
def construct(g)
|
10
|
-
get(g)
|
11
|
-
@patterns.each do |p|
|
12
|
-
p.construct(g)
|
13
|
-
end
|
14
|
-
g.make_array @patterns.size
|
15
|
-
g.send :new, 1
|
16
|
-
end
|
17
|
-
|
18
|
-
def ==(b)
|
19
|
-
b.kind_of?(List) and \
|
20
|
-
@patterns == b.patterns
|
21
|
-
end
|
22
|
-
|
23
|
-
def target(g)
|
24
|
-
g.push_const :Array
|
25
|
-
end
|
26
|
-
|
27
|
-
def matches?(g)
|
28
|
-
matched = g.new_label
|
29
|
-
mismatch = g.new_label
|
30
|
-
|
31
|
-
g.dup
|
32
|
-
g.push_cpath_top
|
33
|
-
g.find_const :Array
|
34
|
-
g.swap
|
35
|
-
g.kind_of
|
36
|
-
g.gif mismatch
|
37
|
-
|
38
|
-
g.dup
|
39
|
-
g.send :size, 0
|
40
|
-
g.push @patterns.size
|
41
|
-
g.send :==, 1
|
42
|
-
g.gif mismatch
|
43
|
-
|
44
|
-
@patterns.each do |p|
|
45
|
-
g.shift_array
|
46
|
-
p.matches?(g)
|
47
|
-
g.gif mismatch
|
48
|
-
end
|
49
|
-
g.pop
|
50
|
-
|
51
|
-
g.push_true
|
52
|
-
g.goto matched
|
53
|
-
|
54
|
-
mismatch.set!
|
55
|
-
g.pop
|
56
|
-
g.push_false
|
57
|
-
|
58
|
-
matched.set!
|
59
|
-
end
|
60
|
-
|
61
|
-
def deconstruct(g, locals = {})
|
62
|
-
@patterns.each do |p|
|
63
|
-
g.shift_array
|
64
|
-
p.deconstruct(g, locals)
|
65
|
-
end
|
66
|
-
g.pop
|
67
|
-
end
|
68
|
-
|
69
|
-
def local_names
|
70
|
-
@patterns.collect { |p| p.local_names }.flatten
|
71
|
-
end
|
72
|
-
|
73
|
-
def bindings
|
74
|
-
@patterns.reduce(0) { |a, p| p.bindings + a }
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
data/lib/patterns/match.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class Match < Pattern
|
3
|
-
attr_reader :value
|
4
|
-
|
5
|
-
def initialize(x)
|
6
|
-
@value = x
|
7
|
-
end
|
8
|
-
|
9
|
-
def construct(g)
|
10
|
-
get(g)
|
11
|
-
g.push_literal @value
|
12
|
-
g.send :new, 1
|
13
|
-
end
|
14
|
-
|
15
|
-
def ==(b)
|
16
|
-
b.kind_of?(Match) and \
|
17
|
-
@value == b.value
|
18
|
-
end
|
19
|
-
|
20
|
-
def target(g)
|
21
|
-
case @value
|
22
|
-
when :true
|
23
|
-
g.push_const :TrueClass
|
24
|
-
when :false
|
25
|
-
g.push_const :FalseClass
|
26
|
-
when :nil
|
27
|
-
g.push_const :NilClass
|
28
|
-
when :self
|
29
|
-
g.push_self
|
30
|
-
else
|
31
|
-
g.push_const @value.class.name.to_sym
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def matches?(g)
|
36
|
-
case @value
|
37
|
-
when :true, :false, :self, :nil, Integer
|
38
|
-
g.push @value
|
39
|
-
else
|
40
|
-
g.push_literal @value
|
41
|
-
end
|
42
|
-
g.send :==, 1
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
data/lib/patterns/named.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
module Atomy::Patterns
|
2
|
-
class Named < Pattern
|
3
|
-
attr_reader :name, :pattern
|
4
|
-
|
5
|
-
def initialize(n, p)
|
6
|
-
@name = n
|
7
|
-
@pattern = p
|
8
|
-
end
|
9
|
-
|
10
|
-
def construct(g)
|
11
|
-
get(g)
|
12
|
-
g.push_literal @name
|
13
|
-
@pattern.construct(g)
|
14
|
-
g.send :new, 2
|
15
|
-
end
|
16
|
-
|
17
|
-
def ==(b)
|
18
|
-
b.kind_of?(Named) and \
|
19
|
-
@name == b.name and \
|
20
|
-
@pattern == b.pattern
|
21
|
-
end
|
22
|
-
|
23
|
-
def target(g)
|
24
|
-
@pattern.target(g)
|
25
|
-
end
|
26
|
-
|
27
|
-
def matches?(g)
|
28
|
-
@pattern.matches?(g)
|
29
|
-
end
|
30
|
-
|
31
|
-
def deconstruct(g, locals = {})
|
32
|
-
if locals[@name]
|
33
|
-
local = locals[@name]
|
34
|
-
else
|
35
|
-
local = Atomy.assign_local(g, @name)
|
36
|
-
end
|
37
|
-
|
38
|
-
if @pattern.bindings > 0
|
39
|
-
g.dup
|
40
|
-
@pattern.deconstruct(g, locals)
|
41
|
-
end
|
42
|
-
|
43
|
-
local.set_bytecode(g)
|
44
|
-
g.pop
|
45
|
-
end
|
46
|
-
|
47
|
-
def local_names
|
48
|
-
[@name] + @pattern.local_names
|
49
|
-
end
|
50
|
-
|
51
|
-
def bindings
|
52
|
-
1 + @pattern.bindings
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|