xo-tokenizer: pretty-printing debug support
This commit is contained in:
parent
232c6d7b22
commit
55602c83cc
4 changed files with 25 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "xo/indentlog/scope.hpp"
|
#include "xo/indentlog/scope.hpp"
|
||||||
|
#include "xo/indentlog/print/ppdetail_atomic.hpp"
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
@ -266,5 +267,14 @@ namespace xo {
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ppdetail_atomic
|
||||||
|
template <typename CharT> \
|
||||||
|
PPDETAIL_ATOMIC_BODY(printspan_impl<CharT>);
|
||||||
|
|
||||||
|
template <typename CharT> \
|
||||||
|
PPDETAIL_ATOMIC_BODY(xo::scm::span<CharT>);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
} /*namespace xo*/
|
} /*namespace xo*/
|
||||||
|
|
|
||||||
|
|
@ -420,6 +420,13 @@ namespace xo {
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
} /*Namespace scm*/
|
} /*Namespace scm*/
|
||||||
|
|
||||||
|
#ifndef ppdetail_atomic
|
||||||
|
namespace print {
|
||||||
|
PPDETAIL_ATOMIC(xo::scm::token<char>);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} /*namespace xo*/
|
} /*namespace xo*/
|
||||||
|
|
||||||
/* end token.hpp */
|
/* end token.hpp */
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include "span.hpp"
|
#include "span.hpp"
|
||||||
#include "scan_result.hpp"
|
#include "scan_result.hpp"
|
||||||
#include "xo/indentlog/scope.hpp"
|
#include "xo/indentlog/scope.hpp"
|
||||||
|
#include "xo/indentlog/print/ppdetail_atomic.hpp"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace xo {
|
namespace xo {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "xo/indentlog/print/tag.hpp" // for STRINGIFY
|
#include "xo/indentlog/print/tag.hpp" // for STRINGIFY
|
||||||
|
#include "xo/indentlog/print/ppdetail_atomic.hpp"
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
namespace xo {
|
namespace xo {
|
||||||
|
|
@ -159,8 +160,13 @@ namespace xo {
|
||||||
os << tokentype_descr(tk_type);
|
os << tokentype_descr(tk_type);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
} /*namespace scm*/
|
} /*namespace scm*/
|
||||||
|
|
||||||
|
#ifndef ppdetail_atomic
|
||||||
|
namespace print {
|
||||||
|
PPDETAIL_ATOMIC(xo::scm::tokentype);
|
||||||
|
} /*namespace print*/
|
||||||
|
#endif
|
||||||
} /*namespace xo*/
|
} /*namespace xo*/
|
||||||
|
|
||||||
/* end tokentype.hpp */
|
/* end tokentype.hpp */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue