interactive_t now takes an "X" for expressions
This commit is contained in:
parent
8acdb85a91
commit
713f308d0f
2 changed files with 17 additions and 0 deletions
|
|
@ -122,6 +122,10 @@ void interactive_t::verify_arguments() const
|
||||||
label = _("a scope");
|
label = _("a scope");
|
||||||
wrong_arg = ! next_arg->is_scope();
|
wrong_arg = ! next_arg->is_scope();
|
||||||
break;
|
break;
|
||||||
|
case 'X':
|
||||||
|
label = _("an expression");
|
||||||
|
wrong_arg = ! next_arg->is_expr();
|
||||||
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
label = _("a sequence");
|
label = _("a sequence");
|
||||||
wrong_arg = false;
|
wrong_arg = false;
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,19 @@ inline const value_t::sequence_t&
|
||||||
interactive_t::get<const value_t::sequence_t&>(std::size_t index) {
|
interactive_t::get<const value_t::sequence_t&>(std::size_t index) {
|
||||||
return value_at(index).as_sequence();
|
return value_at(index).as_sequence();
|
||||||
}
|
}
|
||||||
|
template <>
|
||||||
|
inline scope_t *
|
||||||
|
interactive_t::get<scope_t *>(std::size_t index) {
|
||||||
|
return value_at(index).as_scope();
|
||||||
|
}
|
||||||
|
template <>
|
||||||
|
inline expr_t& interactive_t::get<expr_t&>(std::size_t index) {
|
||||||
|
return value_at(index).as_expr_lval();
|
||||||
|
}
|
||||||
|
template <>
|
||||||
|
inline const expr_t& interactive_t::get<const expr_t&>(std::size_t index) {
|
||||||
|
return value_at(index).as_expr();
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class in_context_t : public interactive_t
|
class in_context_t : public interactive_t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue