@razdolbai/merls 1.0.2 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/AGENTS.md +1 -1
  2. package/LICENSE +21 -0
  3. package/README.md +10 -42
  4. package/package.json +2 -1
package/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Project Structure & Module Organization
4
4
 
5
- This repository is in the bootstrap stage. Today, the main documents are `README.md` for scope and `PLAN.md` for the implementation checklist. The planned runtime is Node.js with TypeScript and `vscode-languageserver`.
5
+ This repository has an established baseline. The main document is `README.md` for scope. The runtime is Node.js with TypeScript and `vscode-languageserver`.
6
6
 
7
7
  When the workspace is scaffolded, keep code under `src/`, tests under `test/`, and editor integration examples under `examples/` such as `examples/coc-settings.json`. Store parser fixtures in a dedicated test-fixture area and separate valid 6502 cases from invalid 65816 cases.
8
8
 
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # merls
2
2
 
3
- `merls` is a planned language server for **Merlin-style 6502 assembly** with **coc.nvim** as the primary editor target.
3
+ `merls` is a language server for **Merlin-style 6502 assembly** with **coc.nvim** as the primary editor target.
4
4
 
5
5
  ## Status
6
6
 
7
- The MVP LSP feature set for Merlin-style 6502 assembly is complete and published to npm as `@razdolbai/merls`. It provides core language server features and is ready to be used with editors like `coc.nvim`. All planned tasks in `PLAN.md` have been fulfilled.
7
+ The MVP LSP feature set for Merlin-style 6502 assembly is complete and published to npm as `@razdolbai/merls`. It provides core language server features and is ready to be used with editors like `coc.nvim`.
8
8
 
9
9
  ## Goals
10
10
 
@@ -34,7 +34,7 @@ The MVP LSP feature set for Merlin-style 6502 assembly is complete and published
34
34
  - assembler-backed diagnostics in the first implementation pass
35
35
  - coc.nvim-specific plugin code for the MVP
36
36
 
37
- ## Planned implementation
37
+ ## Implementation
38
38
 
39
39
  - **runtime:** Node.js
40
40
  - **language:** TypeScript
@@ -64,21 +64,7 @@ The packaged CLI entrypoint now lives at `dist/src/cli.js`.
64
64
 
65
65
  The supported stdio launch contract is `merls --stdio`.
66
66
 
67
- For local development from this checkout, the equivalent compiled command is `node dist/src/cli.js --stdio`.
68
-
69
- ## Roadmap
70
-
71
- The current plan is organized into these phases:
72
-
73
- 1. bootstrap the Node/TypeScript workspace
74
- 2. define the 6502 Merlin syntax corpus and shared metadata
75
- 3. implement the lexer, parser, and document model
76
- 4. implement symbols, include handling, and diagnostics
77
- 5. add the MVP LSP features
78
- 6. package and verify coc.nvim integration
79
-
80
- See `PLAN.md` for the full checklist.
81
-
67
+
82
68
  ## coc.nvim target
83
69
 
84
70
  The intended integration model is a standard `languageserver` entry in `coc-settings.json` that launches `merls` over stdio.
@@ -109,27 +95,9 @@ An example configuration lives in `examples/coc-settings.json`.
109
95
  ## Development notes
110
96
 
111
97
  - TDD is mandatory for implementation work in this repository.
112
- - Shared 6502 opcode and Merlin directive metadata now lives in `src/asm/metadata.ts`.
113
- - Shared token-kind and line-shape metadata now lives in `src/asm/syntax.ts`.
114
- - The current lexer implementation now lives in `src/asm/lexer.ts` and is exercised against the shared fixture corpus.
115
- - The current expression parser now lives in `src/asm/expression.ts` and covers numeric forms, unary modifiers, arithmetic, and indexed operand fragments.
116
- - The current line parser now lives in `src/asm/parser.ts` and classifies equates, instructions, directives, data lines, and malformed input.
117
- - The current document model now lives in `src/asm/document.ts` and preserves line-by-line structure while collecting malformed-line errors.
118
- - The current symbol collector now lives in `src/asm/symbols.ts` and indexes labels, equates, and named storage/data definitions.
119
- - The current local-label resolver now lives in `src/asm/local-labels.ts` and resolves Merlin `]local` and `:local` labels within the nearest global-label scope.
120
- - The current workspace indexer now lives in `src/asm/workspace.ts` and follows `asm`/`put`/`use` directives across the local fixture corpus.
121
- - The current diagnostics pass now lives in `src/asm/diagnostics.ts` and reports duplicate symbols, unresolved references, malformed lines, and unsupported 65816-only syntax.
122
- - The current `textDocument/documentSymbol` provider is wired through `src/server.ts` and `src/lsp/document-symbols.ts`.
123
- - The current `workspace/symbol` provider is wired through `src/server.ts` and `src/lsp/workspace-symbols.ts` over the open-document symbol set.
124
- - The current `textDocument/definition` and `textDocument/references` handlers are wired through `src/server.ts` and `src/lsp/symbol-navigation.ts`.
125
- - The current `textDocument/hover` handler is wired through `src/server.ts` and `src/lsp/hover.ts`.
126
- - The current `textDocument/completion` handler is wired through `src/server.ts` and `src/lsp/completion.ts`.
127
- - The current `textDocument/publishDiagnostics` path is wired through `src/server.ts` and `src/lsp/diagnostics.ts`, with full-document sync on open and change so coc.nvim receives live parser and resolver errors.
128
- - The packaged CLI entrypoint now lives in `src/cli.ts`, compiles to `dist/src/cli.js`, and supports the explicit stdio contract `merls --stdio`.
129
- - The checked-in coc.nvim example targets the globally installed `merls` command and includes root detection for `.git`.
130
- - The positive fixture corpus now starts with transcribed Merlin32 material under `test/fixtures/valid/`.
131
- - Positive fixtures should cover supported 6502 Merlin-style syntax.
132
- - The negative fixture corpus now starts with explicit 65816-only samples under `test/fixtures/invalid/`.
133
- - Negative fixtures should explicitly cover unsupported 65816 syntax.
134
- - The current bootstrap test harness is intentionally minimal and runs against compiled output to avoid depending on editor or browser tooling.
135
- - The current integration coverage reaches through stdio `initialize`, the packaged CLI contract, completion, hover, symbol navigation, and diagnostics publication.
98
+ - Core syntax, parsing, and document model logic is located in `src/asm/`.
99
+ - LSP handlers (hover, completion, diagnostics, etc.) are located in `src/lsp/`.
100
+ - The CLI entrypoint lives in `src/cli.ts` and compiles to `dist/src/cli.js`.
101
+ - The `test/fixtures/valid/` directory contains supported 6502 Merlin-style syntax samples.
102
+ - The `test/fixtures/invalid/` directory contains unsupported 65816-only syntax samples for negative testing.
103
+ - The integration test suite covers stdio `initialize`, the CLI contract, and core LSP features.
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@razdolbai/merls",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Language server for Merlin-style 6502 assembly.",
5
+ "license": "MIT",
5
6
  "type": "commonjs",
6
7
  "bin": {
7
8
  "merls": "dist/src/cli.js"