Commit graph

15 commits

Author SHA1 Message Date
Joshua Warner
6d22c4dd7c
Several migration fixes and make some zig parser improvements based on migrated code in the wild (#7716) 2025-04-08 13:46:44 +02:00
Joshua Warner
109cb93b20
Implement a migration to new braces syntax and add migrate tests 2025-02-16 20:37:28 -08:00
Sam Mohr
b8de09d048
Update tests 2025-01-17 19:10:20 -08:00
Anthony Bullard
1b43ffa579
Format all lambdas to new syntax 2025-01-16 08:03:44 -06:00
Joshua Warner
d43ad92789
Introduce proper type for TypeVar's, mark anything not a lowercase ident as malformed 2025-01-14 19:30:33 -08:00
Joshua Warner
b4fa7294c7
Extend test_syntax to check that canonicalization doesn't panic on the input
Importantly, this would have caught the issue discovered in #7279, prior to that landing on main.
2024-12-06 17:13:10 -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
Agus Zubiaga
5d6c47b25f
Update test_syntax snapshot after new Slice debug impl 2024-11-23 11:05:09 -03:00
Richard Feldman
21dd2ad85d
Update parsing snapshot tests 2024-10-21 23:19:25 -04:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Luke Boswell
8d88e3ab7f
update snapshots 2024-04-28 08:47:08 +10:00
Luke Boswell
0a3b9c34b3
add suffixed:u8 to Expr::Var 2024-04-14 13:45:00 +10:00
Ajai Nelson
2e5fef5231
Improve error messages involving ignored variables
Fix #3987
2023-06-06 19:46:15 -04:00
Joshua Warner
3fee0d3e8f
Fix a bunch of bugs in parsing/formatting found by fuzzing 2023-02-07 20:25:56 -08:00
Joshua Warner
a1cd114198
Add a Malformed trait, and assert that 'passing' tests don't produce a malformed result 2023-01-25 21:01:05 -08:00