xo-reader2: + IPrintable+DExprSeqState
This commit is contained in:
parent
6e7524a730
commit
a836c72a72
7 changed files with 155 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ set(SELF_SRCS
|
|||
|
||||
DExprSeqState.cpp
|
||||
ISyntaxStateMachine_DExprSeqState.cpp
|
||||
IPrintable_DExprSeqState.cpp
|
||||
|
||||
DDefineSsm.cpp
|
||||
ISyntaxStateMachine_DDefineSsm.cpp
|
||||
|
|
|
|||
|
|
@ -13,6 +13,21 @@ namespace xo {
|
|||
using xo::reflect::typeseq;
|
||||
|
||||
namespace scm {
|
||||
const char *
|
||||
exprseqtype_descr(exprseqtype x)
|
||||
{
|
||||
switch (x) {
|
||||
case exprseqtype::toplevel_interactive:
|
||||
return "toplevel-interactive";
|
||||
case exprseqtype::toplevel_batch:
|
||||
return "toplevel-batch";
|
||||
case exprseqtype::N:
|
||||
break;
|
||||
}
|
||||
|
||||
return "exprseqtype?";
|
||||
}
|
||||
|
||||
DExprSeqState::DExprSeqState(exprseqtype ty) : seqtype_{ty}
|
||||
{}
|
||||
|
||||
|
|
@ -153,6 +168,15 @@ namespace xo {
|
|||
sym,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
bool
|
||||
DExprSeqState::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DExprSeqState",
|
||||
refrtag("seqtype", seqtype_));
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
|
|
|||
28
src/reader2/IPrintable_DExprSeqState.cpp
Normal file
28
src/reader2/IPrintable_DExprSeqState.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file IPrintable_DExprSeqState.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExprSeqState.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DExprSeqState.json5]
|
||||
**/
|
||||
|
||||
#include "ssm/IPrintable_DExprSeqState.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IPrintable_DExprSeqState::pretty(const DExprSeqState & self, const ppindentinfo & ppii) -> bool
|
||||
{
|
||||
return self.pretty(ppii);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExprSeqState.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue