Value scopes now take a parent scope for chaining
This commit is contained in:
parent
129b2de901
commit
bc51cd4651
2 changed files with 9 additions and 16 deletions
|
|
@ -90,14 +90,10 @@ void format_posts::operator()(post_t& post)
|
||||||
else
|
else
|
||||||
out << '\n';
|
out << '\n';
|
||||||
|
|
||||||
value_scope_t val_scope(string_value(report_title));
|
value_scope_t val_scope(bound_scope, string_value(report_title));
|
||||||
bind_scope_t inner_scope(bound_scope, val_scope);
|
format_t group_title_format(report.HANDLER(group_title_format_).str());
|
||||||
|
|
||||||
format_t group_title_format;
|
out << group_title_format(val_scope);
|
||||||
group_title_format
|
|
||||||
.parse_format(report.HANDLER(group_title_format_).str());
|
|
||||||
|
|
||||||
out << group_title_format(inner_scope);
|
|
||||||
|
|
||||||
report_title = "";
|
report_title = "";
|
||||||
}
|
}
|
||||||
|
|
@ -176,14 +172,10 @@ std::size_t format_accounts::post_account(account_t& account, const bool flat)
|
||||||
else
|
else
|
||||||
out << '\n';
|
out << '\n';
|
||||||
|
|
||||||
value_scope_t val_scope(string_value(report_title));
|
value_scope_t val_scope(bound_scope, string_value(report_title));
|
||||||
bind_scope_t inner_scope(bound_scope, val_scope);
|
format_t group_title_format(report.HANDLER(group_title_format_).str());
|
||||||
|
|
||||||
format_t group_title_format;
|
out << group_title_format(val_scope);
|
||||||
group_title_format
|
|
||||||
.parse_format(report.HANDLER(group_title_format_).str());
|
|
||||||
|
|
||||||
out << group_title_format(inner_scope);
|
|
||||||
|
|
||||||
report_title = "";
|
report_title = "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -605,7 +605,7 @@ call_scope_t::get<expr_t::ptr_op_t>(std::size_t index, bool) {
|
||||||
return args[index].as_any<expr_t::ptr_op_t>();
|
return args[index].as_any<expr_t::ptr_op_t>();
|
||||||
}
|
}
|
||||||
|
|
||||||
class value_scope_t : public scope_t
|
class value_scope_t : public child_scope_t
|
||||||
{
|
{
|
||||||
value_t value;
|
value_t value;
|
||||||
|
|
||||||
|
|
@ -614,7 +614,8 @@ class value_scope_t : public scope_t
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
value_scope_t(const value_t& _value) : value(_value) {}
|
value_scope_t(scope_t& _parent, const value_t& _value)
|
||||||
|
: child_scope_t(_parent), value(_value) {}
|
||||||
|
|
||||||
virtual expr_t::ptr_op_t lookup(const symbol_t::kind_t kind,
|
virtual expr_t::ptr_op_t lookup(const symbol_t::kind_t kind,
|
||||||
const string& name)
|
const string& name)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue