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

braces #707

Merged
merged 1 commit into from
May 30, 2022
Merged

braces #707

merged 1 commit into from
May 30, 2022

Conversation

sbillig
Copy link
Collaborator

@sbillig sbillig commented May 12, 2022

Stage 1 of the pythonish -> rusty syntax transition.

  • braces instead of colons and indents
  • else if instead of elif
  • no more pass statement
struct Empty {}
contract Foo {
  pub fn bar() {
    if true {
      1 + 2
      3 + 4
    } else if false {
    } else {
  }
}

To-Do

  • OPTIONAL: Update Spec if applicable

  • Add entry to the release notes (may forgo for trivial changes)

  • Clean up commit history

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2022

Codecov Report

Merging #707 (141c9e4) into master (2885c99) will increase coverage by 0.25%.
The diff coverage is 81.10%.

@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
+ Coverage   81.95%   82.20%   +0.25%     
==========================================
  Files         125      125              
  Lines       10905    10876      -29     
==========================================
+ Hits         8937     8941       +4     
+ Misses       1968     1935      -33     
Impacted Files Coverage Δ
crates/abi/src/builder.rs 91.66% <ø> (-1.39%) ⬇️
crates/analyzer/src/traversal/functions.rs 95.94% <ø> (-0.03%) ⬇️
crates/mir/src/lower/function.rs 86.90% <ø> (+0.11%) ⬆️
crates/parser/src/grammar/contracts.rs 87.23% <ø> (+0.95%) ⬆️
crates/parser/src/grammar/expressions.rs 89.45% <ø> (+0.21%) ⬆️
crates/parser/src/grammar/functions.rs 90.77% <ø> (+1.50%) ⬆️
crates/parser/src/grammar/module.rs 86.92% <ø> (+2.47%) ⬆️
crates/parser/src/grammar/types.rs 89.66% <ø> (+0.06%) ⬆️
crates/parser/src/lexer.rs 86.66% <ø> (ø)
crates/parser/src/lexer/token.rs 16.47% <ø> (-1.51%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95e4a38...141c9e4. Read the comment docs.

@sbillig sbillig marked this pull request as ready for review May 19, 2022 00:48
@sbillig sbillig requested a review from cburgdorf May 19, 2022 00:48
Copy link
Collaborator

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

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

Looks great! Just left a few nitpicks.

crates/parser/src/grammar/module.rs Outdated Show resolved Hide resolved
crates/parser/tests/cases/print_ast.rs Outdated Show resolved Hide resolved
docs/src/spec/expressions/name.md Outdated Show resolved Hide resolved
docs/src/spec/lexical_structure/tokens.md Show resolved Hide resolved
docs/validate_doc_examples.py Outdated Show resolved Hide resolved
@@ -0,0 +1,28 @@
Braces! Fe has abandoned python-style significant whitespace in favor of the
trusty curly brace.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just making sure trusty is an intended word play :D

@sbillig sbillig force-pushed the braces branch 3 times, most recently from 9c03c73 to 141c9e4 Compare May 25, 2022 04:10
@sbillig
Copy link
Collaborator Author

sbillig commented May 25, 2022

I'll merge this after #676 lands.

@sbillig sbillig merged commit 43b58a8 into ethereum:master May 30, 2022
@mriise
Copy link

mriise commented May 31, 2022

<3 I am a big fan of curly bois

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.

4 participants