Skip to content

Conversation

@davydog187
Copy link
Contributor

Summary

  • Implements the Lua 5.3 \z escape sequence in string literals
  • The \z escape skips all following whitespace characters (spaces, tabs, newlines)
  • Allows splitting long string literals across multiple lines cleanly

Changes

  • Added scan_string clause to handle \z escape in lexer
  • Added skip_whitespace_in_string helper to consume whitespace
  • Added comprehensive tests for various whitespace scenarios
  • Removed \z from invalid escape sequence test (now valid)

Test plan

  • All existing tests pass
  • New tests verify \z with spaces, tabs, newlines, and CRLF
  • Edge cases handled correctly (no whitespace after \z)

🤖 Generated with Claude Code

Dave Lucia and others added 3 commits February 10, 2026 20:05
Implements the Lua 5.3 \z escape sequence which skips all following
whitespace characters (spaces, tabs, newlines) in string literals.
This allows splitting long string literals across multiple lines
without including the whitespace in the final string value.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds test verifying that semicolons can be used as field separators
in table constructors, as required by Lua 5.3 test suite.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@davydog187 davydog187 merged commit 5748738 into main Feb 11, 2026
2 checks passed
@davydog187 davydog187 deleted the add-z-escape-sequence branch February 11, 2026 04: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.

1 participant