-
Notifications
You must be signed in to change notification settings - Fork 245
Improve parser #1237
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
Improve parser #1237
Conversation
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
…edger-solang#1222) * remove conflicting contract names Signed-off-by: salaheldinsoliman <[email protected]> Co-authored-by: Sean Young <[email protected]> Signed-off-by: DaniPopes <[email protected]>
…solang#1226) Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
…ng#1235) Signed-off-by: DaniPopes <[email protected]>
…lang#1230) Signed-off-by: Sean Young <[email protected]>
2c76808
to
96d3a02
Compare
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
The new files need:
on the first line, else CI will fail. Also note the clippy errors. |
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of good stuff in this - very large - pull request, it is great, thank you very much!
So I only have one comment, please us let know what you think. Thanks for some quality code changes. 🙏
Signed-off-by: DaniPopes <[email protected]>
Signed-off-by: DaniPopes <[email protected]>
@DaniPopes thank you very much, great stuff! 🙏 |
This PR does 3 main things to the
solang-parser
crate:fmt
: implementsstd::fmt::Display
for all parse tree typesloc
, expanding on theCodeLocation
traits:Vec
,Option
etcloc
method toloc_opt
onOptionalCodeLocation
to avoid name collisionord
: implementsstd::cmp::{Ord, PartialOrd}
impl
blocks inpt
The massive diff in the lexer tests is just whitespace and renaming the fully qualified
collect::<Vec<...>>
to justVec<_>
Some of these changes have been upstreamed from foundry-rs/foundry's
forge-doc
andforge-fmt
.BREAKING CHANGES:
pt::OptionalCodeLocation::loc
renamed toloc_opt
pt::Level::to_string
renamed toas_str
lexer::Spanned<Token, Loc, Error>
split intoSpanned<'a>
andResult<'a, T = Spanned<'a>, E = LexicalError>
pt::UsingList
'sError
variant changed from tuple to unit (no more()
at the end)