summaryrefslogtreecommitdiff
path: root/src/scope.h
Commit message (Collapse)AuthorAgeFilesLines
* Converted the Ledger build system to use CMakeJohn Wiegley2012-05-201-8/+8
|
* Allow serialization to be enabled againJohn Wiegley2012-03-291-1/+1
|
* Always call TRACE_CTOR at the end of constructorsJohn Wiegley2012-03-201-1/+1
|
* Added --verify-memory and missing TRACE_[CD]TOR callsJohn Wiegley2012-03-181-1/+13
|
* Made join_args() a global functionJohn Wiegley2012-03-131-0/+15
|
* Fixed a bug that was breaking optimized buildsJohn Wiegley2012-03-111-5/+0
|
* Many options now have additive effectJohn Wiegley2012-03-071-1/+4
| | | | | | | | | For example, -A and -V used to override each other, whereas now: -A report the average amount -V report all amounts at current value -AV report the current value of the average -VA report the average of all current values
* Added a DEBUG statementJohn Wiegley2012-03-071-0/+2
|
* Removed unnecessary method definitionJohn Wiegley2012-03-071-4/+0
|
* Added an empty_scope_t utility classJohn Wiegley2012-03-071-0/+11
|
* Whitespace fixesJohn Wiegley2012-03-071-5/+3
|
* Added symbol_t::operator==()John Wiegley2012-03-061-0/+3
|
* Whitespace fixJohn Wiegley2012-03-061-2/+1
|
* Fixed invocation of lambda expressionsJohn Wiegley2012-03-051-5/+19
| | | | | | | | | foo = x, y, z -> print(x, y, z) foo(1, 2, 3) However, this still does not work: (x, y, z -> print(x, y, z))(1, 2, 3)
* Re-enabled some necessary codeJohn Wiegley2012-03-011-2/+0
|
* Refactored the notion of "the current parsing context"John Wiegley2012-03-011-1/+1
|
* Increased file copyrights to 2012John Wiegley2012-02-291-1/+1
|
* Comment out unneeded codeJohn Wiegley2012-02-271-0/+2
|
* The new SCOPE mechanism is workingJohn Wiegley2012-02-211-0/+2
|
* Fixes for variable shadowing (24/28)John Wiegley2012-02-171-2/+2
|
* Cleanup whitespaceJohn Wiegley2011-08-181-1/+1
|
* Added some debug codeJohn Wiegley2011-02-101-0/+6
|
* Scopes can now provide a description of themselvesJohn Wiegley2010-06-241-0/+28
| | | | | | This isn't being used yet, but it likely will to improve the information presented to users if their value expressions fail to compile or evaluate.
* Value scopes now take a parent scope for chainingJohn Wiegley2010-06-241-2/+3
|
* Fixed bug that had broken any() and all()John Wiegley2010-06-181-1/+1
|
* Report error context in expressions more preciselyJohn Wiegley2010-06-131-5/+11
|
* Fixes to scope.h for the sake of Boost.SerializationJohn Wiegley2010-06-131-2/+21
|
* Completely reworked argument passing in expressionsJohn Wiegley2010-06-131-66/+267
|
* Expression evaluations now have a "type context"John Wiegley2010-06-131-3/+28
| | | | | | | | | 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-12/+12
|
* Added value_scope_t, for wrapping a value in a scopeJohn Wiegley2010-05-301-0/+24
| | | | | The value expression "value" may be used to extract the wrapped value. This is currently only used by the upcoming --group-title-format option.
* Added more iterator methods to call_scope_tJohn Wiegley2010-05-081-0/+11
|
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Very minor but easy optimization for symbol_scope_tJohn Wiegley2009-11-241-1/+1
| | | | | | | Lots of symbol_scope_t throwaway objects get created during value expression calculation, and 99% of them are never used. Therefore, the std::map which each contains is now within an optional<> wrapper, so that no constructor happens unless one is actually used.
* Redesigned the format_t classJohn Wiegley2009-11-091-1/+2
|
* Removed a bunch of empty commentsJohn Wiegley2009-11-081-39/+0
|
* Moved journal reading code into journal_tJohn Wiegley2009-11-051-0/+2
|
* Segregated symbols into 5 separate namespacesJohn Wiegley2009-11-041-15/+78
| | | | | | | | | | | | | | | | | | | | | 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)
* Added value_t::push_frontJohn Wiegley2009-11-041-0/+3
|
* Whitespace fixJohn Wiegley2009-11-041-5/+5
|
* Added missing TRACE_CTOR callsJohn Wiegley2009-11-011-1/+3
|
* Added serialization methods for most typeJohn Wiegley2009-10-301-2/+64
| | | | | This allows journal_t objects to be completed serialized to disk and deserialized.
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-1/+0
|
* Marked all strings needing internationalizationJohn Wiegley2009-02-251-1/+1
| | | | | | | | | | | | | | | | 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".
* Removed some dead codeJohn Wiegley2009-02-241-38/+0
|
* Create a new interactive_t helper classJohn Wiegley2009-02-211-96/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this class is much like Emacs' (interactive) form: it allows a value expression function to declare exactly how many arguments, and of what type, it intends to receive. It then offers type-safe access to theese arguments in a consistent manner. An example value expression function definition in C++: value_t fn_foo(call_scope_t& scope) { // We expect a string, an integer, and an optional date interactive_t args(scope, "sl&d"); std::cout << "String = " << args.get<string>(0) << "Integer = " << args.get<long>(1) << std::endl; if (args.has(2)) // was a date provided? std::cout << "Date = " << args.get<date_t>(2) << std::endl; return NULL_VALUE; } There is also an in_context_t<T> template, which finds the context type T in the current scope hierarchy. The in_context_t then also acts as a smart pointer to reference this context object, in addition to serving the same duty as interactive_t. This combination of intent is solely for the sake of brevity. value_t fn_bar(call_scope_t& scope) { in_context_t<account_t> env(scope, "sl&d"); std::cout << "Account name = " << env->fullname() << "String arg = " << env.get<string>(0) << std::endl; return NULL_VALUE; } As you can see here, 'env' acts as a smart pointer to the required context, and an object to extract the typed arguments.
* Added --flat option, to flatten the balance reportJohn Wiegley2009-02-171-0/+9
|
* Fixed several unused value and param warningsJohn Wiegley2009-02-161-1/+1
|
* Moved around some functions for clarityJohn Wiegley2009-02-161-0/+2
|
* Wired up the "entry" command from 2.x, though it still needs to be ported.John Wiegley2009-02-101-0/+7
|