Skip to content

lark.exceptions.UnexpectedToken when using total cost syntax with a label #27

Open

Description

@jonnyniv

Reproduced with the following:

plugin "beancount.plugins.auto"

2000-01-01 * "test"
  Assets:Test 4 TEST {{100 USD, "test"}}
  Equity:Test

Raises

lark.exceptions.UnexpectedToken: Unexpected token Token('COMMA', ',') at line 4, column 31.
Expected one of:
        * __ANON_1

Activity

  1. jonnyniv commented on Oct 15, 2024

    @jonnyniv
    Author

    Hi again, is it more appropriate to file this against https://github.com/LaunchPlatform/beancount-parser

  2. fangpenlin commented on Oct 15, 2024

    @fangpenlin
    Contributor

    @jonnyniv yeah, looks like the total amount style cost syntax with more than just amount is not currently supported by beancount-parser. The problem is this part is not very well documented in the official beancount documents and I guess that's why I missed it in the first place. Today I have other works to do, but I think I can find a time to look into it this week.

  3. jonnyniv commented on Oct 15, 2024

    @jonnyniv
    Author

    Thanks, agreed it's not well documented, the ingest framework can't even generate {{}} syntax in v2 (haven't looked at beangulp) 😄 Are you happy to leave the issue as-is or would you prefer I move it over

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions