Joshua Warner
f440d53e7b
Refactor: introduce trait SpaceProblem to remove a bunch of redundant args in ::Space errors
2022-02-15 20:48:04 -08:00
Folkert
885500712c
remove old Effect module things
2022-02-03 23:55:02 +01:00
Richard Feldman
484ce2fbc9
Parse hosted modules
2022-01-30 20:40:49 -05:00
ayazhafiz
b50bb9a4c7
Centralize closure type
2022-01-30 00:48:01 -05:00
ayazhafiz
8ae2d9d407
Parse interfaces with leading newlines
...
Closes #2420
2022-01-29 23:58:41 -05:00
Richard Feldman
1ab621dd54
Support optional spaces in app header types
2022-01-23 12:02:34 -05:00
Richard Feldman
01942fd98e
Parse app header provided types
2022-01-23 11:52:59 -05:00
Richard Feldman
c1c0ffb25f
Use UppercaseIdent over PlatformRigids
2022-01-23 11:13:23 -05:00
Joshua Warner
f22f96843e
Refactor ParseProblem
...
* Remove the `pos` field, which was always being assigned Position::default()
* Remove one use of this `pos`, by removing the never-used SyntaxError::ConditionFailed variant
* Adjust the other use to do what was probably intended - which is to say, pointing to the beginning of the def with the error
* Rename to FileError, reuse `SourceError` as an inner field, to avoid duplicating the `bytes`
2022-01-03 20:10:50 -08:00
Joshua Warner
8092f31a29
fmt
2022-01-01 18:20:05 -08:00
Joshua Warner
f969c7c6d0
Fixup rebase errors
2022-01-01 18:20:05 -08:00
Joshua Warner
5c1084c453
Introduce SourceError to represent an error + original source
2022-01-01 18:20:05 -08:00
Joshua Warner
70156b0a90
Simplify advancing
2022-01-01 18:20:05 -08:00
Joshua Warner
1b257da356
Make State::xyzlcol a LineColumn, and change everything wanting a Position to use State::pos() instead
2022-01-01 18:20:05 -08:00
Joshua Warner
d2dcb462c7
Rename State::pos -> xyzlcol, temporarily
2022-01-01 18:20:05 -08:00
Joshua Warner
8b58d5cbc7
Switch to always encoding package names / paths as strings
...
This will simplify parsing and make it possible to have a uniform lexer for the language. Previously unquoted package names were allowed to include '-'s, which aren't valid identifiers.
In the future, we'll distinguish local paths from packages in the package-manager by looking for a ".roc" suffix, which should only be present in local paths.
2021-12-23 20:11:14 -08:00
Joshua Warner
22e2545fd6
format
2021-12-22 20:46:42 -08:00
Joshua Warner
4d7070ce3b
Always combine line,column into Position
2021-12-22 20:32:46 -08:00
Joshua Warner
f19220473a
Rename Located -> Loc
2021-12-22 19:18:22 -08:00
Joshua Warner
efa54287f1
Return the original error if there's an unexpected trailing comma
2021-12-18 13:26:59 -08:00
Joshua Warner
49818343dd
extract state
2021-12-16 17:13:53 -08:00
Joshua Warner
0786e554c6
Extract spacing from parse::header::* items into explicit Spaced enum
2021-12-14 19:53:20 -08:00
Jan Van Bruggen
d03a51c75b
Rename base
package to pf
everywhere, to match tutorial
2021-12-12 05:57:39 -07:00
Joshua Warner
f25323e8a7
Implement platform header formatting
2021-11-25 08:19:31 -08:00
Joshua Warner
6fab6e20f5
Fix clippy
2021-11-14 10:40:09 -08:00
Joshua Warner
6c82b1789a
Convert effects to collection_trailing_sep_e
2021-11-14 10:14:53 -08:00
Joshua Warner
8c8bc910fd
Convert exposes_modules to collection_trailing_sep_e
2021-11-14 10:14:53 -08:00
Joshua Warner
c4e70ca7aa
Convert exposes_values to ccollection_trailing_sep_e
2021-11-14 10:14:53 -08:00
Joshua Warner
71cc8d4c4b
Convert requires_rigids to collection_trailing_sep_e
2021-11-14 10:14:53 -08:00
Joshua Warner
df89fe7dd6
Make provides a Collection
2021-11-14 10:14:53 -08:00
Joshua Warner
d67b6c50b1
Allow trailing comments in provides decl
2021-11-14 10:14:53 -08:00
Joshua Warner
23c75d2699
Allow trailing comments in imports decl
2021-11-14 10:14:53 -08:00
Joshua Warner
c10f403c94
Allow trailing comments in exposes decl
2021-11-14 10:14:52 -08:00
Joshua Warner
8a54bb6f6b
fmt
2021-11-11 19:15:07 -08:00
Joshua Warner
4df0880e7a
Commit local changes (whoops!)
2021-11-11 18:57:26 -08:00
Joshua Warner
6a694b7772
Use collection_trailing_sep_e for packages decl, to allow trailing commas there
2021-11-10 18:49:19 -08:00
Anton-4
5023fa3e75
progress on setting up def parser for top level defs
2021-08-16 20:05:21 +02:00
Folkert
c68cd2fb2d
fix and test
2021-04-14 22:03:03 +02:00
Folkert
64bc92c746
basic parsing
2021-04-14 13:03:31 +02:00
Folkert
1977e36459
accept comments before the header
2021-04-11 17:14:48 +02:00
Folkert
3b647274dc
refactor
2021-03-18 14:50:21 +01:00
Folkert
38d925fea6
use new def parser for module defs
2021-03-17 17:28:27 +01:00
Folkert
b18bd26067
cleanup
2021-03-15 13:27:23 +01:00
Folkert
c26fd45d54
all is working again
2021-03-13 22:36:44 +01:00
Folkert
5e4db62c46
remove Attempting and more
2021-03-12 02:09:48 +01:00
Folkert
e214674016
cleanup blankspace function usage
2021-03-11 16:37:42 +01:00
Folkert
d2482246f2
clippy
2021-03-10 01:10:38 +01:00
Folkert
2773639c7b
port header parsing
2021-03-10 01:06:50 +01:00
Folkert
91271d0308
don't leak implementation details
2021-03-09 23:20:31 +01:00
Folkert
bd61a03ae0
port headers!
2021-03-09 23:06:17 +01:00