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

Introducing Abstract Syntax Tree Enum parsing support #18

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Conversation

0x19
Copy link
Contributor

@0x19 0x19 commented Jul 3, 2023

This pull request introduces support for enums in the ast package. Enums provide a way to define a set of named values in Solidity contracts.

New Features and Enhancements

  • Added EnumNode struct to represent enum definitions in the AST.
  • Added EnumMemberNode struct to represent individual enum members in the AST.
  • Implemented the Children method for EnumNode to return the enum members as child nodes.
  • Added unit tests for the EnumNode struct to ensure correct functionality and JSON marshalling.

@0x19 0x19 added enhancement New feature or request abi Application Binary Interface labels Jul 3, 2023
@0x19 0x19 self-assigned this Jul 3, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5448330585

  • 18 of 23 (78.26%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 76.673%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ast/contract.go 2 4 50.0%
ast/enum.go 6 9 66.67%
Totals Coverage Status
Change from base Build 5448187494: 0.01%
Covered Lines: 871
Relevant Lines: 1136

💛 - Coveralls

@0x19 0x19 merged commit 84e37c0 into main Jul 3, 2023
@0x19 0x19 deleted the ast-enum branch July 3, 2023 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi Application Binary Interface enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants