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

Formatter #371

Merged
merged 132 commits into from Mar 29, 2023
Merged

Formatter #371

merged 132 commits into from Mar 29, 2023

Commits on Mar 9, 2023

  1. Use FxHashSet more

    hyperfine --warmup 1 "cargo run --release --manifest-path=compiler/cli/Cargo.toml -- run packages/examples/fibonacci.candy"
    
    Before:
      Time (mean ± σ):      1.180 s ±  0.045 s    [User: 1.115 s, System: 0.067 s]
      Range (min … max):    1.092 s …  1.241 s    10 runs
    
    After:
      Time (mean ± σ):      1.096 s ±  0.059 s    [User: 1.037 s, System: 0.061 s]
      Range (min … max):    0.981 s …  1.201 s    10 runs
    JonasWanke committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    04405bf View commit details
    Browse the repository at this point in the history
  2. Keep hints single-line

    JonasWanke committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    feaa5b5 View commit details
    Browse the repository at this point in the history
  3. Use extension_trait

    JonasWanke committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    478d256 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    708f83b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    67174f6 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. Configuration menu
    Copy the full SHA
    a33c2cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dbdeec2 View commit details
    Browse the repository at this point in the history
  3. Add cstKind::children()

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    ac20c4d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd46c91 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7c95f73 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9eecc97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2fb5cbd View commit details
    Browse the repository at this point in the history
  8. Format indentation

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    336c5cb View commit details
    Browse the repository at this point in the history
  9. Remove leading newlines

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    a4cfc2e View commit details
    Browse the repository at this point in the history
  10. Remove trailing newlines

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    cd1740d View commit details
    Browse the repository at this point in the history
  11. Add trailing newline

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    1d47f47 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9def5da View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    574eed1 View commit details
    Browse the repository at this point in the history
  14. Format calls with comments

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    1533560 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    79d72b4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2645fee View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    2de2c06 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    6a24e2f View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    50485c8 View commit details
    Browse the repository at this point in the history
  20. Format trailing comments

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    5a6c1a2 View commit details
    Browse the repository at this point in the history
  21. Format struct access

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    c3f44ba View commit details
    Browse the repository at this point in the history
  22. Add FormatterInfo

    JonasWanke committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    9163258 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2023

  1. Configuration menu
    Copy the full SHA
    ba20e60 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    182dca1 View commit details
    Browse the repository at this point in the history
  3. Add TrailingWhitespace

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    cf9e978 View commit details
    Browse the repository at this point in the history
  4. Format lists

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    1874e44 View commit details
    Browse the repository at this point in the history
  5. Format parenthesized

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    3e1d222 View commit details
    Browse the repository at this point in the history
  6. Add Indentation struct

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    b488166 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d0ce9af View commit details
    Browse the repository at this point in the history
  8. Fix import order

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    df20c66 View commit details
    Browse the repository at this point in the history
  9. Format assignment

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    84a1f4d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    663f608 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    15add09 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    50e1995 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b7d7385 View commit details
    Browse the repository at this point in the history
  14. Format structs

    JonasWanke committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    aae76de View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. Fix use grouping

    JonasWanke committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    6f0f4d4 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    09e4381 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ccb1ee3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ec8f45 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17f2336 View commit details
    Browse the repository at this point in the history
  5. Reduce cloning

    JonasWanke committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    7370d8e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9b683d7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5eeeaa1 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7de2831 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9e3a7c7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ac816f1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    41989b0 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9c011fd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    89382fb View commit details
    Browse the repository at this point in the history
  14. Remove LastLineWidthInfo

    JonasWanke committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    d3d67c3 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1326168 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. Fix comment handling after struct entry value

    Previously, `FormattedCst` tainted the width when there are comments, even when directly `split()`ing it. Now, we store the raw `child_width` and only compute `min_width` dynamically. This also handles the case where whitespace gets adopted later.
    JonasWanke committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    14ab178 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2a9b376 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae1a806 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3bcfc1e View commit details
    Browse the repository at this point in the history
  5. Add build_newline()

    JonasWanke committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    cbb6bff View commit details
    Browse the repository at this point in the history
  6. Fix indentation

    JonasWanke committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    c214ea4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dd29872 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9de8498 View commit details
    Browse the repository at this point in the history
  9. Format match

    JonasWanke committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    51b19da View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a73653c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7c19f25 View commit details
    Browse the repository at this point in the history
  12. Format binary bar

    JonasWanke committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    f5c6813 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    37aacb4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    17e76ee View commit details
    Browse the repository at this point in the history
  15. Format lambdas WIP

    JonasWanke committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    5cda5e5 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. Configuration menu
    Copy the full SHA
    bd01292 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    66e301d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1282307 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    533a610 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    126ed83 View commit details
    Browse the repository at this point in the history
  6. Add some documentation

    JonasWanke committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    5356e7c View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Configuration menu
    Copy the full SHA
    c72e937 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa10109 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    760e8d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ad41115 View commit details
    Browse the repository at this point in the history
  5. Fix lambda formatting

    JonasWanke committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    b2180fe View commit details
    Browse the repository at this point in the history
  6. Tidy up lambda formatting

    JonasWanke committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    356c843 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e3bd4b6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    28f1f4d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ad49a94 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    52bd760 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    205f51b View commit details
    Browse the repository at this point in the history
  12. Document previous_width

    JonasWanke committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    7942bec View commit details
    Browse the repository at this point in the history
  13. Add formatter README

    JonasWanke committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    53897ed View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    cb27880 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5d02d84 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d99a466 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    85cad5d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    c57f334 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Configuration menu
    Copy the full SHA
    4915995 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6eed785 View commit details
    Browse the repository at this point in the history
  3. Fix formatting

    JonasWanke committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    689c3b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f218356 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d45d3f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    36b8448 View commit details
    Browse the repository at this point in the history
  7. 1 Configuration menu
    Copy the full SHA
    db88af0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    074c16e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b61e4d4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4ca4797 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d3b6271 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1eab824 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c752b3d View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    2bcbbdc View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1029688 View commit details
    Browse the repository at this point in the history
  16. Support formatting

    JonasWanke committed Mar 21, 2023
    2 Configuration menu
    Copy the full SHA
    f538334 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Configuration menu
    Copy the full SHA
    b458d82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8370d52 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dcb0272 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fe60744 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    77d5602 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Add SinglelineWidth

    JonasWanke committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    8135c59 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2023

  1. Configuration menu
    Copy the full SHA
    4afeabb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59af047 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a404ef1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7593224 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6ac528a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3c017ae View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ac38f12 View commit details
    Browse the repository at this point in the history
  8. 1 Configuration menu
    Copy the full SHA
    73e5195 View commit details
    Browse the repository at this point in the history
  9. Remove todo

    JonasWanke committed Mar 27, 2023
    1 Configuration menu
    Copy the full SHA
    7dcca45 View commit details
    Browse the repository at this point in the history
  10. Fix typo

    Co-authored-by: Marcel Garus <marcel.garus@gmail.com>
    JonasWanke and MarcelGarus committed Mar 27, 2023
    1 Configuration menu
    Copy the full SHA
    a5ad59b View commit details
    Browse the repository at this point in the history
  11. Use str::repeat(…) i/o for loop with write!(…)

    Co-authored-by: Marcel Garus <marcel.garus@gmail.com>
    JonasWanke and MarcelGarus committed Mar 27, 2023
    1 Configuration menu
    Copy the full SHA
    f250796 View commit details
    Browse the repository at this point in the history
  12. 1 Configuration menu
    Copy the full SHA
    926a8c8 View commit details
    Browse the repository at this point in the history
  13. Format all Candy files

    JonasWanke committed Mar 27, 2023
    1 Configuration menu
    Copy the full SHA
    54ccb2e View commit details
    Browse the repository at this point in the history
  14. Remove superfluous clone

    JonasWanke committed Mar 27, 2023
    1 Configuration menu
    Copy the full SHA
    bd55af6 View commit details
    Browse the repository at this point in the history