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
Folkert
e9196f3c0b
parse and format pattern as
2022-12-30 17:50:17 +01:00
Richard Feldman
da595a86b0
Parse package module header
2022-12-04 06:26:44 -05:00
Richard Feldman
a0bc105ca8
Merge pull request #4616 from roc-lang/fix-pattern-equivalent
...
Fix missing cases in Pattern::equivalent
2022-11-30 12:10:09 -05:00
Joshua Warner
2b91af02df
Introduce record!
combinator
...
... and refactor header parser to fully use combinators, in support of future combinator-based superpowers
2022-11-28 20:25:55 -08:00
Joshua Warner
8de153efb9
Fix missing cases in Pattern::equivalent
2022-11-28 19:47:53 -08:00
Richard Feldman
58fad36f9d
Merge pull request #4460 from roc-lang/crash
...
Crash
2022-11-25 17:18:21 -05:00
Joshua Warner
a1432d1a14
Fix TypeAnnotation::Tuple comment
2022-11-24 14:29:50 -08:00
Ayaz Hafiz
fee01166c7
Add crash as a keyword
2022-11-24 14:46:49 -06:00
Ayaz
848c18f996
Merge pull request #4567 from joshuawarner32/tuple-type-annotation
...
Implement tuple type parsing
2022-11-24 14:42:11 -06:00
Joshua Warner
c6b5273144
Implement tuple type parsing
...
Also change some tests with newly relaxed indentation requirements, and remove an irrelevant test (since unindented close parens are now perfectly valid, the test is no longer useful).
2022-11-24 07:36:59 -08:00
Folkert
e44a8a9eed
print all the relevant info
2022-11-23 22:58:58 +01:00
Richard Feldman
49f8768271
Parse and format dbg
2022-11-22 21:08:26 -05:00
Joshua Warner
ca5d084497
Implement tuple pattern parsing
...
Step 2 of N in implementing #4465
2022-11-13 16:11:57 -05:00
Joshua Warner
f4ce4bf983
Implement parsing for tuple accessor functions (.1, .2, etc)
...
Step 2 of N toward implementing #4465
2022-11-12 09:56:29 -05:00
Joshua Warner
8d79182730
Actually parse to Expr::Tuple... whoops!
2022-11-11 14:21:08 -05:00
Joshua Warner
1753c9cf5b
Implement initial tuple syntax
2022-11-08 18:04:46 -05:00
Richard Feldman
c03dc17ab4
Merge remote-tracking branch 'origin/main' into repl
2022-11-05 01:04:44 -04:00
Folkert
66a1ba00eb
1.65 clippy fixes
2022-11-03 16:20:37 +01:00
Richard Feldman
e0e25a48bf
Add comment_str
2022-10-30 07:17:10 -04:00
Ayaz Hafiz
4d35ab9957
Parse list patterns
2022-10-26 17:03:22 -05:00
Ayaz Hafiz
548a235c25
Support parsing multiple abilities in a clause
2022-10-24 13:56:06 -05:00
Folkert
bcbc8b4d50
basic canonicalization
2022-08-09 13:59:24 +02:00
Ayaz Hafiz
b04764bdd6
Support parsing opaque destructures as first item in nested body
...
Closes #3198
2022-07-22 16:35:02 -04:00
Folkert
7597d11b59
parse the region of the preceding comment for an expect
2022-07-21 10:42:57 -04:00
Ayaz Hafiz
e672ce9ebd
First pass at canonicalizing and reporting syntactic abilities
2022-07-18 17:55:01 -04:00
Richard Feldman
c859ce0b23
Use Opaque over Alias
2022-07-18 17:55:00 -04:00
Richard Feldman
cb084c9738
Revise ExtractSpaces for HasImpls
...
Make it produce the one non-space variant,
so you don't have to match on it afterwards
2022-07-18 17:54:59 -04:00
Ayaz Hafiz
85599e3a9a
Parse impl blocks in abilities
2022-07-15 11:06:44 -04:00
Ayaz Hafiz
d4d073d8c6
Rename Derived to HasAbility
2022-07-14 10:38:37 -04:00
Folkert
3dee90ced8
remove parse::ast::Def
2022-07-10 01:10:37 +02:00
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes
2022-07-01 17:37:43 +02:00