Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jonnyniv opened this issue Oct 14, 2024 · 3 comments

Comments

@jonnyniv
Copy link

jonnyniv commented Oct 14, 2024

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
@jonnyniv
Copy link
Author

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

@fangpenlin
Copy link
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.

@jonnyniv
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants