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

feat: finish high-level Solidity parser #119

Merged
merged 2 commits into from
Jun 20, 2023
Merged

feat: finish high-level Solidity parser #119

merged 2 commits into from
Jun 20, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Jun 17, 2023

Motivation

Finish parser

Solution

Parse (but not expand in sol!):

  • enums
  • constructor, fallback, receive, modifiers as functions
  • pragmas
  • imports
  • using
  • remaining types
    • functions
    • mappings

Add tests for flattened sources. Some of these need patches because they have to be valid Rust tokens, which means:

  • no single quote strings
  • no unknown string prefixes (hex, unicode)
  • no invalid escapes (Solidity \uXXXX vs Rust \u{XXXX})
  • (i assume) no invalid nested block comments (/* ... /*/ <-- parses the last 3 chars /*/ as the start of a nested block comment instead of the end of the first one)

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@DaniPopes DaniPopes merged commit 5f9bc6b into main Jun 20, 2023
@DaniPopes DaniPopes deleted the dani/full-sol branch June 20, 2023 05:23
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.

2 participants