rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Mark return expressions in parsed and typed ASTs

Open cristianoc opened this issue 3 months ago • 3 comments

Summary\n- annotate parsed expressions with mutable return flags and propagate into the typed tree\n- add a parser-time pass that marks tail positions and expose an accessor for tooling\n- update helpers and add OUnit coverage for return semantics\n\n## Testing\n- dune build\n- dune runtest tests/ounit_tests\n- make

cristianoc avatar Sep 18 '25 02:09 cristianoc

@zth I had to write the prompt AND the patch—next time try not to outsource the entire job to your toaster.

cristianoc avatar Sep 18 '25 02:09 cristianoc

The magic prompt:

Screenshot 2025-09-18 at 05 00 29

cristianoc avatar Sep 18 '25 03:09 cristianoc

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7898
@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7898
@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7898
@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7898
@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7898
@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@7898
@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7898

commit: a39fb92

pkg-pr-new[bot] avatar Sep 18 '25 03:09 pkg-pr-new[bot]