xo-reader2 xo-expression2: define example working and printing
def foo : f64 = 3.141593;
This commit is contained in:
parent
c3907f45df
commit
855cdb08b7
9 changed files with 172 additions and 6 deletions
|
|
@ -22,6 +22,7 @@ namespace xo {
|
|||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using typeseq = xo::reflect::typeseq;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
explicit DConstant(obj<AGCObject> value) noexcept;
|
||||
|
|
@ -45,6 +46,8 @@ namespace xo {
|
|||
|
||||
void assign_valuetype(TypeDescr td) noexcept { typeref_.resolve(td); }
|
||||
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
private:
|
||||
static TypeDescr _lookup_td(typeseq tseq);
|
||||
|
||||
|
|
|
|||
62
include/xo/expression2/detail/IPrintable_DConstant.hpp
Normal file
62
include/xo/expression2/detail/IPrintable_DConstant.hpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/** @file IPrintable_DConstant.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DConstant.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DConstant.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Printable.hpp"
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
|
||||
#include "DConstant.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IPrintable_DConstant; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::print::APrintable,
|
||||
xo::scm::DConstant>
|
||||
{
|
||||
using ImplType = xo::print::IPrintable_Xfer
|
||||
<xo::scm::DConstant,
|
||||
xo::scm::IPrintable_DConstant>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IPrintable_DConstant
|
||||
**/
|
||||
class IPrintable_DConstant {
|
||||
public:
|
||||
/** @defgroup scm-printable-dconstant-type-traits **/
|
||||
///@{
|
||||
using ppindentinfo = xo::print::APrintable::ppindentinfo;
|
||||
using Copaque = xo::print::APrintable::Copaque;
|
||||
using Opaque = xo::print::APrintable::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-printable-dconstant-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** Pretty-printing support for this object.
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
|
||||
static bool pretty(const DConstant & self, const ppindentinfo & ppii);
|
||||
|
||||
// non-const methods
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
Loading…
Add table
Add a link
Reference in a new issue