summaryrefslogtreecommitdiff
path: root/src/query.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix Query Parser for Automated Transactions (#1)Igbanam Ogbuluijah2024-06-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add failing test for use case TBH I don't know what I'm doing here, but this seems to fail for the right reasons enough to reflect the parser bug here. * Append to the ident on a closing brace ')' When parsing the automated rule, a scanner reads the line left-to-right char-by-char. The default behaviour is to append the char under the cursor to some `ident` string. When the cursor is on a ')', it skips the default handling and switches into some special handling: it tries to test the string it's reading if it's one of the keywords it knows, to select which type of token just got scanned. If what was scanned is not a known token, it defaults to `token_t::TERM` and returns a new token with the currently accumulated `ident` as a `token_t::TERM`. Issue is, since it skipped the appending to do some custom handling, the `token_t::TERM` will always be without its closing brace. The scanner needs to append the character under the cursor if it's falling through to default processing. * fix test case - ensure proper spacing for the posting to have an amount - ensure the posting balances against an account - the meaning of the number after `->` is the exit code * undo wrong approach * consume_next if unbalanced_braces * how this can be extended
* Use #pragma onceAlexis Hildebrandt2023-04-101-4/+1
|
* Update copyright yearAlexis Hildebrandt2023-02-021-1/+1
| | | | [skip ci]
* Update copyright statement for 2022Alexis Hildebrandt2022-07-021-1/+1
|
* Change header guard names to use `INCLUDED_` prefixPhil Newton2022-04-061-3/+3
| | | | Fixes #2049
* Use correct int return type for stream input operationskanreki2021-12-081-2/+1
| | | | | | | | This makes it safe to compare results to -1 to indicate EOF, regardless of whether char is considered signed or unsigned; and so eliminates compiler warnings on platforms such as ARM. Fixes bug #2058.
* Revert "Correction to the way parens are parsed in query expressions"John Wiegley2020-05-071-1/+0
| | | | This reverts commit 49b07a1c19489547b859d61fbc5c240aff224dda.
* Correction to the way parens are parsed in query expressionsJohn Wiegley2019-09-171-0/+1
|
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2018-01-271-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2017-01-051-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2016Alexis Hildebrandt2016-01-021-1/+1
| | | | [ci skip]
* Bump copyright notice to 2015Alexis Hildebrandt2014-12-271-1/+1
| | | | | | The following script makes it a no-brainer: % NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \ | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
* Bump copyright information to 2014Alexis Hildebrandt2014-02-021-1/+1
|
* Bump copyright information to 2013John Wiegley2013-02-181-1/+1
|
* Always call TRACE_CTOR at the end of constructorsJohn Wiegley2012-03-201-3/+5
|
* Added #if's for building optimized with ClangJohn Wiegley2012-03-071-0/+2
|
* Corrected several compile and link problemsJohn Wiegley2012-03-061-0/+1
|
* Removed unneeded codeJohn Wiegley2012-03-021-2/+0
|
* Increased file copyrights to 2012John Wiegley2012-02-291-1/+1
|
* Removed unneeded default casesJohn Wiegley2012-02-171-1/+0
|
* Fixes for variable shadowing (23/28)John Wiegley2012-02-171-2/+2
|
* More report query fixesJohn Wiegley2011-11-101-2/+2
|
* Corrections to the query language parserJohn Wiegley2011-11-101-1/+1
| | | | Fixes #552
* "only" now a report query modifier for --onlyJohn Wiegley2010-06-241-0/+4
| | | | This fits with "show" and "bold", etc.
* Added report query modifiers: for, since, untilJohn Wiegley2010-06-221-7/+17
| | | | | | | | | Now instead of ledger reg expense -p "this month", you can say: ledger reg expense for this month And as a shorthand for "for until this month", you can just say "until this month" or "since this month".
* Added new "bold" modifier to query expressionsJohn Wiegley2010-06-221-35/+59
| | | | | | | | | | | | | | For example: ledger bal assets bold checking Or you can use expressions: ledger bal assets bold '=total > 1000' This last is identical to saying: ledger bal -l 'account =~ /assets/' --bold-if='total > 1000'
* Changes for building with Visual Studio 2008John Wiegley2010-06-151-0/+3
|
* Untabified all source filesJohn Wiegley2010-06-111-90/+90
|
* Further improved parsing of query expressionsJohn Wiegley2010-06-011-11/+16
| | | | Fixes #210 / D4C2DD6F-8967-4FFC-BBBC-A941F9C53475
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Added several more missing virtual keywordsJohn Wiegley2009-11-211-1/+1
|
* Some reformatting in query.hJohn Wiegley2009-11-171-35/+37
|
* Corrected parsing of the 'expr' report query termJohn Wiegley2009-11-151-1/+5
|
* Stylistic change: assert(0) -> assert(false)John Wiegley2009-11-131-2/+2
|
* query_t objects are now convertible to predicate_tJohn Wiegley2009-11-101-2/+10
|
* Redesigned the expr_t, predicate_t, query_t classesJohn Wiegley2009-11-091-0/+291