Commit graph

559 commits

Author SHA1 Message Date
Kiryl Dziamura
de9ed734c5
remove EmptyDefsFinal 2024-07-01 18:45:23 +02:00
Isak
eb98dd7bde
move comment 2024-06-27 13:38:30 -04:00
Isak
cc7d3d3e1d
fix: allow multiple newlines between signature and body 2024-06-27 13:34:09 -04:00
Sam Mohr
cd488300fd
Merge branch 'main' into builtin-task 2024-06-26 03:17:56 -07:00
Kiryl Dziamura
bff73ff6b2
check if final expr in deps is suffixed 2024-06-25 19:14:18 +02:00
Sam Mohr
700c7ae9aa
Add Task as a built-in module/type 2024-06-25 00:03:56 -07:00
Anton-4
f8432f7510
fmt 2024-06-22 20:09:15 +02:00
Anton-4
ab217ede3f
Merge remote-tracking branch 'upstream/main' into unmacro_parsers 2024-06-22 20:02:30 +02:00
Folkert
2cabe6546c
use std::starts_with instead of iterator logic 2024-06-05 17:14:06 +02:00
Kiryl Dziamura
3e5cfb546d
check if when branch is suffixed 2024-06-03 23:45:54 +02:00
Kiryl Dziamura
cc7b656703
add doc comment 2024-05-28 11:00:28 +02:00
Kiryl Dziamura
fb108af73e
ignore comments in repl 2024-05-22 00:51:38 +02:00
Ayaz
e5ea6dc461
Merge pull request #6708 from roc-lang/module-params-syntax
Parse and format module params
2024-05-12 13:51:13 -05:00
Agus Zubiaga
25d3cae08f
Use Loc::at instead of map(|_| x) 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
5b1a3c8f03
Parse params in module header
module {echo, read} -> [menu]

Formatter isn't implemented yet.
2024-05-09 07:27:43 -03:00
Joshua Warner
d667e3c2d8
Simplify task await bang parsing to no longer require suffixed_found 2024-05-08 20:48:33 -07: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
Jackson Wambolt
f44064e946
Fix failing parser doctests 2024-04-22 20:03:05 -05:00
Jackson Wambolt
f001cf98e6
Clarify doc for indented_seq
Previously said that `indented_seq` was similar to `and`, but it's more
like `skip_first`. `and` returns a tuple of both parsers' outputs, but
`indented_seq` only returns the output of the second parser, just like
`skip_first`.
2024-04-22 20:03:05 -05:00
Jackson Wambolt
dd2c786eb9
Un-macro collection_trailing_sep_e 2024-04-22 20:03:05 -05:00
Jackson Wambolt
1c916202e7
Un-macro collection_inner 2024-04-22 20:03:05 -05:00
Jackson Wambolt
02c98f7519
Un-macro either 2024-04-22 20:03:05 -05:00
Jackson Wambolt
2f776f366f
Un-macro one_or_more 2024-04-22 20:03:04 -05:00