summaryrefslogtreecommitdiff
path: root/src/op.cc
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup whitespaceJohn Wiegley2011-08-181-1/+1
|
* Changed an assert into a proper exceptionJohn Wiegley2011-07-171-3/+1
|
* O_DEFINE operator should always return NULL_VALUEJohn Wiegley2011-07-171-0/+5
|
* Added some debug codeJohn Wiegley2011-02-101-0/+24
|
* Added initial support for lambda functionsJohn Wiegley2010-09-061-11/+21
|
* Minor simplifications to valexpr parserJohn Wiegley2010-09-051-34/+11
| | | | | The most significant change is the way CONS sequences are parsed, and that now instead of =/:=, the operators are ==/=.
* Generalized the semantics of FOO.BAR in valexprsJohn Wiegley2010-06-241-17/+7
| | | | | | | | | | | | | Previously, FOO was evaluated to return a scope, and BAR was an identifier looked up in that scope. However, this prevented scope-local functions from being called (since that is a CALL, not a plain IDENT). Now the meaning of the "." operator is that it evaluates the left operand in a scope type context, pushes that scope as the current object context, and then evaluates BAR in that context. Thus the bare word "amount" in an account context calls the same function that "account.amount" would if evaluated in a posting context.
* Fixed how valexpr function defs and calls workJohn Wiegley2010-06-241-15/+32
|
* Changes for building with Visual Studio 2008John Wiegley2010-06-151-1/+1
|
* Report error context in expressions more preciselyJohn Wiegley2010-06-131-3/+3
|
* Completely reworked argument passing in expressionsJohn Wiegley2010-06-131-36/+16
|
* If a type context exists, confirm the result matchesJohn Wiegley2010-06-131-0/+15
|
* Expression evaluations now have a "type context"John Wiegley2010-06-131-6/+9
| | | | | | | | | Thus, an expression can know if the context in which it's being evaluated requires a string, and if so, determine it's output accordingly. For example: account ; returns the full name of the posting's account account.total ; here the context is SCOPE, so account is an obj
* Untabified all source filesJohn Wiegley2010-06-111-109/+109
|
* Allow opt -NDEBUG build to complete without warningsJohn Wiegley2010-06-041-0/+2
|
* Added O_EXPAND operator, to handle macrosJohn Wiegley2010-05-081-3/+49
|
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Many improvements to Ledger's Python bindingsJohn Wiegley2009-11-191-1/+1
|
* Fixes to the value expression parser and evaluatorJohn Wiegley2009-11-101-45/+46
|
* Segregated symbols into 5 separate namespacesJohn Wiegley2009-11-041-6/+8
| | | | | | | | | | | | | | | | | | | | | The different namespaces are: Function Value expression functions, which receive a "context" Option Command-line options Precommand Commands which are invoked before reading the journal Command Commands which are invoked after reading the journal Directive Directives that occur at column 0 in a data file This greatly eases the ability for Python uses to add intercept hooks to change how the basic Ledger module functions. An example of what should be possible soon: import ledger def my_foo_handler(value): print "--foo received:", value ledger.add_handler(ledger.Option, "foo=", my_foo_handler)
* Change the value_t::POINTER type to value_t::SCOPEJohn Wiegley2009-10-301-3/+3
| | | | | scope_t pointers are the only kind that are ever stored in value objects, so there was no need to make it generic and use boost::any.
* Output pointer values correctly for 64-bit systemsJohn Wiegley2009-10-271-1/+1
|
* Improved debug output of "--debug expr.calc"John Wiegley2009-10-251-38/+61
|
* Split commodity.h/cc into three filesJohn Wiegley2009-06-241-0/+1
| | | | | | commodity.h - code for commodity_t annotate.h - commodity annotations pool.h - commodity pool management
* Restored --percent option, added baseline testJohn Wiegley2009-06-211-4/+9
|
* Enabled use of pre-compiled headers by defaultJohn Wiegley2009-03-101-0/+2
|
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-0/+1
|
* Added ; as a sequencing operator in valexprsJohn Wiegley2009-03-031-0/+46
|
* Fixed parsing of '(1, 2, (3, 4))'John Wiegley2009-03-031-1/+0
|
* Fixed the printing of O_CONS nodesJohn Wiegley2009-02-281-14/+25
|
* Corrected output of O_CALL nodesJohn Wiegley2009-02-271-3/+5
|
* Marked all strings needing internationalizationJohn Wiegley2009-02-251-8/+8
| | | | | | | | | | | | | | | | These strings are now collected automagically in the file po/ledger.pot. If you'd like to produce a translation, just run this command after building Ledger: msginit -l LOCALE -o LANG.po -i po/ledger.pot Where LOCALE is a string like de or en_GB, and LANG is a short descriptive word for your language. Then send me this .po file so I can commit it to the Ledger sources (alternatively, you could maintain the file in a fork on GitHub), and setup the build script to format and install your new message catalog during a "make install".
* Renamed O_COMMA to O_CONS, and changed semanticsJohn Wiegley2009-02-231-26/+47
| | | | | | In the old scheme, nested values would simply flatten and concatenate, so that '((1, 2), 3) = (1, 2, 3)'. Now sublists are preserved, so that sequences may be passed as arguments to functions.
* Restored the --budget optionJohn Wiegley2009-02-201-1/+1
|
* Parse '/' in an operator context as "div"John Wiegley2009-02-151-1/+1
|
* Changed debug category op.calc to expr.calcJohn Wiegley2009-02-151-2/+2
|
* Removed an excessive error check.John Wiegley2009-02-121-3/+0
|
* Revert "If a valexpr identifier is unknown at calc time, re-compile at that ↵John Wiegley2009-02-091-5/+2
| | | | | | point." This reverts commit 4a463aca3bece8f2beb68b0fc4d347a713ff07a6.
* If a valexpr identifier is unknown at calc time, re-compile at that point.John Wiegley2009-02-091-2/+5
|
* Perhaps expr_t objects to remember their scope "context".John Wiegley2009-02-081-31/+31
|
* Added support for value expression definitions.John Wiegley2009-02-081-12/+78
| | | | | | | | Example: ] expr f(x) := x + 100 ] expr f(100) 200
* Better semantics for the ?: ternary operator.John Wiegley2009-02-081-0/+33
|
* Added debug code to the op_t calculation routine.John Wiegley2009-02-071-30/+58
|
* Removed handling of the unnused INDEX operator.John Wiegley2009-02-071-18/+0
|
* Implemented expr_context.John Wiegley2009-02-071-1/+2
|
* Refer to empty expression operators as simply NULL.John Wiegley2009-02-071-2/+1
|
* Correction to debug output.John Wiegley2009-02-071-1/+1
|
* When recompiled an expr_t, forget old definitions.John Wiegley2009-02-051-1/+5
|
* Largely removed all of Ledger's use of global variables, for the REPL's sake.John Wiegley2009-02-041-41/+26
|
* Fixed the processing of O_NOT operations.John Wiegley2009-02-031-4/+6
|