Joshua Warner
887a43ff55
Fix comments in str interpolations
2024-12-16 18:23:37 -08:00
Joshua Warner
4e3df6bde2
Fix normalization of strings with overflowing unicode
2024-12-15 18:33:56 -08:00
Joshua Warner
96c5dcb651
Relax indentation parsing inside parens, lists, and records
2024-12-15 18:33:54 -08:00
Joshua Warner
6ef87b3b9d
Graccefully handle overflowing unicode literals
2024-12-15 18:33:54 -08:00
Joshua Warner
307b0d9ea9
Fix closure indentation and indented-else handling in niche pattern case
2024-12-15 18:33:52 -08:00
Joshua Warner
2dd4fe03f8
Correctly update newline and indent state in multiline strings
2024-12-15 18:33:50 -08:00
Joshua Warner
a15998872d
Also conservatively check for spaces at the beginning of the pattern
2024-12-15 18:33:50 -08:00
Joshua Warner
f193c778d5
clippy
2024-12-13 13:45:11 -08:00
Joshua Warner
d3426ebce1
Fix empty SpaceBefore instance
2024-12-13 13:45:11 -08:00
Joshua Warner
16c3d4e512
Don't drop spaces before return
2024-12-13 13:45:10 -08:00
Joshua Warner
07f7252573
Implement better comparisons between alias and body
2024-12-13 13:45:09 -08:00
Joshua Warner
0cc16b0d2c
Fix bug with when not passing down options
2024-12-13 13:45:09 -08:00
faldor20
a7308130cf
clippy on everything
2024-12-12 20:54:25 +10:00
faldor20
7eb81fbcf3
drilling into every error type when getting region
2024-12-12 20:54:25 +10:00
faldor20
81f2095e61
basic working
...
compiling, but still missing positions from expression errors
2024-12-12 20:54:25 +10:00
Joshua Warner
6b636d9539
Set up module ids properly
2024-12-09 21:24:10 -08:00
Joshua Warner
6ac6a7c19a
Feedback: dry out term, make fmt_spaces_with_newline_mode more readable, explicitly implement all the variants in ann_lift_spaces
2024-12-05 18:54:25 -08:00
Joshua Warner
8642f8500e
Switch to conservatively checking if the annotation/alias ends in a space before merging
2024-12-05 18:54:24 -08:00
Joshua Warner
e22e37a9c1
Remove accideental dbg!()
2024-12-05 18:54:23 -08:00
Joshua Warner
9a9b96dc69
Fix clippy
2024-12-05 18:54:22 -08:00
Joshua Warner
45424e27fb
Fixup string dollar handling
2024-12-05 18:54:21 -08:00
Joshua Warner
78cda703d9
Fixup negative allowance in calls
2024-12-05 18:54:20 -08:00
Joshua Warner
1be2075e7f
Make sure ext's can't slurp surrounding apply args
2024-12-05 18:54:19 -08:00
Joshua Warner
5c387857ff
Indented seq parsing for imports
2024-12-05 18:54:18 -08:00
Joshua Warner
19f8cc532a
Disallow conditionals after neg/not
2024-12-05 18:54:17 -08:00
Joshua Warner
7eb9909ac5
Make parsing of conditionals consistent between stmts/exprs
2024-12-05 18:54:16 -08:00
Joshua Warner
e47d7924d3
Fix parsing crash with dollar escapes
2024-12-05 18:54:15 -08:00
Joshua Warner
cabe67f88d
Only allow indented else if there's a newline after the else
2024-12-05 18:54:14 -08:00
Joshua Warner
b9862b47dc
Several fixes found in fuzzing
2024-12-05 18:54:03 -08:00
Sam Mohr
de626102c8
Use new try impl for ? operator
2024-12-05 02:13:13 -08:00
Sam Mohr
193c23bac8
Merge pull request #7296 from smores56/proper-try-keyword
...
Proper `try` keyword
2024-12-05 01:38:22 -08:00
Anton-4
7c1dffb777
minor improvements
2024-12-04 14:32:38 +01:00
Sam Mohr
eedade8e81
Initial working version of proper try
keyword
2024-12-04 02:31:59 -08:00
Anthony Bullard
a2083cec30
Parsing support for snake_case identifiers
...
In this initial commit, I have done the following:
- Added unit tests to roc_parse's ident.rs file to cover at least the
simplest Ident enum cases (Tag, OpaqueRef, and simple Access)
- Added '_' as a valid "rest" character in both uppercase and lowercase
identifier parts
- Updated the test_syntax snapshots appropriately
There is still a lot left to do here. Such as:
- Do we want to allow multiple '_'s to parse successfully?
- Handle qualified access
- Handle accessor functions
- Handle record update functions
- Remove the UnderscoreInMiddle case from BadIdent
- Write unit tests for Malformed Idents
I am not a "Rustacean" by any means, but have been through the Book in
years past. Any feedback on the way I wrote the tests or any other part
of the implementation would be very appreciated.
2024-12-03 20:50:47 -06:00
Richard Feldman
12dc39a892
Merge pull request #7293 from roc-lang/drop-dbgs
...
Convert unused dbg!()s to eprintln!()s
2024-12-02 00:34:01 -05:00
Richard Feldman
bc0c9250f9
Convert unused dbg!()s to eprintln!()s
...
This makes it nicer to work with dbg! normally,
because grepping the code base for dbg!() reveals
only the usages of it that are currently active.
2024-12-01 23:10:35 -05:00
Joshua Warner
f7a5f06e5b
Fix a bunch of bugs found in fuzzing
2024-12-01 12:40:19 -08:00
Joshua Warner
5cd38c969f
Fix a couple minor parsing bugs
2024-12-01 12:40:17 -08:00
Joshua Warner
d4301e86a3
Improve parsing of negative + not'd exprs
2024-12-01 12:40:16 -08:00
Joshua Warner
61d885039d
Improve normalization to handle cases found in fuzzing
2024-12-01 12:40:14 -08:00
Joshua Warner
912db1b76b
Fix round-trip parse->fmt->parse for dbg stmts with more than one arg
2024-12-01 12:40:13 -08:00
Joshua Warner
085c5e2fe7
Fix nasty perf bug in parsing types
2024-12-01 12:39:47 -08:00
Anton-4
74d137cad4
Revert "Merge pull request #7267 from joshuawarner32/fuzzing-bugs-2"
...
This reverts commit 364249a29d
, reversing
changes made to 0e550a7f68
.
2024-11-30 18:43:16 +01:00
Joshua Warner
364249a29d
Merge pull request #7267 from joshuawarner32/fuzzing-bugs-2
...
Fix a bunch of parser/formatter bugs found in fuzzing
2024-11-29 17:33:57 -08:00
Joshua Warner
ed62bcc15a
Fix a bunch of parser/formatter bugs found in fuzzing
...
Notably:
* Unified how parens are formatted between (1) when we have a ParensAround, and (2) when we've decided an Apply needs to have parens
* Made unary minus require the be indented to the same level as any other expression continuation. (it used to accidentally have rules meant for binary operators applied)
* Don't apply extra indent to the backpassing continuation in the case that the call does itself require indentation
* Make `try@foo` correctly parse as `try @foo`, so that formatting doesn't change the tree when it adds that space
* Detect more cases where we need to outdent trailing e.g. {} blocks in applies
* Approximately a bagillion other things, 90% of which I added tests for, and none of which affected the formatting of examples or builtins
2024-11-29 16:25:59 -08:00
Richard Feldman
0e550a7f68
Merge pull request #7265 from roc-lang/workspace-deps
...
Update cargo dependencies to use workspace
2024-11-29 17:38:03 -05:00
Luke Boswell
fdaaca8c8b
replace cargo deps with workspace in lower_parms, module, mono, parse, problem, roc_target, serialize, solve, solve_problem, specialize_types, test_*
2024-11-29 11:29:04 +11:00
JRI98
771a34054c
Remove an unused enum and a struct
2024-11-28 20:17:17 +00:00
Agus Zubiaga
1dc9dd0a90
Merge branch 'main' into specialize-exprs
2024-11-27 11:35:14 -03:00
Joshua Warner
b4fdb0a4c2
Make dbg parse strictly as an Apply
...
This is important in order to fix some formatting bugs found in fuzzing
2024-11-24 14:15:29 -08:00