summaryrefslogtreecommitdiff
path: root/src/scope.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-08 04:30:05 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-08 04:30:05 -0400
commit2d5ad7dee89ebe9c014270882e44d3a7a8a626fd (patch)
tree20a6d2c34d86dcc9f68201dc1028f9053834ba7b /src/scope.cc
parentf7f5ed3d0fe96854f048609433fc68a3fb6fcf34 (diff)
downloadfork-ledger-2d5ad7dee89ebe9c014270882e44d3a7a8a626fd.tar.gz
fork-ledger-2d5ad7dee89ebe9c014270882e44d3a7a8a626fd.tar.bz2
fork-ledger-2d5ad7dee89ebe9c014270882e44d3a7a8a626fd.zip
Added support for value expression definitions.
Example: ] expr f(x) := x + 100 ] expr f(100) 200
Diffstat (limited to 'src/scope.cc')
-rw-r--r--src/scope.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/scope.cc b/src/scope.cc
index 29a3e03a..f4b2dfab 100644
--- a/src/scope.cc
+++ b/src/scope.cc
@@ -35,7 +35,7 @@ namespace ledger {
void symbol_scope_t::define(const string& name, expr_t::ptr_op_t def)
{
- DEBUG("ledger.xpath.syms", "Defining '" << name << "' = " << def);
+ DEBUG("scope.symbols", "Defining '" << name << "' = " << def);
std::pair<symbol_map::iterator, bool> result
= symbols.insert(symbol_map::value_type(name, def));
@@ -47,8 +47,7 @@ void symbol_scope_t::define(const string& name, expr_t::ptr_op_t def)
std::pair<symbol_map::iterator, bool> result2
= symbols.insert(symbol_map::value_type(name, def));
if (! result2.second)
- throw_(compile_error,
- "Redefinition of '" << name << "' in same scope");
+ throw_(compile_error, "Redefinition of '" << name << "' in same scope");
}
}