Fix LSP false errors on macro parameter references #19

Merged
bcox merged 2 commits from fix/lsp-macro-params into main 2026-03-29 17:50:39 +00:00
Owner

Summary

  • Fixes #1: The LSP no longer reports \param references inside macro bodies as "unexpected character" errors. The fix replaces \param with a valid placeholder before tokenizing macro body lines, mirroring how the assembler expands macros at the text level before the lexer sees them.
  • Adds just vsix recipe to package the VS Code extension as a .vsix file.

Test plan

  • All 86 asm7 tests pass
  • All 14 lsp7 tests pass (5 new tests for macro param replacement)
  • just vsix produces a valid .vsix package
  • Open a file with macro definitions in VS Code and verify no false diagnostics on \param lines

🤖 Generated with Claude Code

## Summary - **Fixes #1**: The LSP no longer reports `\param` references inside macro bodies as "unexpected character" errors. The fix replaces `\param` with a valid placeholder before tokenizing macro body lines, mirroring how the assembler expands macros at the text level before the lexer sees them. - Adds `just vsix` recipe to package the VS Code extension as a `.vsix` file. ## Test plan - [x] All 86 asm7 tests pass - [x] All 14 lsp7 tests pass (5 new tests for macro param replacement) - [x] `just vsix` produces a valid .vsix package - [ ] Open a file with macro definitions in VS Code and verify no false diagnostics on `\param` lines 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The LSP reuses the assembler's lexer, which doesn't recognize \param
syntax — the assembler expands macros at the text level before
tokenization. The LSP now tracks macro body boundaries and replaces
\param references with a valid placeholder before tokenizing, preventing
spurious "unexpected character" diagnostics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add "just vsix" recipe to package the VS Code extension
All checks were successful
PR Check / build-rpm (pull_request) Successful in 13m5s
38c3b589c3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bcox merged commit 0d00b9fe5a into main 2026-03-29 17:50:39 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bcox/sbc7!19
No description provided.