xo-parser: refactor: drop unused expractiontype::pop

This commit is contained in:
Roland Conybeare 2024-08-01 12:48:01 +10:00
commit 942de7335c
2 changed files with 9 additions and 4 deletions

View file

@ -115,7 +115,7 @@ namespace xo {
keep,
emit,
pop,
//pop,
n_expractiontype
};
@ -141,8 +141,9 @@ namespace xo {
static expraction keep();
static expraction emit(const exprir & ir);
//static expraction pop(const exprir & ir);
#ifdef OBSOLETE
static expraction pop();
#endif
expractiontype action_type() const { return action_type_; }
const exprir & expr_ir() const { return expr_ir_; }

View file

@ -89,8 +89,8 @@ namespace xo {
return "keep";
case expractiontype::emit:
return "emit";
case expractiontype::pop:
return "pop";
//case expractiontype::pop:
//return "pop";
case expractiontype::n_expractiontype:
break;
}
@ -118,11 +118,13 @@ namespace xo {
}
#endif
#ifdef OBSOLETE
expraction
expraction::pop() {
return expraction(expractiontype::pop,
exprir());
}
#endif
void
expraction::print(std::ostream & os) const {
@ -716,6 +718,7 @@ namespace xo {
case expractiontype::emit:
return action.expr_ir().expr();
#ifdef OBSOLETE
case expractiontype::pop:
xs_stack_.pop_exprstate();
@ -729,6 +732,7 @@ namespace xo {
.on_exprir(action.expr_ir(),
&xs_stack_));
break;
#endif
case expractiontype::invalid:
case expractiontype::n_expractiontype: