Commit Graph

276 Commits

Author SHA1 Message Date
Richard Feldman
36255b056b
Test expected == actual after verifying idempotence 2022-05-06 14:45:59 -04:00
Richard Feldman
a8991dc268
Trim inputs and expected in fmt tests 2022-05-06 14:37:23 -04:00
Richard Feldman
eb1d572b24
Test that modules reformat stably too 2022-05-06 14:37:23 -04:00
Richard Feldman
ad51624eb2
Write a better test for tui example 2022-05-06 14:37:23 -04:00
Richard Feldman
eb8e7d6a97
Verify stable formatting in fmt tests 2022-05-06 14:37:22 -04:00
Richard Feldman
c0f18f1c52
Move RemoveSpaces into fmt, for use in tests 2022-05-06 14:37:22 -04:00
Richard Feldman
7be5948476
Add formatter test 2022-05-06 14:37:22 -04:00
Richard Feldman
2c3731f7de
Drop an unnecessary lifetime annotation 2022-05-06 12:06:28 -04:00
Sean Hagstrom
4707528caa feature(formatter): allow single blank line around comments in lists, records, type annotations 2022-05-01 18:28:49 +01:00
Sean Hagstrom
e6621e5167 remove outdated test for inline comment formatting
I tested if the formatter was still inconsistent by locally changing the helloWorld example to have:
```
main =
    greeting = "Hello, World!\n" # This variable is for greeting

    greeting
```
And running the formatter multiple times with `cargo run -- formatter`.
At the moment the results are consistent and the inline comments remains inlined.
2022-04-30 14:37:53 +01:00
Sean Hagstrom
e36aad6310 fix(formatter): format and allow inline comments for defs 2022-04-30 14:34:33 +01:00
Richard Feldman
85e7969c2d
Replace references to "global tag" with "tag" 2022-04-25 17:04:34 -04:00
Ayaz Hafiz
1ed9cf551a
Remove private tags from Ast 2022-04-25 11:20:37 -04:00
Sean Hagstrom
1227f9f404 fix(formatter): fix potential panic when subtracting from usize 2022-04-24 19:58:12 +01:00
Sean Hagstrom
477ed3c5e8 feat(formatter): allow single-line function call ending with multi-line lambda 2022-04-24 18:55:57 +01:00
Sean Hagstrom
b147890b08 feat(formatter): implement outdent formatting for multiline lists and records 2022-04-24 16:52:02 +01:00
Kevin Gillette
cd8ab753e3
remove %% operator 2022-04-18 19:15:14 -06:00
Kevin Gillette
9ed4ca9739
remove Num.mod and Num.modUnchecked 2022-04-18 13:54:40 -06:00
Ayaz Hafiz
a3ac68a41f
Split up Defs into TypeDef and ValueDef
Just a refactoring PR. This is useful because during canonicalization
we always process type defs first, then value defs. With abilities this
distinction continues to grow; in that case, we have patterns associated
with types that we want to process before patterns from values.
2022-04-06 22:18:57 -04:00
Ayaz Hafiz
eee19bba2b
s/demands/members 2022-04-06 11:34:55 -04:00
ayazhafiz
d7abc3897b Parse abilities 2022-03-12 21:29:06 -06:00
Anton-4
56dc06a139
fixed the previous formatting change when inside longer pipeline 2022-03-09 14:07:52 +01:00
Anton-4
ba5d47d270
Merge branch 'trunk' of github.com:rtfeldman/roc into roc_fmt_fixes 2022-03-08 13:57:20 +01:00
Anton-4
dd85caa85a
removed redundant derefs 2022-03-08 13:56:43 +01:00
Anton-4
0637344361
cleanup 2022-03-07 18:16:17 +01:00
Anton-4
d8b4feb659
fmt+clippy 2022-03-07 16:24:30 +01:00
Anton-4
21a30b1e83
fixed indentation for apply args 2022-03-07 16:23:15 +01:00
Anton-4
454933e2c6
fixed unnecessary double indentation 2022-03-07 16:02:11 +01:00
Richard Feldman
19cc7fdcaa
Merge pull request #2658 from rtfeldman/newline
Tests for trailing newline formatting
2022-03-07 08:34:20 -05:00
Folkert
836967b919
some other clippy things in tests 2022-03-06 19:07:38 +01:00
Richard Feldman
a8eff47f87
Use len_utf8 over hardcoded 1
This will compile to the same thing but makes the reason
for the addition more self-documenting.
2022-03-06 11:26:48 -05:00
Richard Feldman
49fcd03941
Test trailing newline logic 2022-03-06 11:12:43 -05:00
Richard Feldman
8f6f20b57d
Avoid reallocation when ensuring trailing newline 2022-03-06 11:12:43 -05:00
Philippe Vinchon
813845e7d1 Trim end and add empty line for POSIX 2022-03-05 22:31:57 +00:00
Pierre-Henri Trivier
1d3aa26193 Fixes #2586 2022-03-04 23:50:00 +01:00
Philippe Vinchon
b9365d06e3 Allow multi string in RePL 2022-03-03 21:15:01 +00:00
Richard Feldman
d3acf34415
Merge pull request #1591 from rtfeldman/single-quote-literal
Single Quote literal
2022-02-26 23:27:46 -05:00
Brendan Hansknecht
f7c0e2ef19 Merge remote-tracking branch 'origin/trunk' into single-quote-literal 2022-02-24 10:13:39 -08:00
Richard Feldman
655373dbe7
Merge remote-tracking branch 'origin/trunk' into gui-example 2022-02-23 21:25:01 -05:00
Richard Feldman
0d037f2204
Appease clippy 2022-02-23 21:19:02 -05:00
ayazhafiz
6104a27b45 Parse opaque references 2022-02-19 21:30:42 -05:00
ayazhafiz
a38f1d1e8d Fmt and clippy 2022-02-19 20:54:21 -05:00
ayazhafiz
fa24e51593 Parse opaque types 2022-02-19 18:38:31 -05:00
ayazhafiz
8ce81e4607 AliasHeader -> TypeHeader 2022-02-19 17:51:56 -05:00
Richard Feldman
881bae7267
Merge branch 'trunk' into fix-module-formatting 2022-02-04 23:03:52 -05:00
Folkert
71cae79b02 fix annoying spaces debug_assert failure 2022-02-04 23:00:10 +01:00
Folkert
f1ebc523b6 Merge remote-tracking branch 'origin/trunk' into hook-up-hosted-modules 2022-02-04 00:07:23 +01:00
Folkert
885500712c remove old Effect module things 2022-02-03 23:55:02 +01:00
Folkert
a98635ed06 update other examples 2022-02-03 22:45:15 +01:00
ayazhafiz
a6f7579c07 Parse and expand numeric bounds in canonicalization pass 2022-02-01 22:50:46 -05:00