def process
nobj = namespace
mscope = scope
if statement.type == :defs
meth = statement[2][0]
nobj = P(namespace, statement[0].source) unless statement[0].source == "self"
args = format_args(statement[3])
blk = statement[4]
mscope = :class
else
meth = statement[0][0]
args = format_args(statement[1])
blk = statement[2]
end
obj = register MethodObject.new(nobj, meth, mscope) do |o|
o.visibility = visibility
o.source = statement.source
o.signature = method_signature(meth)
o.explicit = true
o.parameters = args
end
parse_block(blk, :owner => obj)
end