Commit graph

6652 commits

Author SHA1 Message Date
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
Elias Mulhall
a16f757164 Pass var_store into desugar_expr so that desugaring may generate fresh vars 2024-08-28 11:53:44 -04:00
Elias Mulhall
dc5c8aeaf9 cargo fmt --all 2024-08-28 11:53:44 -04:00
Elias Mulhall
3120a1ea46 Replace panic! with internal_error! 2024-08-28 11:53:44 -04:00
Agus Zubiaga
287a8fa2e7
Merge branch 'main' into lower-module-params 2024-08-28 08:50:40 -03:00
Agus Zubiaga
b2bcf8f988
Restore ErrorType Debug impl 2024-08-27 19:43:33 -03:00
Agus Zubiaga
ad27129fd7
Rename todo with comment 2024-08-27 19:19:30 -03:00
Agus Zubiaga
e4352b913f
Do not remove params from errors in check mode 2024-08-27 19:11:50 -03:00
Agus Zubiaga
d033057a58
Hide params from annotation type mismatches 2024-08-27 19:06:31 -03:00
Agus Zubiaga
a4f4d00ff0
Add unexpected fn params test case 2024-08-27 17:24:13 -03:00
Agus Zubiaga
121a087328
Handle TOO MANY ARGS error for value defs 2024-08-27 17:04:39 -03:00
Agus Zubiaga
658c6963c5
Remove param arguments from TOO MANY ARGS error 2024-08-27 16:08:26 -03:00
Anton-4
ed01e521f0
add roc check tip
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-08-27 20:29:12 +02:00
Agus Zubiaga
8b9cb22f49
Add custom CalledVia for naked param vars 2024-08-27 13:39:20 -03:00
Agus Zubiaga
49a6b1bfba
Capture whole params record when needed 2024-08-27 11:20:59 -03:00
Agus Zubiaga
80770fae11
Handle aliases at call instead 2024-08-27 02:51:23 -03:00
Agus Zubiaga
b70d48fd33
Handle simple params extended def alias 2024-08-27 01:32:08 -03:00
Agus Zubiaga
36df43fadc
Handle simple aliased fn in params value def 2024-08-27 01:27:54 -03:00
Agus Zubiaga
6cffe9b1db
Return params in params_extended_home_symbol 2024-08-27 00:32:35 -03:00
Agus Zubiaga
3c6a2f11d7
Capture params in lowered passed fns from importer side 2024-08-27 00:02:26 -03:00
Agus Zubiaga
b667753a32
Capture import params def 2024-08-26 23:31:42 -03:00
Agus Zubiaga
0bf833dae9
Lower passed imported functions 2024-08-26 23:21:18 -03:00
Agus Zubiaga
2f4e80b696
Gather arities while building can declarations 2024-08-26 22:39:35 -03:00
Agus Zubiaga
4e35a68f98
Do not lower params for check and lang srv 2024-08-26 22:00:25 -03:00
Agus Zubiaga
50f8f2cb1d
Use correct function bodies index 2024-08-26 21:49:56 -03:00
Luke Boswell
6db429ff17
Merge remote-tracking branch 'remote/main' into builtin-task 2024-08-26 05:55:55 +10:00
Brendan Hansknecht
7997cf95e7
ensure alignment is never 0. Must be at least 1. 2024-08-25 11:48:46 -07:00
Luke Boswell
10241b3f98
Merge remote-tracking branch 'remote/main' into builtin-task 2024-08-24 09:53:08 +10:00
Agus Zubiaga
ef2073ba4c
Use var from home_params_argument 2024-08-23 17:11:53 -03:00
Anton-4
44b8abdead
update to basic-cli 0.14 2024-08-23 15:50:05 +02:00
Luke Boswell
d77ce4fe6b
Merge remote-tracking branch 'remote/main' into builtin-task 2024-08-22 10:06:47 +10:00
Agus Zubiaga
be4ebfe901
Lower passed top-level functions in a module with params 2024-08-21 20:07:08 -03:00
Brendan Hansknecht
cf5cd84d60
fix alignment of 16 bytes 2024-08-21 09:04:07 -07:00
Sam Mohr
12df3a04de
Merge attempt 2024-08-19 23:34:05 -07:00
Sam Mohr
7c7485bb04
Merge pull request #7005 from smores56/deprecate-backpassing
Deprecate backpassing to prepare for eventual removal
2024-08-18 08:08:29 -04:00
Agus Zubiaga
0adad85634
Move lower_params/lib to lower_params/lower 2024-08-17 16:23:17 -03:00
Agus Zubiaga
50887e6265
Capture params in nested defs 2024-08-17 16:13:44 -03:00
Agus Zubiaga
c85c634387
Visit all declarations while lowering params 2024-08-17 15:23:28 -03:00
Agus Zubiaga
6588a32195
Visit the whole Expr tree while lowering params 2024-08-17 15:10:54 -03:00
Joshua Warner
6b6968632f
Merge branch 'main' into format-invisible-chars 2024-08-17 10:22:40 -07:00
Agus Zubiaga
bcd8e7e28a
Lower top-level fn calls in home module with params 2024-08-17 13:44:19 -03:00
Agus Zubiaga
07ec24502e
Lower top-level value references in home module with params 2024-08-17 13:25:17 -03:00
Agus Zubiaga
519ff56a85
Create can::module::ModuleParams for convenience 2024-08-17 13:10:37 -03:00
Aidan
ade416dbb4
add test for blank chars in multiline string 2024-08-17 10:28:15 -04:00
Aidan
de6a31263a
DRY up my new normalize code 2024-08-17 10:23:22 -04:00
Agus Zubiaga
e80e3e5b2d
Convert top-level value def to fn taking params 2024-08-17 11:21:21 -03:00
Aidan
aef9d81eaa
simplify StrLiteral::Line to StrLiteral::PlainLine in block strings as well 2024-08-17 10:06:50 -04:00
Aidan
1551d8fb0d
preserve multiline string trailing whitespace 2024-08-17 09:57:59 -04:00
Luke Boswell
5f67ffe21a
update mono snapshots 2024-08-17 17:23:03 +10:00