xo-reader: + pretty-printing support [WIP]
This commit is contained in:
parent
210502e17a
commit
adc0ca287e
18 changed files with 84 additions and 21 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "xo/expression/DefineExpr.hpp"
|
||||
#include "xo/expression/ConvertExpr.hpp"
|
||||
#include "exprstate.hpp"
|
||||
#include "xo/indentlog/print/ppdetail_atomic.hpp"
|
||||
//#include <cstdint>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -117,6 +118,12 @@ namespace xo {
|
|||
rp<ConvertExprAccess> cvt_expr_;
|
||||
};
|
||||
} /*namespace scm*/
|
||||
|
||||
#ifndef ppdetail_atomic
|
||||
namespace print {
|
||||
PPDETAIL_ATOMIC(xo::scm::defexprstatetype);
|
||||
}
|
||||
#endif
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -214,6 +214,13 @@ namespace xo {
|
|||
return os;
|
||||
};
|
||||
} /*namespace scm*/
|
||||
|
||||
#ifndef ppdetail_atomic
|
||||
namespace print {
|
||||
PPDETAIL_ATOMIC(xo::scm::exprstatetype);
|
||||
PPDETAIL_ATOMIC(xo::scm::exprstate);
|
||||
} /*namespace print*/
|
||||
#endif
|
||||
} /*namespace xo*/
|
||||
|
||||
/** end exprstate.hpp **/
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "exprstate.hpp"
|
||||
#include "xo/indentlog/print/vector.hpp"
|
||||
#include "xo/indentlog/print/pretty.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
|
@ -64,6 +65,21 @@ namespace xo {
|
|||
return os;
|
||||
}
|
||||
} /*namespace scm*/
|
||||
|
||||
#ifndef ppdetail_atomic
|
||||
namespace print {
|
||||
template <>
|
||||
struct ppdetail<xo::scm::exprstatestack *> {
|
||||
static bool print_upto(ppstate * pps, const xo::scm::exprstatestack * x) {
|
||||
return ppdetail_atomic<const xo::scm::exprstatestack *>::print_upto(pps, x);
|
||||
}
|
||||
static void print_pretty(ppstate * pps, const xo::scm::exprstatestack * x) {
|
||||
ppdetail_atomic<const xo::scm::exprstatestack *>::print_pretty(pps, x);
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@ namespace xo {
|
|||
return os;
|
||||
}
|
||||
} /*namespace scm*/
|
||||
|
||||
#ifndef ppdetail_atomic
|
||||
namespace print {
|
||||
PPDETAIL_ATOMIC(xo::scm::parserstatemachine);
|
||||
}
|
||||
#endif
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,12 @@ namespace xo {
|
|||
rp<Expression> rhs_;
|
||||
};
|
||||
} /*namespace scm*/
|
||||
|
||||
#ifndef ppdetail_atomic
|
||||
namespace print {
|
||||
PPDETAIL_ATOMIC(xo::scm::optype);
|
||||
}
|
||||
#endif
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "parser.hpp"
|
||||
#include "xo/expression/Expression.hpp"
|
||||
#include "xo/expression/pretty_expression.hpp"
|
||||
#include "xo/tokenizer/tokenizer.hpp"
|
||||
|
||||
namespace xo {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue