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

Re-write type expression parser #398

Merged
merged 9 commits into from
Mar 13, 2024

Conversation

andreibancioiu
Copy link
Contributor

@andreibancioiu andreibancioiu commented Mar 12, 2024

Some type expressions couldn't be parsed before. E.g.

  • variadic<multi<BigUint,BigUint,u64,BigUint>>
  • multi<u8, utf-8 string, u8, utf-8 string, u8, utf-8 string>

Changes:

  • Added TypeFormula and TypeFormulaParser under a new package: abi. The classes in this package will be kept "under the radar" (not listed in the default exports) for some time. In the future, e.g. v14, they will replace the legacy Type and TypeExpressionParser.
  • Adjusted existing TypeExpressionParser: removed tricky JSON-based parsing; using the new typeFormulaParser as a "backend" for parsing type expressions.
  • Removed dependency json-duplicate-key-handle.

@andreibancioiu andreibancioiu self-assigned this Mar 12, 2024
@andreibancioiu andreibancioiu marked this pull request as ready for review March 12, 2024 12:26
Copy link
Contributor

@danielailie danielailie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@andreibancioiu andreibancioiu merged commit a87efbe into feat/next Mar 13, 2024
1 check passed
@andreibancioiu andreibancioiu deleted the better-type-expression-parser branch March 13, 2024 12:41
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

Successfully merging this pull request may close these issues.

3 participants