Added the 'note' value expression identifier.

This commit is contained in:
John Wiegley 2008-09-17 21:08:54 -04:00
parent 5ec2b74f56
commit 24e64c202e

View file

@ -126,7 +126,7 @@ namespace {
}
value_t get_note(xact_t& xact) {
return string_value(xact.note ? *xact.note : ":NOTELESS:");
return string_value(xact.note ? *xact.note : empty_string);
}
value_t get_account(call_scope_t& scope)
@ -212,6 +212,11 @@ expr_t::ptr_op_t xact_t::lookup(const string& name)
}
break;
case 'n':
if (name == "note")
return WRAP_FUNCTOR(get_wrapper<&get_note>);
break;
case 'p':
if (name == "pending")
return WRAP_FUNCTOR(get_wrapper<&get_pending>);