Skip to content

parser: allow Rust-style short returns#239

Merged
mbenke merged 1 commit into
mainfrom
mbenke/rust-returns
Jan 13, 2026
Merged

parser: allow Rust-style short returns#239
mbenke merged 1 commit into
mainfrom
mbenke/rust-returns

Conversation

@mbenke

@mbenke mbenke commented Oct 15, 2025

Copy link
Copy Markdown
Collaborator

Allow shorthand syntax for simple functions:

  • e.g. function d(x) { 2*x }
  • If a function body consists of a single expression, return its value.

@rodrigogribeiro rodrigogribeiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great! Thanks!

@mbenke mbenke merged commit 305a4e7 into main Jan 13, 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