Commit graph

224 commits

Author SHA1 Message Date
Ayaz Hafiz
26d8f0ce08
Fix kw list 2022-11-24 14:48:39 -06:00
Richard Feldman
47374609e3
Re-add dbg to KEYWORDS 2022-11-24 14:46:54 -06:00
Ayaz Hafiz
f9de522004
Add crash fmt test 2022-11-24 14:46:54 -06: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
Richard Feldman
b9b03d432a
Merge remote-tracking branch 'origin/main' into https-packages 2022-11-24 13:14:36 -05: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
Joshua Warner
a6a90178ce
Refactor record_type to use combinators 2022-11-24 07:36:44 -08:00
Richard Feldman
f5cb2d73a1
Merge branch 'precompiled-legacy' into https-packages 2022-11-24 04:29:56 -05:00
Richard Feldman
adddc1ff70
Fix dbg parse test 2022-11-24 03:31:19 -05:00
Folkert
e44a8a9eed
print all the relevant info 2022-11-23 22:58:58 +01:00
Richard Feldman
73a591743b
Add parser tests for dbg 2022-11-22 21:27:10 -05:00
Richard Feldman
49f8768271
Parse and format dbg 2022-11-22 21:08:26 -05:00
Richard Feldman
13bed30411
Have Either derive Clone and Copy 2022-11-20 16:20:24 -05:00
Joshua Warner
2d9aba2242
Refactor parser methods to not return State as part of ParseError
As previously discovered with #4464, it's easy to accidentally mis-use the State value returned on the Err path.

There were mixed assumptions about what that State represents: (1) the State where the error occurred, or (2) the State at the beginning of the thing we were just parsing.

I fixed this up to always mean (2) - at which point we don't actually need to return the State at all - so it's impossible for further discrepency to creep in.

I also took the liberty to refactor a few more methods to be purely combinator-based, rather than calling `parse` directly.
2022-11-18 19:52:23 -05:00
Joshua Warner
36f0e9d4f5
Add test for multiline tuple with comments 2022-11-15 19:51:02 -05:00
Joshua Warner
d4bf946327
Assert formatting for parse tests 2022-11-15 19:47:28 -05:00
Joshua Warner
ca5d084497
Implement tuple pattern parsing
Step 2 of N in implementing #4465
2022-11-13 16:11:57 -05:00
Folkert
662bf1de99
more workspace dependencies 2022-11-13 16:10:02 +01: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
Richard Feldman
83e4eef475
Merge pull request #4492 from joshuawarner32/tuple-syntax-1
Implement initial tuple syntax
2022-11-11 17:55:25 -08: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
Anton-4
a6a2b59a79
Merge branch 'main' of github.com:lukewilliamboswell/roc into rust-docs 2022-11-08 15:57:24 +01:00
Luke Boswell
cec67721e6
merge upstream/main 2022-11-06 09:27:46 +11:00
Luke Boswell
2c2a70b8e7 Merge remote-tracking branch 'upstream/main' into rust-docs 2022-11-06 09:15:57 +11:00
Joshua Warner
ac5aa8d8ee
Combine bounds 2022-11-05 17:41:06 -04:00
Joshua Warner
5d5b71a083
Refactor several parse methods to use more combinators 2022-11-05 09:44:08 -04:00
Richard Feldman
c03dc17ab4
Merge remote-tracking branch 'origin/main' into repl 2022-11-05 01:04:44 -04:00
Joshua Warner
060a69aed2
Fix CI 2022-11-04 09:47:55 -04:00
Richard Feldman
c4baf32e51
Merge pull request #4463 from roc-lang/clippy-1.65
clippy 1.65
2022-11-03 20:10:53 -07:00
Joshua Warner
311193fe70
Fix one_of error state handling 2022-11-03 20:54:08 -04:00
Joshua Warner
b2bb38220b
Make parse tests for reporting tests 2022-11-03 17:24:02 -04:00
Joshua Warner
469e1dc9e3
Fix --features=parse_debug_trace 2022-11-03 17:23:52 -04:00
Folkert
134de80150
various updates 2022-11-03 17:18:27 +01:00
Folkert
66a1ba00eb
1.65 clippy fixes 2022-11-03 16:20:37 +01:00
Luke Boswell
a3f901427a
correct formatting and removed duplicate image 2022-11-03 20:02:10 +11:00
Luke Boswell
f3bdb5f321
updating rust package documentation 2022-11-03 20:00:06 +11:00
Richard Feldman
220c362671
Merge remote-tracking branch 'origin/main' into repl 2022-10-31 20:49:28 -04:00
Joshua Warner
07be8ec000
Refactor Parser trait to pass min_indent
This removes the need to explicitly pass thru min_indent when using the parser combinators.

My ultimate goal here is to evolve the current parser closer toward a purely combinator-based parser,
at which point we can more easily transition smoothly to a formal(ish) grammar, or expand the meanings of combinators
to include things like:
* Incremental (re)parsing
* Unified parsing and formatting code
* Better error recovery
* Using the main parser directly for syntax highlighting
2022-10-31 13:31:47 -07:00
Richard Feldman
0c8f6a0a72
Fix annotated defs in repl 2022-10-30 13:34:38 -04:00
Richard Feldman
e38ae00c65
Expose macros for joining up AnnotatedBody nodes 2022-10-30 12:36:10 -04:00
Richard Feldman
99f4d99771
Revert "Attempt a refactor, but run into lifetime issues"
This reverts commit 4a9b44aaaf.
2022-10-30 07:22:32 -04:00
Richard Feldman
4a9b44aaaf
Attempt a refactor, but run into lifetime issues 2022-10-30 07:22:31 -04:00
Richard Feldman
e0e25a48bf
Add comment_str 2022-10-30 07:17:10 -04:00
Richard Feldman
9f498add60
Reorganize some REPL modules 2022-10-27 18:47:27 -04:00
Richard Feldman
67a8bbd6a2
Merge pull request #4414 from roc-lang/i4412
Parse and format list patterns
2022-10-26 19:49:12 -07:00
Richard Feldman
c894d522c3
Drop some commented-out lines
Signed-off-by: Richard Feldman <oss@rtfeldman.com>
2022-10-26 22:48:37 -04:00
Ayaz Hafiz
89867a4dc5
Add parsing error reporting for list patterns 2022-10-26 18:05:52 -05:00
Ayaz Hafiz
4d35ab9957
Parse list patterns 2022-10-26 17:03:22 -05:00