Agus Zubiaga
4b8b36529d
Remove unnecessary & ref
2024-05-05 17:08:34 -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
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
7efc7a4a3e
Canonicalize ingested files directly instead of creating AST nodes
2024-04-23 18:55:41 -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
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
d08a51b134
cargo fmt
2024-04-14 13:45:02 +10:00
Luke Boswell
584d41f621
fix !
bug for Record and Tuple Access
2024-04-14 13:45:02 +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
e2557067c8
add nested snapshot for suffixed expr
2024-03-15 14:40:09 +11:00
Luke Boswell
8bbbd768ec
add snapshot test for suffixed expr
2024-03-15 14:39:21 +11:00
Anton-4
1efd7615f0
stylistic improvements
2024-03-13 20:27:23 +01:00
Eli Dowling
cc4453b301
remove alias
2024-03-12 06:42:37 +10:00
Eli Dowling
c89c8c3e95
fix formatter crash
2024-03-12 06:42:27 +10:00
Richard Feldman
6978ca7bf3
roc format now auto-upgrades string interpolation
2024-02-26 23:08:25 -05: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
08e6b79dca
fmt: Simplify ModuleImport is_multiline
2024-01-20 08:39:33 -03: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
ptaszor3
58b73ae257
Fixed some formatting
2023-12-10 19:58:23 +01:00
JRI98
3a86f5de22
Fix format for the 'as' keyword
2023-12-10 19:58:16 +01:00
ptaszor3
7162fbddd3
Fixed the multiline dbg formatting
2023-12-10 19:58:09 +01:00
ptaszor3
6a6d5cebc0
resolved issue 6188 and added some tests
2023-12-10 19:57:49 +01: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
Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax
2023-08-10 20:36:01 -04:00
Kiryl Dziamura
1bb3c3d1dd
Make has
have 4 identation spaces
2023-07-04 11:24:40 +02:00