|
* 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
|