xo-reader2: print TypeRef belonging to DVariabe
This commit is contained in:
parent
6caae2ff99
commit
7fd1bd0a6b
3 changed files with 36 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "DVariable.hpp"
|
||||
#include "exprtype.hpp"
|
||||
#include <xo/indentlog/print/quoted.hpp>
|
||||
|
||||
namespace xo {
|
||||
using xo::facet::typeseq;
|
||||
|
|
@ -38,6 +39,8 @@ namespace xo {
|
|||
bool
|
||||
DVariable::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
using xo::print::quot;
|
||||
|
||||
auto name = (name_
|
||||
? std::string_view(*name_)
|
||||
: std::string_view(""));
|
||||
|
|
@ -45,7 +48,8 @@ namespace xo {
|
|||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DVariable",
|
||||
refrtag("name", name));
|
||||
refrtag("name", quot(name)),
|
||||
refrtag("typeref", typeref_));
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
**/
|
||||
|
||||
#include "TypeRef.hpp"
|
||||
#include <xo/indentlog/print/pretty.hpp>
|
||||
#include <xo/indentlog/print/quoted.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
|
@ -62,6 +64,18 @@ namespace xo {
|
|||
return (td_ != nullptr);
|
||||
}
|
||||
|
||||
bool
|
||||
TypeRef::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
using xo::print::quot;
|
||||
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"TypeRef",
|
||||
refrtag("id", quot(id_)),
|
||||
refrtag("td", td_));
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue