@razdolbai/merls 1.0.0 → 1.0.4

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.
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
- This repository now has an initial Node.js and TypeScript workspace scaffold, a packaged stdio CLI contract, and the MVP LSP feature set. All planned tasks in `PLAN.md` are complete, including the coc.nvim smoke test.
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.
8
8
 
9
9
  ## Goals
10
10
 
@@ -34,7 +34,7 @@ This repository now has an initial Node.js and TypeScript workspace scaffold, a
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.
@@ -94,8 +80,7 @@ If you installed `merls` globally via npm, the `languageserver` shape is:
94
80
  "--stdio"
95
81
  ],
96
82
  "rootPatterns": [
97
- ".git",
98
- "package.json"
83
+ ".git"
99
84
  ],
100
85
  "filetypes": [
101
86
  "asm"
@@ -105,38 +90,14 @@ If you installed `merls` globally via npm, the `languageserver` shape is:
105
90
  }
106
91
  ```
107
92
 
108
- For local development checkouts, an initial example lives in `examples/coc-settings.json`. The current bootstrap flow is:
109
-
110
- 1. run `npm install`
111
- 2. run `npm run build`
112
- 3. point coc.nvim at `dist/src/cli.js --stdio`
113
-
114
- The bundled example uses `node` plus an absolute path to the packaged CLI, passes `--stdio`, uses `package.json` and `.git` as root markers, and currently targets the `asm` filetype.
93
+ An example configuration lives in `examples/coc-settings.json`.
115
94
 
116
95
  ## Development notes
117
96
 
118
97
  - TDD is mandatory for implementation work in this repository.
119
- - Shared 6502 opcode and Merlin directive metadata now lives in `src/asm/metadata.ts`.
120
- - Shared token-kind and line-shape metadata now lives in `src/asm/syntax.ts`.
121
- - The current lexer implementation now lives in `src/asm/lexer.ts` and is exercised against the shared fixture corpus.
122
- - The current expression parser now lives in `src/asm/expression.ts` and covers numeric forms, unary modifiers, arithmetic, and indexed operand fragments.
123
- - The current line parser now lives in `src/asm/parser.ts` and classifies equates, instructions, directives, data lines, and malformed input.
124
- - The current document model now lives in `src/asm/document.ts` and preserves line-by-line structure while collecting malformed-line errors.
125
- - The current symbol collector now lives in `src/asm/symbols.ts` and indexes labels, equates, and named storage/data definitions.
126
- - 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.
127
- - The current workspace indexer now lives in `src/asm/workspace.ts` and follows `asm`/`put`/`use` directives across the local fixture corpus.
128
- - The current diagnostics pass now lives in `src/asm/diagnostics.ts` and reports duplicate symbols, unresolved references, malformed lines, and unsupported 65816-only syntax.
129
- - The current `textDocument/documentSymbol` provider is wired through `src/server.ts` and `src/lsp/document-symbols.ts`.
130
- - The current `workspace/symbol` provider is wired through `src/server.ts` and `src/lsp/workspace-symbols.ts` over the open-document symbol set.
131
- - The current `textDocument/definition` and `textDocument/references` handlers are wired through `src/server.ts` and `src/lsp/symbol-navigation.ts`.
132
- - The current `textDocument/hover` handler is wired through `src/server.ts` and `src/lsp/hover.ts`.
133
- - The current `textDocument/completion` handler is wired through `src/server.ts` and `src/lsp/completion.ts`.
134
- - 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.
135
- - The packaged CLI entrypoint now lives in `src/cli.ts`, compiles to `dist/src/cli.js`, and supports the explicit stdio contract `merls --stdio`.
136
- - The checked-in coc.nvim example now targets `dist/src/cli.js --stdio` and includes root detection for `.git` and `package.json`.
137
- - The positive fixture corpus now starts with transcribed Merlin32 material under `test/fixtures/valid/`.
138
- - Positive fixtures should cover supported 6502 Merlin-style syntax.
139
- - The negative fixture corpus now starts with explicit 65816-only samples under `test/fixtures/invalid/`.
140
- - Negative fixtures should explicitly cover unsupported 65816 syntax.
141
- - The current bootstrap test harness is intentionally minimal and runs against compiled output to avoid depending on editor or browser tooling.
142
- - 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.
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "languageserver": {
3
3
  "merls": {
4
- "command": "node",
4
+ "command": "merls",
5
5
  "args": [
6
- "C:/Users/alexe/Projects/merls/dist/src/cli.js",
7
6
  "--stdio"
8
7
  ],
9
8
  "rootPatterns": [
10
- ".git",
11
- "package.json"
9
+ ".git"
12
10
  ],
13
11
  "filetypes": [
14
12
  "asm"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razdolbai/merls",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "Language server for Merlin-style 6502 assembly.",
5
5
  "type": "commonjs",
6
6
  "bin": {