Skip to content

Support and erase borrow_ expressions#132

Merged
riaqn merged 1 commit intojanefrom
erase-borrow
Apr 7, 2026
Merged

Support and erase borrow_ expressions#132
riaqn merged 1 commit intojanefrom
erase-borrow

Conversation

@riaqn
Copy link
Copy Markdown

@riaqn riaqn commented Mar 18, 2026

Add Pexp_borrow to all three parsers (parser-standard, parser-extended, parser-jane) with the borrow_ keyword. In --erase-jane-syntax mode, Pexp_borrow e is reduced to e. Parenthesization correctly requires simple_expr for borrow_ (unlike stack_ which has a maybe_stack grammar rule allowing constructor application without parens).

Add tests for borrow.ml and borrow-erased.ml.

@riaqn riaqn requested a review from dkalinichenko-js April 1, 2026 08:51
Copy link
Copy Markdown

@dkalinichenko-js dkalinichenko-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really familiar with ocamlformat, but the changes look good to me.

@riaqn riaqn merged commit 99f7b1a into jane Apr 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants