repo.or.cz
/
rbx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Fix up Rubinius specific library specs.
[rbx.git]
/
lib
/
compiler
/
macro.rb
blob
668a7a9dafcce62ac73a0fa504d8e02377c6dd02
1
class Compiler
2
3
##
4
# Unused test code
5
6
class MacroGenerator
7
8
def initialize(compiler)
9
@compiler = compiler
10
end
11
12
def make(kind, *args)
13
obj = kind.new(@compiler)
14
obj.args *args
15
return obj
16
end
17
18
def call(who, meth, *args)
19
make Compiler::Node::Call, who, meth, args
20
end
21
22
def const(name)
23
make ConstFind, name
24
end
25
26
def lit(obj)
27
make Literal, obj
28
end
29
end
30
end