1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# -*- coding: utf-8 -*-
module MIKU
module Node
def miku_eval_another(symtable, node)
if(node.is_a? Node) then
node.miku_eval(symtable)
else
node
end
end
end
module StaticCode
attr_accessor :staticcode_line, :staticcode_file
def staticcode_copy_info(src)
if src.is_a? Array
@staticcode_line = src[0]
@staticcode_file = src[1]
else
@staticcode_line = src.staticcode_line
@staticcode_file = src.staticcode_file end
self end
def staticcode_dump
[@staticcode_file, @staticcode_line] end
def self.extended(obj)
obj.staticcode_line = 1
obj.staticcode_file = 'runtime-code' end end
end
|