Skip to content

Update 20260528#138

Merged
myfreess merged 5 commits into
masterfrom
update-20260528
May 28, 2026
Merged

Update 20260528#138
myfreess merged 5 commits into
masterfrom
update-20260528

Conversation

@myfreess

@myfreess myfreess commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Changes

This update syncs a batch of MoonBit syntax, lexer, and parser changes, and refreshes the corresponding sync test snapshots.

  • Bump the package version from 0.3.2 to 0.3.3.
  • Rework source scanning inside string interpolation. The lexer now handles nested {} inside interpolation expressions, string/char/byte-string/regex-string atoms, and reports clearer lexical errors for unsupported interpolation contents such as comments, multiline strings, and attributes.
  • Update both the yacc parser and the handrolled parser:
    • Trait method declarations now support a fn header with optional type parameters.
    • impl ... with method definitions now accept an optional fn prefix.
    • <+ template writing is parsed as a postfix expression instead of being limited to left-values in statement parsing. The RHS handling is unified for normal strings, interpolated strings, and multiline string templates.
  • Regenerate yacc_parser/parser.mbt and yacc_parser/parser.mbt.map.json.
  • Refresh sync tests and snapshots. This adds/enables coverage for cases such as bytes_range_equal, utf_conversion, try_expr_catch_bang, postfix_catch_all, string_interp_boundary_scanning, string_or_pattern_fastpath, and templated_writing_lambda, while removing or replacing a batch of older pipeline snapshots.

@myfreess myfreess merged commit de2a53c into master May 28, 2026
1 check 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.

1 participant