From fce0fea1cbdd86df5a27892e14044ad13a4179bd Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 6 Aug 2024 04:35:26 -0400 Subject: [PATCH] xo-expression: + Expression.assign_valuetype() --- include/xo/expression/Expression.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/xo/expression/Expression.hpp b/include/xo/expression/Expression.hpp index cbea3a35..3e9137c4 100644 --- a/include/xo/expression/Expression.hpp +++ b/include/xo/expression/Expression.hpp @@ -92,6 +92,10 @@ namespace xo { /** human-readable string representation **/ virtual std::string display_string() const; + protected: + /** useful when scaffolding expressions in a parser **/ + void assign_valuetype(TypeDescr x) { valuetype_ = x; } + private: /** expression type (constant | apply | ..) for this expression **/ exprtype extype_ = exprtype::invalid;