/* template<> std::string deparseVector<Call>(State const& state, Call const& v, Value const& names) { return state.deparse(Call(v)[0]) + "(" + deparseVectorBody(state, Subset(v, 1, v.length-1), names) + ")"; } template<> std::string deparseVector<Expression>(State const& state, Expression const& v, Value const& names) { return "expression(" + deparseVectorBody(state, v, names) + ")"; } */ std::string deparse(State const& state, Value const& value) { switch(value.type) { case Type::Null: return "NULL"; #define CASE(Name) case Type::Name: return deparseVector(state, (Name const&)value); break; VECTOR_TYPES_NOT_NULL(CASE) #undef CASE case Type::Function: return state.externStr(((Function const&)value).prototype()->string); case Type::Environment: return "environment"; case Type::Object: return deparse(state, ((Object const&)value).base()); default: return Type::toString(value.type); }; }
void Parser::setCatcodes(cat_type t) { theCatcodesType_ = t; deparse(); }
void Parser::popPosition() { pos_ = positions_.back(); positions_.pop_back(); deparse(); }
void Parser::setCatcode(char c, CatCode cat) { theCatcode_[(unsigned char)c] = cat; deparse(); }