Commit graph

73 commits

Author SHA1 Message Date
Agus Zubiaga
057a18573a
New module header
Implements the new `module` header syntax as described in "module and package changes" [1]:

```
module [Request, Response, req]
```

The old syntax should still work fine, and is automatically upgraded to the new one
when running `roc format`.

[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit
2024-05-01 10:39:12 -03:00
Agus Zubiaga
7ebfc6d06d
Support both inline and header imports
Load will now convert header imports to inline import defs, so that
we can support both temporarily.
2024-04-20 19:04:09 -03:00
Luke Boswell
f9771a9983
split test_utils 2024-04-15 20:30:34 +10:00
Richard Feldman
02bc54292f
Update fmt tests to not use Nat 2024-01-26 16:17:06 -05:00
Anton-4
1126f85b5a
fix clippy unnecessary hashes 2024-01-01 16:38:36 +01:00
JRI98
0599066865
Fix format for the 'as' keyword 2023-12-07 10:46:58 +00:00
Richard Feldman
315d185b2b
Fix test 2023-08-10 21:17:16 -04:00
Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax 2023-08-10 20:36:01 -04:00
Folkert
ef39bad7c6
auto clippy fixes 2023-07-10 18:27:08 +02:00
Kiryl Dziamura
1bb3c3d1dd
Make has have 4 identation spaces 2023-07-04 11:24:40 +02:00
Bryce Miller
cb08225bf0
| -> where 2023-06-05 20:19:00 -04:00
Bryce Miller
76551375b9
has -> implements in fn names 2023-05-26 23:25:21 -04:00
Bryce Miller
91e37293a2
abilities syntax has -> implements 2023-05-24 21:29:38 -04:00
Agustin Zubiaga
4cd2c957ca
Format multiline reecord builder fields nicely 2023-05-17 12:48:37 -03:00
Agustin Zubiaga
5edcb31f32
Outdentable record builders 2023-05-17 12:21:39 -03:00
Agustin Zubiaga
d1feb00170
Track spaces between : and <- in record builders 2023-05-17 11:49:06 -03:00
Agustin Zubiaga
731cd4257d
Record Builder colon arrow syntax 2023-05-16 22:44:55 -03:00
Agustin Zubiaga
6670fbb1ab Multiple record builder error 2023-05-08 19:26:47 -03:00
Agustin Zubiaga
71c80171d4 Add record builder apply fmt test 2023-05-07 15:56:44 -03:00
Agustin Zubiaga
c2e50a22b6 Record Builder formatting 2023-05-07 15:51:08 -03:00
Luca Cervello
a4410fe052
fix: add spaces around ? in optional record field 2023-02-08 18:41:22 +01:00
Joshua Warner
0b8e68f70d
Fix approximately a bajillion fmt and parsing bugs
(discovered by fuzzing)

There's more to come, but this seems like a good batch for now.
2023-01-13 18:20:44 -08:00
Joshua Warner
bfeddc470a
Move syntax tests to a dedicated crate
* test_fmt moves out of fmt crate
* test_parse _mostly_ moves out of parse crate and into `test_snapshots.rs` (some simple tests remain)
* now there's only two fuzz targets, fuzz_expr and fuzz_module, that cover both parsing and formatting
* added a system to auto-add new snapshot entries for new test files
* took some commented-out tests in `test_parse` and converted them to snapshot tests
* moved test_fmt's verification of formatting consistency into test_snapshots
* fixed a huge derp on my part where the fmt fuzzer in #4758 was completely useless (broken by refactoring just prior to submitting the PR)
* fixed a formatting bug found by fuzzing (bound_variable.expr.roc) - that I missed earlier due to ^^^ that derp
* no longer have roc_test_utils as a dependency in fmt - which was causing problems for the wasm build
2022-12-26 22:50:24 -08:00
Renamed from crates/compiler/fmt/tests/test_fmt.rs (Browse further)