Skip to content

support if-local and if-const - #1160

Merged
JohnnyMorganz merged 8 commits into
JohnnyMorganz:mainfrom
annieetang:support_if_local_and_const
Oct 10, 2026
Merged

JohnnyMorganz merged 8 commits into
JohnnyMorganz:mainfrom
annieetang:support_if_local_and_const

Conversation

@annieetang

Copy link
Copy Markdown
Contributor

Adds formatting support for Luau's if local / if const condition bindings and bumps full_moon from 2.2.0 to 3.0.0 to support parsing of this new syntax!

Syntax follows this RFC

To bump full-moon, we'd need to update a lot of places to use Box because it currently won't compile, so happy to put up a separate PR for that if it's helpful

@JohnnyMorganz

Copy link
Copy Markdown
Owner

I've merged a separate bump for full-moon handling the Box stuff. Looks like CI is failing though.

Could you also add some test cases and update the changelog?

@annieetang

Copy link
Copy Markdown
Contributor Author

I've merged a separate bump for full-moon handling the Box stuff. Looks like CI is failing though.

Could you also add some test cases and update the changelog?

sounds good, will do! thanks for updating full-moon

@annieetang annieetang changed the title support if-local and if-const and bump full_moon to 3.0.0 support if-local and if-const Oct 5, 2026
@annieetang

Copy link
Copy Markdown
Contributor Author

I've merged a separate bump for full-moon handling the Box stuff. Looks like CI is failing though.

Could you also add some test cases and update the changelog?

updated!

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.47%. Comparing base (b2adb5e) to head (2bbfd2f).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1160   +/-   ##
=======================================
  Coverage   96.46%   96.47%           
=======================================
  Files          16       16           
  Lines        5065     5129   +64     
=======================================
+ Hits         4886     4948   +62     
- Misses        179      181    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Check for comments after `if` / `elseif`, which would format to `if --commentlocal x`
- Check for comments after `=` sign
- Bug where `elseif local` hanging would go to `elseiflocal`

@JohnnyMorganz JohnnyMorganz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you!

@JohnnyMorganz
JohnnyMorganz enabled auto-merge (squash) October 10, 2026 13:41
@JohnnyMorganz
JohnnyMorganz merged commit 499cfcd into JohnnyMorganz:main Oct 10, 2026
21 checks passed
@annieetang
annieetang deleted the support_if_local_and_const branch October 10, 2026 14:26
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