diff --git a/include/xo/parser/parser.hpp b/include/xo/parser/parser.hpp index bbb0a584..4fd65ec5 100644 --- a/include/xo/parser/parser.hpp +++ b/include/xo/parser/parser.hpp @@ -134,18 +134,23 @@ namespace xo { class expraction { public: expraction() = default; - explicit expraction(expractiontype action_type, - const exprir & expr_ir) - : action_type_{action_type}, expr_ir_{expr_ir} + explicit expraction(expractiontype action_type +#ifdef OBSOLETE + const exprir & expr_ir +#endif + ) + : action_type_{action_type} +#ifdef OBSOLETE + , expr_ir_{expr_ir} +#endif {} static expraction keep(); -#ifdef OBSOLETE - static expraction emit(const exprir & ir); -#endif expractiontype action_type() const { return action_type_; } +#ifdef OBSOLETE const exprir & expr_ir() const { return expr_ir_; } +#endif void print(std::ostream & os) const; @@ -158,10 +163,12 @@ namespace xo { * pop: drop exprstate, report exprir to parent **/ expractiontype action_type_ = expractiontype::invalid; +#ifdef OBSOLETE /** * intermediate representation (pass to enclosing stack state) **/ exprir expr_ir_; +#endif }; inline std::ostream & diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 3a0eaaf9..ad87f680 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -96,23 +96,13 @@ namespace xo { expraction expraction::keep() { - return expraction(expractiontype::keep, - exprir()); + return expraction(expractiontype::keep); } -#ifdef OBSOLETE - expraction - expraction::emit(const exprir & ir) { - return expraction(expractiontype::emit, - ir); - } -#endif - void expraction::print(std::ostream & os) const { os << ""; }