summaryrefslogtreecommitdiff
path: root/src/parser.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/parser.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/parser.cc')
-rw-r--r--src/parser.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.cc b/src/parser.cc
index eeff59f0..a5fe9097 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -226,6 +226,9 @@ expr_t::parser_t::parse_logic_expr(std::istream& in,
bool negate = false;
switch (tok.kind) {
+ case token_t::DEFINE:
+ kind = op_t::O_DEFINE;
+ break;
case token_t::EQUAL:
if (tflags.has_flags(PARSE_NO_ASSIGN))
tok.rewind(in);