Commit graph

540 commits

Author SHA1 Message Date
JRI98
de4179d5e1
Remove unused ast::Expr::Expect 2024-11-18 14:13:46 +00:00
Joshua Warner
9ead801536
Remove expect-fx syntax and handling
This was never fully hooked up in platforms, and the plan is to replace the need for this with doing purity-inference on normal `expect` statements.

On the other hand, fuzzing is finding some bugs caused by having a hyphenated keyword, so this is a great time to go ahead and remove it!
2024-11-17 20:25:37 -08:00
Anton-4
19a716b8e9
Merge pull request #7225 from joshuawarner32/fuzzing-bugs
Fix some bugs found via fuzzing
2024-11-16 19:46:12 +01:00
Joshua Warner
550113df67
Fix some bugs found via fuzzing
* Keywords need to still be recognized if they're followed by ',' as well as a bunch of other operator characters. Notably missing from this list is '-', since that would mess up expect-fx currently.
* Smattering of niche cases of formatting bugs (either non-idempotency, leading to different code, or leading to unparsable code)
* One missing indent call in fmt_collection leading to a panic
2024-11-15 21:33:44 -08:00
JRI98
a332acd7bf
Remove unused malformed related variants 2024-11-14 10:23:06 +00:00
Luke Boswell
8a566dc339
WIP 2024-11-11 10:22:58 +11:00
Luke Boswell
c00db6da37
Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-11-04 13:57:51 +11:00
Sam Mohr
308defac46
Implement the try keyword with desugaring 2024-11-01 17:34:11 -07:00
Sam Mohr
6a2ffb2f5a
Implement most of the recent round of PR feedback 2024-10-26 04:17:50 -07:00
Sam Mohr
294f0c0d1f
Merge branch 'main' into return-keyword 2024-10-24 23:01:10 -07:00
Sam Mohr
e9c096088a
Remove unnecessary vec size reservation 2024-10-24 23:00:37 -07:00
Luke Boswell
926014518f
Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-10-24 10:21:08 +11:00
Richard Feldman
8997c80573
Remove deprecated roc_collections::soa things 2024-10-21 23:17:20 -04:00
Richard Feldman
e589923ae8
Make collections::soa use the soa crate 2024-10-21 22:10:43 -04:00
Richard Feldman
b2ea0b842c
Revert "Do some checked SoA stuff"
This reverts commit c79d7745f6eb345fd50a7cb4a2a7dd6fb6f8f1fc.
2024-10-21 22:10:43 -04:00
Richard Feldman
a8d3280b02
Do some checked SoA stuff 2024-10-21 22:10:42 -04:00
Sam Mohr
b3e60f9d3a
Implement return keyword 2024-10-20 08:58:59 -07:00
Anton-4
0659abdc40
cli tests refactoring progress 2024-10-11 20:54:31 +02:00
Luke Boswell
0271f2eeb2
Merge pull request #7151 from hrishisd/deprecate-old-str-interpolation
Remove deprecated string interpolation syntax #7148
2024-10-09 11:21:18 +11:00
hrishisd
cb98c45e88
Remove deprecated string interpolation syntax 2024-10-08 16:31:22 -04:00
Brendan Hansknecht
21e370f41f
minor formatting fixes 2024-10-07 21:16:30 -07:00
Brendan Hansknecht
c61b7bf2a6
Remove requires type from the provides field 2024-10-07 21:16:30 -07:00
Brendan Hansknecht
bdb6651c13
Enable parsing multiple signitures for requires header 2024-10-07 21:16:30 -07:00
Sam Mohr
2da08be8ef
Remove old record builder syntax 2024-09-21 04:44:44 -07:00
Anton-4
4662c82ea8
cleanup pf.Task 2024-09-16 18:12:20 +02:00
snobee
35a0671c52
parse block without indentation after indented else 2024-09-06 14:35:47 -07:00
snobee
a7afac7ac7
Add boolean flag to Expr::If for indented else statement 2024-09-05 16:28:44 -07:00
Anton-4
02cf61f985
Merge pull request #7038 from mulias/expr-dbg
Support `dbg` in expressions
2024-09-02 13:30:32 +02:00
Elias Mulhall
56c5b790a7 Refactor dbg expression parsing to work more like function application
Instead of parsing dbg with an expression block, parse the dbg keyword
with no additional arguments. This way the parser treats dbg just like a
variable in function application. We desugar by pattern matching on
`Apply(Dbg, args, called_via)` nodes. This changes the output of syntax
tests since the initial AST is different, but does not change the output
of can or mono.

Add two new errors for dbg in expression position with either no args or
too many args. This is similar to the error behavior of `crash`.

Continue to parse dbg statements with an expression block, as before.
2024-08-29 15:36:48 -04:00
Elias Mulhall
14fabdff07 Double the amount of indentation allowed in parser trace debugging
Increase from 36 levels of indentation to 80. This is excessive, but
it's confusing to have a parser test crash just because
parse_debug_trace is enabled.
2024-08-29 07:25:42 -04:00
Elias Mulhall
335265e15c Parse dbg in expression position
Add dbg parsing logic everywhere we parse normal expressions. Add
special case to statement parsing to handle a series of statements
ending in a `dbg` in expression position.

Rename existing `dbg_help` function to `dbg_stmt_help`, similarly rename
syntax snapshot test files to specify which ones are for dbg statements.
2024-08-28 11:53:44 -04:00
Elias Mulhall
43d932df3b Update parser AST to support dbg as both a statment and expression
Make `Expr::Dbg` node specific to dbg expressions, add `Expr::DbgStmt`
for dbg statements. Debug expressions don't have a continuation branch.
Support formatting both kinds of `Dbg` nodes.
2024-08-28 11:53:44 -04:00
Sam Mohr
12df3a04de
Merge attempt 2024-08-19 23:34:05 -07:00
Joshua Warner
6b6968632f
Merge branch 'main' into format-invisible-chars 2024-08-17 10:22:40 -07:00
Aidan
de6a31263a
DRY up my new normalize code 2024-08-17 10:23:22 -04:00
Aidan
aef9d81eaa
simplify StrLiteral::Line to StrLiteral::PlainLine in block strings as well 2024-08-17 10:06:50 -04:00
Aidan
b0be698354
simplify StrLiteral::Line to StrLiteral::PlainLine when possible 2024-08-17 01:16:51 -04:00
Sam Mohr
b1a972ab21
Implement &foo record updater syntax sugar 2024-08-16 01:41:59 -07:00
Sam Mohr
0fd0cc11aa
Format code 2024-08-14 22:26:32 -07:00
Sam Mohr
3bc5c1dc12
Combine ! and ? into single TrySuffix AST node 2024-08-14 22:14:08 -07:00
Luke Boswell
a5ae2608ea
fix incorrect name from merge 2024-08-14 09:13:57 +10:00
Luke Boswell
5c43bd2cee
Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-08-14 09:12:12 +10:00
Sam Mohr
db0c49b38f Fix merge issue 2024-08-13 00:30:26 -07:00
Sam Mohr
7e72541a79 Merge branch 'main' into builtin-task 2024-08-12 23:12:38 -07:00
Joshua Warner
2d9aa00771
Rename RemoveSpaces->Normalize 2024-08-12 23:05:55 -07:00
Joshua Warner
6835041a61
Normalize string encoding as part of RemoveSpaces 2024-08-12 23:05:45 -07:00
Agus Zubiaga
b451e69b20
Merge branch 'main' into typecheck-module-params 2024-08-12 22:27:16 -03:00
Joshua Warner
0abea91796
Rename Full -> FullAst 2024-08-10 16:06:01 -07:00
Joshua Warner
d25c048d48
Move Full from fmt to parse and reorganize confusingly-named Module ast type 2024-08-07 23:01:49 -07:00
Agus Zubiaga
762799052e
Merge branch 'main' into typecheck-module-params 2024-08-07 18:55:33 -03:00