void Slice::Ruby::CodeVisitor::visitConst(const ConstPtr& p) { Slice::TypePtr type = p->type(); string name = fixIdent(p->name(), IdentToUpper); _out << sp << nl << name << " = "; writeConstantValue(type, p->valueType(), p->value()); }
void Slice::ChecksumVisitor::visitConst(const ConstPtr& p) { ostringstream ostr; ostr << "const " << typeToString(p->type()) << ' ' << p->name() << " = " << p->value() << endl; updateMap(p->scoped(), ostr.str()); }