Commit graph

427 commits

Author SHA1 Message Date
Agus Zubiaga
e5a09b5de6
Parse module params in import 2024-05-09 07:42:07 -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
Ayaz
010aed88f9
Merge pull request #6732 from roc-lang/import-parse-reporting
Friendly reporting of import syntax errors
2024-05-07 21:29:58 -05:00
Ayaz
cc1bc68eb4
Merge pull request #6717 from roc-lang/optional-ingested-ann
Optional annotation in ingested file imports
2024-05-07 21:18:12 -05:00
Agus Zubiaga
2a8ecbba28
Do not drop import parse errors 2024-05-07 22:39:43 -03:00
Agus Zubiaga
f81985533c
Report import lowercase alias 2024-05-06 23:16:18 -03:00
Agus Zubiaga
bfb77b78cb
Report import ending syntax error 2024-05-06 22:22:00 -03:00
Agus Zubiaga
8418610dd9
Require newline after import 2024-05-06 22:15:52 -03:00
Agus Zubiaga
56f12718f1
Only annotation spaces should be backtrackable 2024-05-05 17:39:49 -03:00
Agus Zubiaga
fe2eb0f0a5
Parse optional ingested file annotation 2024-05-05 16:55:36 -03:00
Luke Boswell
9a7b62ac22
handle dbg when unwrapping suffixed ! 2024-05-04 21:37:47 +02:00
Anton-4
f7011c8e33
Merge pull request #6644 from roc-lang/rust-1-76-0-upgrade
Rust 1.76.0 upgrade
2024-05-03 07:25:19 +02: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
Anton-4
c3cabf7840
Merge pull request #6685 from roc-lang/repl-import
Support imports in REPL
2024-04-30 19:49:26 +02:00
Anton-4
c303be7553
Merge branch 'main' into rust-1-76-0-upgrade 2024-04-30 19:36:01 +02:00
Anton-4
ec874655dd
apply Ayaz review suggestions 2024-04-30 19:34:21 +02:00
Agus Zubiaga
a8a829aadd
Merge branch 'main' into inline-imports 2024-04-28 00:11:29 -03:00
Agus Zubiaga
87a279dc2c
Extract marking s builtin into header type method 2024-04-27 22:27:50 -03:00
Luke Boswell
74e531b994
remove suffixed from Ident::Access and cleanup 2024-04-28 08:48:08 +10:00
Luke Boswell
db4607125b
remove suffixed from Pattern 2024-04-28 08:47:08 +10:00
Luke Boswell
2fe03e6c91
remove suffixed from Expr::Var 2024-04-28 08:47:08 +10:00
Luke Boswell
1640ee1321
update logic for Expr::TaskAwaitBang 2024-04-28 08:47:08 +10:00
Joshua Warner
7c53cf0cd7
Fixup tests 2024-04-28 08:47:07 +10:00
Joshua Warner
6080c12ca8
Parse ! suffixes as an Expr::TaskAwaitBang instead of using suffix field in ident 2024-04-28 08:47:07 +10:00
Agus Zubiaga
52f84910a7
Support importing local files in the REPL 2024-04-26 23:33:19 -03:00
Agus Zubiaga
0f89d3558a
impl From<ImportedModuleName> for QualifiedModuleName 2024-04-23 20:03:07 -03:00
Agus Zubiaga
7efc7a4a3e
Canonicalize ingested files directly instead of creating AST nodes 2024-04-23 18:55:41 -03:00
Agus Zubiaga
4476277a56
Merge branch 'main' into inline-imports 2024-04-22 17:45:25 -03:00
Luke Boswell
d69d2ee940
replace removed comment 2024-04-21 13:45:04 +10:00
Luke Boswell
9ad6d9248c
converge loc_pattern_help_help and loc_parse_tag_pattern_arg 2024-04-21 13:32:38 +10: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
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
Joshua Warner
50d2111919
Remove unnecessary arg to check_indent
Quick refactoring / follow-up to #6634
2024-04-19 20:25:55 -07:00
Luke Boswell
0198a683c7
fix unwrapping of trailing expr 2024-04-17 09:54:29 +10:00
Anton-4
1a5e065055
Merge branch 'main' into rust-1-76-0-upgrade 2024-04-16 13:33:27 +02:00
Anton-4
5c45cc9c3e
fmt 2024-04-15 19:38:04 +02:00
Anton-4
dc96e194bd
clippy 2024-04-15 19:36:52 +02:00
Anton-4
8502a37b3c
fmt 2024-04-15 16:51:07 +02:00
Anton-4
e4b814ce1c
clippy 2024-04-15 16:50:44 +02:00
Luke Boswell
7886d30b8e
parse/unwrap nested defs 2024-04-15 09:25:00 +10:00
Luke Boswell
129ca94733
remove unit type from EmptyDefsFinal 2024-04-14 13:45:07 +10:00
Luke Boswell
0143035dc0
cleanup, improve docs 2024-04-14 13:45:06 +10:00
Luke Boswell
c32fa5b600
support optional suffied last def 2024-04-14 13:45:06 +10:00
Luke Boswell
b13adf6898
more flexible statement parsing 2024-04-14 13:45:06 +10:00
Luke Boswell
68c00a1493
fix replace_value_def 2024-04-14 13:45:06 +10:00
Luke Boswell
5bb44fcce5
most tests passing 2024-04-14 13:45:05 +10:00