hyperledger-solang / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.27k stars 216 forks source link

Parse pragma solidity version numbers #1593

Closed seanyoung closed 1 year ago

seanyoung commented 1 year ago

Many Solidity features depend on the version of the compiler. So, parse the version pragma and in another PR we will use this information.

This PR adds pragmas to the ast and we test it with a graphviz dot file.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 70 lines in your changes are missing coverage. Please review.

Comparison is base (221ecd1) 87.65% compared to head (38ec432) 87.90%. Report is 1 commits behind head on main.

Files Patch % Lines
solang-parser/src/helpers/fmt.rs 20.83% 38 Missing :warning:
src/sema/dotgraphviz.rs 82.79% 16 Missing :warning:
solang-parser/src/pt.rs 0.00% 6 Missing :warning:
src/bin/doc/mod.rs 0.00% 3 Missing :warning:
src/sema/ast.rs 88.88% 3 Missing :warning:
src/codegen/cfg.rs 0.00% 1 Missing :warning:
src/sema/expression/function_call.rs 98.33% 1 Missing :warning:
src/sema/expression/member_access.rs 90.00% 1 Missing :warning:
src/sema/mod.rs 98.93% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1593 +/- ## ========================================== + Coverage 87.65% 87.90% +0.24% ========================================== Files 133 133 Lines 64300 64620 +320 ========================================== + Hits 56363 56803 +440 + Misses 7937 7817 -120 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

seanyoung commented 1 year ago

@LucasSte @xermicus let me know if you're interested in reviewing this, else I will merge it

LucasSte commented 1 year ago

@LucasSte @xermicus let me know if you're interested in reviewing this, else I will merge it

I'm reviewing it.