Exemplo n.º 1
0
void
FreezeScript::AnalyzeInitVisitor::typeChange(const TypePtr& t, const string& scoped, const string& kind)
{
    BuiltinPtr b = BuiltinPtr::dynamicCast(t);
    ContainedPtr c = ContainedPtr::dynamicCast(t);
    ProxyPtr p = ProxyPtr::dynamicCast(t);

    _out.newline();
    _out.newline();
    _out << "<!-- NOTICE: " << scoped << " has changed from ";
    if(b)
    {
        _out << b->kindAsString();
    }
    else if(p)
    {
        _out << "proxy";
    }
    else
    {
        assert(c);
        _out << c->kindOf();
    }
    _out << " to " << kind << " -->";
}
Exemplo n.º 2
0
string
FreezeScript::typeToString(const TypePtr& type)
{
    BuiltinPtr b = BuiltinPtr::dynamicCast(type);
    ContainedPtr c = ContainedPtr::dynamicCast(type);
    if(b)
    {
        return b->kindAsString();
    }
    else if(c)
    {
        return c->scoped();
    }
    else
    {
        ProxyPtr p = ProxyPtr::dynamicCast(type);
        assert(p);
        return p->_class()->scoped() + "*";
    }
}