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
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
a8a829aadd
Merge branch 'main' into inline-imports
2024-04-28 00:11:29 -03: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
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
7efc7a4a3e
Canonicalize ingested files directly instead of creating AST nodes
2024-04-23 18:55:41 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports
2024-04-20 12:01:11 -03:00
Luke Boswell
129ca94733
remove unit type from EmptyDefsFinal
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
8b9e08bd76
WIP try simplification
2024-04-14 13:45:05 +10:00
Luke Boswell
3c3e523b45
add suffixed to Identifer and QualifiedIdentifier
2024-04-14 13:45:00 +10:00
Luke Boswell
0a3b9c34b3
add suffixed:u8 to Expr::Var
2024-04-14 13:45:00 +10:00
Luke Boswell
42fdcb7ff1
Make unit assignment optional for suffixed defs
2024-04-14 13:44:59 +10:00
Jonathan Schear
723c390f52
Treat two hash marks followed by text as a doc comment
2024-03-24 14:31:27 -04:00
Luke Boswell
8bbbd768ec
add snapshot test for suffixed expr
2024-03-15 14:39:21 +11:00
Anton-4
6338e54205
improve wording
2024-01-28 18:33:12 +01:00
Anton-4
30a5a2cfac
change hashtag formatting
2024-01-28 18:15:24 +01:00
Agus Zubiaga
2d93f0c3f1
Extract ModuleImport/IngestedFileImport into structs for reuse
2024-01-20 08:35:50 -03:00
Agus Zubiaga
4d6e641864
Parse and format inline ingested file imports
2024-01-20 08:35:50 -03:00
Agus Zubiaga
42e755677c
Simply import parsing and formatting by using header::KeywordItem
2024-01-20 08:35:50 -03:00
Agus Zubiaga
65ce811587
Parse and format import package shorthand
...
The original proposal [1] suggested dropping the package shorthand,
but we later decided to keep it [2] to improve UX.
[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit?usp=sharing
[2] 385104011
2024-01-20 08:35:50 -03:00
Agus Zubiaga
c56091ee3e
Module Params' proposal import syntax
...
I previously implemented the syntax in "Proposal: Module and Package Changes" [1]:
```
import [map, map2] from JsonDecode as JD
```
However, we decided [2] to use the one that appears in "Proposal: Module Params" [3]:
```
import JsonDecode as JD exposing [map, map2]
```
The new implementation also now supports comments and newlines between all the tokens.
[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit
[2] 405410612
[3] https://docs.google.com/document/d/110MwQi7Dpo1Y69ECFXyyvDWzF4OYv1BLojIm08qDTvg/edit
2024-01-20 08:35:50 -03:00
Agus Zubiaga
5cd084b73c
Parse and format inline import with exposed names
2024-01-20 08:35:50 -03:00
Agus Zubiaga
76d799ea13
Parse and format aliases in import defs
2024-01-20 08:35:50 -03:00
Agus Zubiaga
933fde77a0
Parse and format top-level import defs with no alias or exposed members
2024-01-20 08:35:50 -03:00
Richard Feldman
af8e9c7292
Parse deprecated interpolation syntax differently
2024-01-06 21:49:00 -05:00
JRI98
0599066865
Fix format for the 'as' keyword
2023-12-07 10:46:58 +00:00
Brendan Hansknecht
5e8974177c
avoid bloating parse expr size
2023-12-02 21:18:32 -08:00
Brendan Hansknecht
3966d63e2f
add src and location to dbg
2023-12-02 21:18:31 -08:00
Brendan Hansknecht
1f14aa84a2
misc cleanup suggestions
2023-11-29 21:05:56 -08:00
Brendan Hansknecht
b7f72eff86
add basic Dbg desugaring and LowLevelDbg
2023-11-29 21:05:48 -08:00
Bryce Miller
e463ccf4a6
merge main
2023-06-07 20:36:54 -04:00
Ajai Nelson
2e5fef5231
Improve error messages involving ignored variables
...
Fix #3987
2023-06-06 19:46:15 -04:00
Bryce Miller
46cb45f717
loc_has -> loc_implements
2023-05-20 19:24:08 -04:00
Bryce Miller
10d92bf0f3
ast::ImplementsAbilities::Has ->
...
ast::ImplementsAbilities::Implements
2023-05-20 19:16:13 -04:00
Bryce Miller
4b90948fcf
ast::HasAbilities -> ast::ImplementsAbilities
2023-05-20 19:13:01 -04:00
Bryce Miller
9eb2180a0f
ast::HasAbility -> ast::ImplementsAbility
2023-05-20 08:27:42 -04:00
Bryce Miller
413ccb24ad
ast::HasImpls -> ast::AbilityImpls
2023-05-20 08:24:02 -04:00
Bryce Miller
ebbdae6c28
ast::HasClause -> ast::ImplementsClause
2023-05-20 08:20:44 -04:00
Bryce Miller
64c34a5c6d
ast::Has -> ast::Implements
2023-05-20 08:12:20 -04:00
Agustin Zubiaga
d1feb00170
Track spaces between : and <- in record builders
2023-05-17 11:49:06 -03:00
Agustin Zubiaga
d2a57112fd
Unapplied record builder error
2023-05-08 20:16:38 -03:00
Agustin Zubiaga
6670fbb1ab
Multiple record builder error
2023-05-08 19:26:47 -03:00
Agustin Zubiaga
c2e50a22b6
Record Builder formatting
2023-05-07 15:51:08 -03:00
Anton-4
9748e4a4dc
many clippy fixes
2023-04-24 16:21:46 +02:00