Commit graph

437 commits

Author SHA1 Message Date
Aidan
7fe052322c update test, fix logic 2024-07-27 16:55:13 -04:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Aidan
db1c230f1f add test 2024-07-27 12:50:48 -04:00
Luke Boswell
b489c44b19
Merge remote-tracking branch 'remote/main' into builtin-task 2024-07-19 19:51:50 +10:00
Anton-4
3a36d84c45
update to basic-cli 0.12 2024-07-10 20:07:03 +02:00
Sam Mohr
b9a17f4a49
Merge pull request #6883 from smores56/new-builder-syntax
Implement new builder syntax alongside old one
2024-07-08 11:19:01 -07:00
Kiryl Dziamura
2cad4b3e21
update test snapshots 2024-07-08 11:51:29 +02:00
Sam Mohr
618b713ecd
Merge branch 'main' into new-builder-syntax 2024-07-07 18:33:36 -07:00
Sam Mohr
f415017c90
Implement new builder syntax alongside old one 2024-07-07 03:28:59 -07:00
JRI98
25084b18ec
Fix handling of spaces after for as 2024-07-05 09:40:56 +01:00
Sam Mohr
f61b303a59
Merge branch 'main' into builtin-task 2024-07-03 00:42:48 -07:00
Agus Zubiaga
90c7745989
Capture import params location for better errors 2024-07-02 11:09:56 -03:00
Agus Zubiaga
7ac72159e9
Parse module params loc and rename to pattern 2024-07-02 04:10:45 -03:00
Kiryl Dziamura
819cfd6035
fix test snapshots 2024-07-01 19:48:00 +02:00
Sam Mohr
700c7ae9aa
Add Task as a built-in module/type 2024-06-25 00:03:56 -07:00
Evan Relf
2a71dccf5e Add tests 2024-06-19 15:19:25 -07:00
Agus Zubiaga
058079e5cd
Update spaces in import_with_params result ast 2024-05-09 08:02:29 -03:00
Agus Zubiaga
b36f88fd13
Format module params in imports 2024-05-09 07:42:10 -03:00
Agus Zubiaga
e5a09b5de6
Parse module params in import 2024-05-09 07:42:07 -03:00
Agus Zubiaga
08825a9e90
Add module with optional param syntax test 2024-05-09 07:27:58 -03:00
Agus Zubiaga
370013b960
Format module header with params 2024-05-09 07:27:58 -03:00
Agus Zubiaga
760ffaf68f
Report module params parse error 2024-05-09 07:27:58 -03:00
Agus Zubiaga
5b1a3c8f03
Parse params in module header
module {echo, read} -> [menu]

Formatter isn't implemented yet.
2024-05-09 07:27:43 -03:00
Agus Zubiaga
2a8ecbba28
Do not drop import parse errors 2024-05-07 22:39:43 -03:00
Agus Zubiaga
8418610dd9
Require newline after import 2024-05-06 22:15:52 -03:00
Agus Zubiaga
22716cea45
Format ingested file with optional annotation 2024-05-05 16:56:49 -03:00
Agus Zubiaga
e3b600c282
New package header syntax
Implements the new package header syntax as discussed in Zulip [1].

package [Csv] {
    parser: "../parser/main.roc"
}

Old headers still parse and are automatically upgraded to the new
syntax by the formatter.

[1] 418444862
2024-05-01 10:49:03 -03:00
Agus Zubiaga
8dedd9f03c
New app header syntax
Implements the new app header syntax as discussed in Zulip [1].

    app [main] {
	cli: platform "../platform/main.roc",
	json: "../json/main.roc"
    }

Old headers still parse and are automatically upgraded to the new
syntax by the formatter.

[1] 418444862
2024-05-01 10:49:01 -03:00
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
eb8ef6241e
Merge branch 'main' into inline-imports 2024-05-01 10:25:17 -03:00
Anton-4
9d28e70cdc
all fixed 2024-04-28 18:27:59 +02:00
Anton-4
3742ef5f42
update basic-cli links to 0.10 2024-04-28 12:45:31 +02:00
Agus Zubiaga
a8a829aadd
Merge branch 'main' into inline-imports 2024-04-28 00:11:29 -03:00
Luke Boswell
8d88e3ab7f
update snapshots 2024-04-28 08:47:08 +10:00
Luke Boswell
2fe03e6c91
remove suffixed from Expr::Var 2024-04-28 08:47:08 +10:00
Joshua Warner
7c53cf0cd7
Fixup tests 2024-04-28 08:47:07 +10:00
Agus Zubiaga
f69bc2e46f
Merge branch 'main' into inline-imports 2024-04-23 18:57:20 -03:00
Anton-4
29e59dfec9
upgrade to basic-cli 0.9.1 2024-04-23 19:06:33 +02:00
Agus Zubiaga
4476277a56
Merge branch 'main' into inline-imports 2024-04-22 17:45:25 -03:00
Luke Boswell
6844df6c37
fix parsing lists in tag patterns 2024-04-21 13:27:50 +10: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
Joshua Warner
a24daeaa57
Fix syntax fuzzer cargo config 2024-04-20 11:21:36 -07:00
Agus Zubiaga
3217e5a3f0
Allow dots in import module names
We found some issues with the private submodules part of the proposal [1],
and we decided to keep module directories for now.

[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit#heading=h.x84bh32l37em
2024-04-20 12:33:02 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports 2024-04-20 12:01:11 -03:00
Luke Boswell
c5cba98381
Merge remote-tracking branch 'remote/main' into suffixed-bang 2024-04-16 06:42:31 +10:00
Luke Boswell
f9771a9983
split test_utils 2024-04-15 20:30:34 +10:00
Luke Boswell
3cd1f13009
update test_syntax snapshot 2024-04-15 14:30:18 +10:00
Luke Boswell
93ef5e42dc
fix tests, make clippy happy 2024-04-14 13:45:07 +10:00
Luke Boswell
c32fa5b600
support optional suffied last def 2024-04-14 13:45:06 +10:00
Luke Boswell
d08a51b134
cargo fmt 2024-04-14 13:45:02 +10:00