Joshua Warner
08a33aab1b
Remove bytes tracking
2022-01-01 18:20:05 -08:00
Joshua Warner
beb0629e05
Track state in whitespace
2022-01-01 18:20:05 -08:00
Joshua Warner
a13c474f6b
Remove line tracking in parser
2022-01-01 18:20:05 -08:00
Joshua Warner
8e1241adea
Remove line/column fields
2022-01-01 18:20:05 -08:00
Joshua Warner
4b04ec6bbc
Add Position::offset, and recompute line/column info based on source
2022-01-01 18:20:05 -08:00
Joshua Warner
443d738f9b
Make Position::{line, column} fields private
2022-01-01 18:20:05 -08:00
Joshua Warner
721233f9c8
More incremental changes
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
bd7b1e5013
Make Loc::new take Positions
2022-01-01 18:20:05 -08:00
Anton-4
f941e30b86
Merge branch 'trunk' of github.com:rtfeldman/roc into editor-comments
2022-01-01 11:10:54 +01:00
ayazhafiz
0c81302d29
Admit tag destructuring in definitions
2021-12-30 19:50:50 -06:00
Folkert
b924f7e329
use new header type in a spot we missed
2021-12-27 23:58:56 +01:00
Folkert de Vries
bb935948aa
Merge pull request #2276 from rtfeldman/i/2265
...
Parse "as" aliases into tag/args rather than arbitrary annotations
2021-12-27 20:56:48 +01:00
ayazhafiz
b3ddfa7515
Parse destructured tag annotations as annotations rather than aliases
...
Closes #178
2021-12-26 16:11:29 -06:00
ayazhafiz
b66543dd95
into_iter -> iter
2021-12-26 09:55:27 -06:00
ayazhafiz
966198a6e7
Coalesce inline and normal alias headers
...
Unifies `As` annotations and `Alias` defs to use a common struct for
defining alias header information, i.e. the name and type variables of
the alias.
2021-12-26 09:37:56 -06:00
ayazhafiz
597a1cef3b
Attach location to alias header name
2021-12-26 09:17:27 -06:00
ayazhafiz
11da888c07
Pull out alias header as its own struct
2021-12-26 09:07:12 -06:00
ayazhafiz
507f219d28
Satiate clippy
2021-12-26 08:44:10 -06:00
ayazhafiz
2cd5bf8c03
Parse "as" aliases into tag/args rather than arbitrary annotations
2021-12-26 08:44:09 -06: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
f170509bf1
rename col -> column
2021-12-22 20:37:40 -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
Richard Feldman
3ffe5768e1
Merge pull request #2239 from rtfeldman/joshuawarner32/pipeline-format-fail
...
Fix formatting of pipelined call exprs
2021-12-20 15:46:23 -05:00
Richard Feldman
5aa67d4244
Merge pull request #2231 from rtfeldman/joshuawarner32/record_func_type_decl
...
Allow function types in records
2021-12-20 11:45:27 -05:00
Joshua Warner
61cdbd1531
Fix formatting of pipelined call exprs
2021-12-18 16:36:51 -08:00
Joshua Warner
96e8916594
Refactor BadOperator to take a &str rather than &[u8]
2021-12-18 14:42:48 -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
7b9c8ed939
Allow function types in records
2021-12-17 15:09:15 -08:00
Joshua Warner
5a236899fa
Add some optional debug tracing to the parser
2021-12-17 15:09:15 -08:00
Joshua Warner
2e85c19101
Require explicit cloning of State
2021-12-16 17:13:58 -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
Anton-4
8c82025721
Merge branch 'trunk' of github.com:rtfeldman/roc into editor-comments
2021-12-09 13:55:44 +01:00
Anton-4
9a2187ecd2
fixed newline issues
2021-12-09 13:55:18 +01:00
Joshua Warner
49228c8100
Refactor format_sequence to be a function
2021-12-07 18:53:47 -08:00
Joshua Warner
f3dd9e411f
Keep trailing comments at the end of a file
2021-12-05 12:19:58 -08:00
Anton-4
b3420d793f
removed dbg, disabled comment_after test
2021-12-04 15:22:45 +01:00
Anton-4
d6a27d1e53
Merge branch 'trunk' of github.com:rtfeldman/roc into editor-comments
2021-12-04 11:00:03 +01:00
Chelsea Troy
e57a539a66
cargo fmt AGAIN
2021-12-01 23:59:58 -06:00
Chelsea Troy
b65a69f07e
Appeasing the clippy
2021-12-01 18:56:15 -06:00
Anton-4
5bd776f972
debugging inline comment bug
2021-12-01 16:57:28 +01:00
Chelsea Troy
6cf755ad8d
Resolve a bunnnch of merge conflicts
2021-11-29 23:14:29 -06:00
Joshua Warner
f25323e8a7
Implement platform header formatting
2021-11-25 08:19:31 -08:00
Joshua Warner
24f7692a73
Implement [more] app header formatting
...
Also, refactor out a utility method to format a Collection. This method can currently
replace some of the formatting done in module headers - but the goal is eventually
to be able to replace the code in fmt_list as well, such that there is 'one true way'
to format collections.
2021-11-23 12:19:43 -08:00
ayazhafiz
8a60162a1e
Rename roc_module::operator -> roc_module::called_via
...
A bit of a nit, but this file is now more general than just keeping
track of operator methods.
2021-11-18 20:20:33 -05:00