Jonathan Schear
723c390f52
Treat two hash marks followed by text as a doc comment
2024-03-24 14:31:27 -04:00
Luke Boswell
4035221dac
desugar no args correctly e.g. Stdin.line!
2024-03-21 19:25:34 +11:00
Luke Boswell
a394f1b4cf
update from review comments
2024-03-21 15:46:14 +11:00
Luke Boswell
e74501981e
fmt and clippy fixes
2024-03-20 12:31:04 +11:00
Luke Boswell
cc10df6db9
handle Suffixed is in the middle of our Defs
2024-03-20 11:48:08 +11:00
Luke Boswell
c4b459b436
handle Suffixed in first index
2024-03-20 09:49:12 +11:00
Luke Boswell
d6a01b3014
WIP stuck on removing Defs
2024-03-19 16:03:29 +11:00
Luke Boswell
8bbbd768ec
add snapshot test for suffixed expr
2024-03-15 14:39:21 +11:00
Richard Feldman
9bc0ab79af
Parse Expr::Suffixed
2024-03-15 14:39:14 +11:00
Folkert
b0d57587e3
List.get with negative index in repl
2024-01-28 22:21:40 +01:00
Agus Zubiaga
c617963b22
Load and can imports inside defs
...
After parsing a module, we now recursively traverse the tree to find
all imports inside Defs, not just the top-level ones.
Previously, imported modules were available in the entire file,
but that's no longer the case. Therefore, Scope now keeps track of
imported modules and Env::qualified_lookup checks whether a module
is available in the provided scope.
Note: Unused import warnings are still global and need to be updated.
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
Richard Feldman
25be487977
Add $(...) string interpolation syntax
2024-01-06 15:04:22 -05: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
b7f72eff86
add basic Dbg desugaring and LowLevelDbg
2023-11-29 21:05:48 -08:00
Richard Feldman
9fe08cafd0
Render docs for abilities, tuples, and as
2023-08-11 20:59:40 -04:00
Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax
2023-08-10 20:36:01 -04:00
Folkert
ef39bad7c6
auto clippy fixes
2023-07-10 18:27:08 +02:00
Bryce Miller
afa5aaba94
has -> implements
2023-06-10 13:30:54 -04:00
Bryce Miller
cb08225bf0
|
-> where
2023-06-05 20:19:00 -04:00
Bryce Miller
46cb45f717
loc_has -> loc_implements
2023-05-20 19:24:08 -04:00
Bryce Miller
d700a6a6e6
has -> implements in comments
2023-05-20 19:19:11 -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
735721769c
Record Builder parsing
2023-05-05 23:26:20 -03:00
Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
56ed985cc9
pass through correct path and type for ingested file
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
f4411afbbc
get basic wiring of a value through the compiler
2023-04-09 14:03:31 -07:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples
2023-02-07 18:54:50 -08:00
Joshua Warner
a1cd114198
Add a Malformed trait, and assert that 'passing' tests don't produce a malformed result
2023-01-25 21:01:05 -08:00
Joshua Warner
0b8e68f70d
Fix approximately a bajillion fmt and parsing bugs
...
(discovered by fuzzing)
There's more to come, but this seems like a good batch for now.
2023-01-13 18:20:44 -08:00
Joshua Warner
94070e8ba6
Improve parsing of scalar literals
...
* Unify parsing of string literals and scalar literals, to (e.g.) ensure escapes are handled uniformly. Notably, this makes unicode escapes valid in scalar literals.
* Add a variety of custom error messages about specific failure cases of parsing string/scalar literals. For example, if we're expecting a string (e.g. a package name in the header) and the user tried using single quotes, give a clear message about that.
* Fix formatting of unicode escapes (they previously used {}, now correctly use () to match roc strings)
2023-01-07 15:12:52 -08:00
Folkert
8305d078a0
add as
for list rest patterns
2022-12-30 23:17:29 +01:00
Folkert
aff70bb6bd
refactor PatternAs
2022-12-30 18:22:10 +01:00