From 2d5ad7dee89ebe9c014270882e44d3a7a8a626fd Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Feb 2009 04:30:05 -0400 Subject: Added support for value expression definitions. Example: ] expr f(x) := x + 100 ] expr f(100) 200 --- src/scope.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/scope.cc') 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 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 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"); } } -- cgit v1.2.3