// Help debugPrinter to print an optional slot.
|
void addDebugOptionalSlotIdentifier(std::vector<DebugPrinter::Block>& ret,
|
const boost::optional<value::SlotId>& slot) {
|
if (slot) {
|
DebugPrinter::addIdentifier(ret, slot.value());
|
} else {
|
DebugPrinter::addIdentifier(ret, DebugPrinter::kNoneKeyword);
|
}
|
}
|
|
// Help debugPrinter to print a vector of slots.
|
void addDebugSlotVector(std::vector<DebugPrinter::Block>& ret, const value::SlotVector& slotVec) {
|
ret.emplace_back(DebugPrinter::Block("[`"));
|
for (size_t idx = 0; idx < slotVec.size(); ++idx) {
|
if (idx) {
|
ret.emplace_back(DebugPrinter::Block("`,"));
|
} DebugPrinter::addIdentifier(ret, slotVec[idx]);
|
}
|
ret.emplace_back(DebugPrinter::Block("`]"));
|
}
|