Commit graph

81 commits

Author SHA1 Message Date
Joshua Warner
8d6eb178b1 Fix multiline pattern heuristic 2022-01-01 18:20:05 -08:00
ayazhafiz
0c81302d29 Admit tag destructuring in definitions 2021-12-30 19:50:50 -06: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
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
2cd5bf8c03 Parse "as" aliases into tag/args rather than arbitrary annotations 2021-12-26 08:44:09 -06:00
Joshua Warner
f19220473a Rename Located -> Loc 2021-12-22 19:18:22 -08:00
Joshua Warner
0786e554c6 Extract spacing from parse::header::* items into explicit Spaced enum 2021-12-14 19:53:20 -08:00
Joshua Warner
49228c8100 Refactor format_sequence to be a function 2021-12-07 18:53:47 -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
Joshua Warner
7f5b873357 Parse _ in type annotations as an 'Inferred' type 2021-11-17 17:59:40 -08:00
Joshua Warner
3ff3695758 Add a manual Debug formatter for Collection to make debugging nicer 2021-11-13 16:24:35 -08:00
Joshua Warner
9bf1674946 Shrink Collection to make parse_expr_size test pass 2021-11-13 16:17:44 -08:00
Joshua Warner
1fabc64fdf Use Collection in Expr::TagUnion 2021-11-13 07:38:39 -08:00
Joshua Warner
d63405d824 Make Expr::List use a Collection 2021-11-13 07:38:11 -08:00
Joshua Warner
a4ca6a31a6 Use Collection in Expr::Record and related places 2021-11-13 07:36:05 -08:00
Joshua Warner
4df0880e7a Commit local changes (whoops!) 2021-11-11 18:57:26 -08:00
Joshua Warner
04d4a8ca79 Introduce Collection as a general abstraction in the ast 2021-11-11 14:49:33 -08:00
Anton-4
c7c421b2f5 fixed scope lookup bug 2021-10-19 16:45:28 +02:00
Anton-4
a272765fc7 started using scope properly, improved error backtrace conversion 2021-10-16 19:37:20 +02:00
Richard Feldman
53ccef0506 nightly clippy
I was on nightly for benchmarks, and these all seem reasonable.
2021-06-18 15:21:11 -04:00
Folkert
700e7d9686 parse expect 2021-04-22 23:00:44 +02:00
Folkert
28ba645121 parse underscores in expressions 2021-04-11 21:02:31 +02:00
Folkert
f3318fbc2f more Copy 2021-03-21 21:38:11 +01:00
Folkert
ce98da9d04 remove Nested from Def 2021-03-21 21:14:32 +01:00
Folkert
52854a6f57 make Def and TypeAnnotation Copy 2021-03-21 21:08:16 +01:00
Folkert
f3fc9f450f make ast::Expr Copy 2021-03-21 21:05:36 +01:00
Folkert
2827af7e59 remove Nested from pattern 2021-03-21 21:03:37 +01:00
Folkert
197835b6ed remove nested in expr 2021-03-21 20:56:18 +01:00
Folkert
03fab9297c shrink stack size usage for parse Expr 2021-03-20 23:37:36 +01:00
Folkert
1871697b0f remove BinOp variant 2021-03-20 23:01:12 +01:00
Folkert
d5ec66244f use new binops 2021-03-20 21:19:10 +01:00
Folkert
e0c211081a remove update field from normal Record constructor 2021-03-20 16:49:14 +01:00
Folkert
60265b5d2a add dedicated RecordUpdate tag to parse ast 2021-03-20 16:06:07 +01:00
Folkert
0e7106280c bump allocate precedence conflict 2021-03-20 15:59:06 +01:00
Folkert
9208000316 only store start position for PrecedenceConflict 2021-03-20 15:34:08 +01:00
Folkert
d22acb521e use record for PrecedenceConflict 2021-03-20 15:07:15 +01:00
Folkert
5e4db62c46 remove Attempting and more 2021-03-12 02:09:48 +01:00
Folkert
e2d08b8f78 make backpassing an expr 2021-03-06 16:05:18 +01:00
Folkert
42654debbf basic backpassing 2021-03-05 22:33:34 +01:00
Folkert
a87dfac7da improved malformed patterns 2021-03-01 16:12:37 +01:00
Folkert
e395d18e16 bunch of stuff 2021-02-28 23:36:27 +01:00
Folkert
4eea0aff7a refactor parse AST to allow multiple if branches 2021-02-25 14:34:58 +01:00
Folkert
d211ca7e61 WIP 2021-02-03 20:21:12 +01:00
Sébastien Besnier
83aa5c1642 add final_comments to List's AST 2020-12-28 18:17:56 +01:00
Sébastien Besnier
2f3d74e8bd fix empty record with only comments in it 2020-12-28 17:54:35 +01:00
Richard Feldman
a78434fd48 Finish introducing new header keywords 2020-11-23 00:08:49 -05:00
Sébastien Besnier
52bace2c25 store the final comments in the AST for record & tag union annotations 2020-11-21 20:36:26 +01:00