@words-lang/parser 0.1.0

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 (41) hide show
  1. package/dist/analyser/analyser.d.ts +106 -0
  2. package/dist/analyser/analyser.d.ts.map +1 -0
  3. package/dist/analyser/analyser.js +291 -0
  4. package/dist/analyser/analyser.js.map +1 -0
  5. package/dist/analyser/diagnostics.d.ts +166 -0
  6. package/dist/analyser/diagnostics.d.ts.map +1 -0
  7. package/dist/analyser/diagnostics.js +139 -0
  8. package/dist/analyser/diagnostics.js.map +1 -0
  9. package/dist/analyser/workspace.d.ts +198 -0
  10. package/dist/analyser/workspace.d.ts.map +1 -0
  11. package/dist/analyser/workspace.js +403 -0
  12. package/dist/analyser/workspace.js.map +1 -0
  13. package/dist/index.d.ts +8 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +31 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/lexer/lexer.d.ts +120 -0
  18. package/dist/lexer/lexer.d.ts.map +1 -0
  19. package/dist/lexer/lexer.js +365 -0
  20. package/dist/lexer/lexer.js.map +1 -0
  21. package/dist/lexer/token.d.ts +247 -0
  22. package/dist/lexer/token.d.ts.map +1 -0
  23. package/dist/lexer/token.js +250 -0
  24. package/dist/lexer/token.js.map +1 -0
  25. package/dist/parser/ast.d.ts +685 -0
  26. package/dist/parser/ast.d.ts.map +1 -0
  27. package/dist/parser/ast.js +3 -0
  28. package/dist/parser/ast.js.map +1 -0
  29. package/dist/parser/parser.d.ts +411 -0
  30. package/dist/parser/parser.d.ts.map +1 -0
  31. package/dist/parser/parser.js +1600 -0
  32. package/dist/parser/parser.js.map +1 -0
  33. package/package.json +23 -0
  34. package/src/analyser/analyser.ts +403 -0
  35. package/src/analyser/diagnostics.ts +232 -0
  36. package/src/analyser/workspace.ts +457 -0
  37. package/src/index.ts +7 -0
  38. package/src/lexer/lexer.ts +379 -0
  39. package/src/lexer/token.ts +331 -0
  40. package/src/parser/ast.ts +798 -0
  41. package/src/parser/parser.ts +1815 -0
@@ -0,0 +1,106 @@
1
+ /**
2
+ * analyser.ts
3
+ *
4
+ * The WORDS semantic analyser. Walks the Workspace index and validates the
5
+ * rules that cannot be checked by the parser alone — rules that require
6
+ * cross-file knowledge of the full project.
7
+ *
8
+ * The analyser never reads files. It works entirely from the Workspace index
9
+ * built by `Workspace.load()`. All diagnostics are collected and returned
10
+ * as an array — nothing is thrown.
11
+ *
12
+ * Rules validated (first milestone):
13
+ *
14
+ * A001 — Every module listed in system.modules has a ModuleNode definition.
15
+ * A002 — Every state referenced in a when rule exists as a StateNode.
16
+ * A003 — Every context referenced in a when rule exists as a ContextNode.
17
+ * A004 — Every context in a state's returns has a when rule in the process.
18
+ * A005 — Every state defined is reachable (referenced in a when rule or start).
19
+ * A006 — state.return(x) in a screen references a context in the state's returns.
20
+ * A007 — The module ownership declaration matches the construct's declared module.
21
+ */
22
+ import { Workspace } from './workspace';
23
+ import { Diagnostic } from './diagnostics';
24
+ /**
25
+ * The value returned by `Analyser.analyse()`.
26
+ * Contains all semantic diagnostics collected across the project, annotated
27
+ * with the file path that produced each one.
28
+ */
29
+ export interface AnalysisResult {
30
+ diagnostics: Array<{
31
+ filePath: string;
32
+ diagnostic: Diagnostic;
33
+ }>;
34
+ }
35
+ export declare class Analyser {
36
+ private workspace;
37
+ private diagnostics;
38
+ constructor(workspace: Workspace);
39
+ /**
40
+ * Runs all validation rules over the workspace index and returns the
41
+ * collected diagnostics. Never throws.
42
+ */
43
+ analyse(): AnalysisResult;
44
+ /**
45
+ * Every module listed in system.modules must have a corresponding ModuleNode.
46
+ * Reports on the system file using the module name token position.
47
+ */
48
+ private checkSystemModules;
49
+ /**
50
+ * For every when rule in every process:
51
+ * - The currentState must exist as a StateNode in the same module (A002)
52
+ * - The nextState must exist as a StateNode in the same module (A002)
53
+ * - The producedContext must exist as a ContextNode in the same module (A003)
54
+ */
55
+ private checkProcessRules;
56
+ /**
57
+ * For every state, every context listed in its returns clause must have
58
+ * a corresponding when rule in at least one of the module's processes.
59
+ */
60
+ private checkStateReturns;
61
+ /**
62
+ * Every state defined in a module must be either:
63
+ * - The module's start state, or
64
+ * - Referenced as the nextState in at least one when rule.
65
+ *
66
+ * States that are only currentState in when rules but never entered are
67
+ * considered unreachable entry points.
68
+ */
69
+ private checkStateReachability;
70
+ /**
71
+ * For every screen, for every state.return(contextName) call found in its
72
+ * uses tree, the contextName must appear in the enclosing state's returns.
73
+ *
74
+ * To find the enclosing state we look up which state uses this screen.
75
+ */
76
+ private checkScreenStateReturns;
77
+ /**
78
+ * Recursively walks a uses tree and validates every state.return() call.
79
+ */
80
+ private checkStateReturnsInUses;
81
+ /**
82
+ * Checks arguments for block expressions containing state.return() calls.
83
+ */
84
+ private checkStateReturnsInArgs;
85
+ /**
86
+ * For every file with an ownerModule declaration, every construct in that
87
+ * file must have its module field matching the ownerModule.
88
+ * (The module field is filled in by the Workspace during indexing.)
89
+ */
90
+ private checkOwnershipDeclarations;
91
+ /**
92
+ * Extracts all context names from a state's returns clause,
93
+ * handling both simple and expanded forms.
94
+ */
95
+ private extractReturnedContexts;
96
+ /**
97
+ * Finds the StateNode in `moduleName` that uses the given screen.
98
+ * Returns null if no state in the module uses this screen.
99
+ */
100
+ private findStateUsingScreen;
101
+ /**
102
+ * Emits a diagnostic at the position of the given token.
103
+ */
104
+ private report;
105
+ }
106
+ //# sourceMappingURL=analyser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyser.d.ts","sourceRoot":"","sources":["../../src/analyser/analyser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EACH,UAAU,EAIb,MAAM,eAAe,CAAA;AActB;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE,CAAC,CAAA;CACnE;AAID,qBAAa,QAAQ;IACjB,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,WAAW,CAA0D;gBAEjE,SAAS,EAAE,SAAS;IAMhC;;;OAGG;IACH,OAAO,IAAI,cAAc;IAezB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA4CzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmCzB;;;;;;;OAOG;IACH,OAAO,CAAC,sBAAsB;IAyC9B;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IAkB/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAkB/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA2B/B;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAsBlC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAc/B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;OAEG;IACH,OAAO,CAAC,MAAM;CAYjB"}
@@ -0,0 +1,291 @@
1
+ "use strict";
2
+ /**
3
+ * analyser.ts
4
+ *
5
+ * The WORDS semantic analyser. Walks the Workspace index and validates the
6
+ * rules that cannot be checked by the parser alone — rules that require
7
+ * cross-file knowledge of the full project.
8
+ *
9
+ * The analyser never reads files. It works entirely from the Workspace index
10
+ * built by `Workspace.load()`. All diagnostics are collected and returned
11
+ * as an array — nothing is thrown.
12
+ *
13
+ * Rules validated (first milestone):
14
+ *
15
+ * A001 — Every module listed in system.modules has a ModuleNode definition.
16
+ * A002 — Every state referenced in a when rule exists as a StateNode.
17
+ * A003 — Every context referenced in a when rule exists as a ContextNode.
18
+ * A004 — Every context in a state's returns has a when rule in the process.
19
+ * A005 — Every state defined is reachable (referenced in a when rule or start).
20
+ * A006 — state.return(x) in a screen references a context in the state's returns.
21
+ * A007 — The module ownership declaration matches the construct's declared module.
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.Analyser = void 0;
25
+ const diagnostics_1 = require("./diagnostics");
26
+ // ── Analyser ──────────────────────────────────────────────────────────────────
27
+ class Analyser {
28
+ constructor(workspace) {
29
+ this.diagnostics = [];
30
+ this.workspace = workspace;
31
+ }
32
+ // ── Public API ─────────────────────────────────────────────────────────────
33
+ /**
34
+ * Runs all validation rules over the workspace index and returns the
35
+ * collected diagnostics. Never throws.
36
+ */
37
+ analyse() {
38
+ this.diagnostics = [];
39
+ this.checkSystemModules();
40
+ this.checkProcessRules();
41
+ this.checkStateReturns();
42
+ this.checkStateReachability();
43
+ this.checkScreenStateReturns();
44
+ this.checkOwnershipDeclarations();
45
+ return { diagnostics: this.diagnostics };
46
+ }
47
+ // ── Rule A001 — System modules have definitions ────────────────────────────
48
+ /**
49
+ * Every module listed in system.modules must have a corresponding ModuleNode.
50
+ * Reports on the system file using the module name token position.
51
+ */
52
+ checkSystemModules() {
53
+ const { system, systemFilePath } = this.workspace;
54
+ if (!system || !systemFilePath)
55
+ return;
56
+ for (const moduleName of system.modules) {
57
+ if (!this.workspace.modules.has(moduleName)) {
58
+ this.report(systemFilePath, diagnostics_1.DiagnosticCode.A_UNDEFINED_MODULE, `Module '${moduleName}' is listed in the system but has no definition`, system.token);
59
+ }
60
+ }
61
+ }
62
+ // ── Rules A002 + A003 — Process when rules reference valid constructs ───────
63
+ /**
64
+ * For every when rule in every process:
65
+ * - The currentState must exist as a StateNode in the same module (A002)
66
+ * - The nextState must exist as a StateNode in the same module (A002)
67
+ * - The producedContext must exist as a ContextNode in the same module (A003)
68
+ */
69
+ checkProcessRules() {
70
+ for (const [moduleName, moduleNode] of this.workspace.modules) {
71
+ const filePath = this.workspace.modulePaths.get(moduleName);
72
+ if (!filePath)
73
+ continue;
74
+ for (const process of moduleNode.processes) {
75
+ for (const rule of process.rules) {
76
+ // Check currentState exists
77
+ if (!this.workspace.getState(moduleName, rule.currentState)) {
78
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_UNDEFINED_STATE, `State '${rule.currentState}' referenced in process '${process.name}' is not defined in module '${moduleName}'`, rule.token);
79
+ }
80
+ // Check nextState exists
81
+ if (!this.workspace.getState(moduleName, rule.nextState)) {
82
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_UNDEFINED_STATE, `State '${rule.nextState}' referenced in process '${process.name}' is not defined in module '${moduleName}'`, rule.token);
83
+ }
84
+ // Check producedContext exists
85
+ if (!this.workspace.getContext(moduleName, rule.producedContext)) {
86
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_UNDEFINED_CONTEXT, `Context '${rule.producedContext}' referenced in process '${process.name}' is not defined in module '${moduleName}'`, rule.token);
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ // ── Rule A004 — Every returned context has a when rule ─────────────────────
93
+ /**
94
+ * For every state, every context listed in its returns clause must have
95
+ * a corresponding when rule in at least one of the module's processes.
96
+ */
97
+ checkStateReturns() {
98
+ for (const [moduleName, stateMap] of this.workspace.states) {
99
+ const moduleNode = this.workspace.modules.get(moduleName);
100
+ if (!moduleNode)
101
+ continue;
102
+ // Build a set of all (currentState, producedContext) pairs covered by when rules
103
+ const coveredReturns = new Set();
104
+ for (const process of moduleNode.processes) {
105
+ for (const rule of process.rules) {
106
+ coveredReturns.add(`${rule.currentState}::${rule.producedContext}`);
107
+ }
108
+ }
109
+ for (const [stateName, stateNode] of stateMap) {
110
+ const filePath = this.workspace.constructPaths.get(`${moduleName}/${stateName}`);
111
+ if (!filePath)
112
+ continue;
113
+ const returnedContexts = this.extractReturnedContexts(stateNode);
114
+ for (const contextName of returnedContexts) {
115
+ if (!coveredReturns.has(`${stateName}::${contextName}`)) {
116
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_UNHANDLED_RETURN, `Context '${contextName}' is listed in state '${stateName}' returns but has no corresponding when rule in module '${moduleName}'`, stateNode.token);
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ // ── Rule A005 — Every state is reachable ───────────────────────────────────
123
+ /**
124
+ * Every state defined in a module must be either:
125
+ * - The module's start state, or
126
+ * - Referenced as the nextState in at least one when rule.
127
+ *
128
+ * States that are only currentState in when rules but never entered are
129
+ * considered unreachable entry points.
130
+ */
131
+ checkStateReachability() {
132
+ for (const [moduleName, stateMap] of this.workspace.states) {
133
+ const moduleNode = this.workspace.modules.get(moduleName);
134
+ if (!moduleNode)
135
+ continue;
136
+ // Collect all states that are entered (nextState in any when rule or start)
137
+ const reachable = new Set();
138
+ if (moduleNode.startState) {
139
+ reachable.add(moduleNode.startState);
140
+ }
141
+ for (const process of moduleNode.processes) {
142
+ for (const rule of process.rules) {
143
+ reachable.add(rule.nextState);
144
+ }
145
+ }
146
+ // Also collect all states referenced in implements branches
147
+ for (const impl of moduleNode.implements) {
148
+ for (const branch of impl.branches) {
149
+ reachable.add(branch.targetState);
150
+ }
151
+ }
152
+ for (const [stateName] of stateMap) {
153
+ if (!reachable.has(stateName)) {
154
+ const filePath = this.workspace.constructPaths.get(`${moduleName}/${stateName}`);
155
+ if (!filePath)
156
+ continue;
157
+ const stateNode = stateMap.get(stateName);
158
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_UNREACHABLE_STATE, `State '${stateName}' in module '${moduleName}' is never entered — it is not the start state and no when rule transitions into it`, stateNode.token);
159
+ }
160
+ }
161
+ }
162
+ }
163
+ // ── Rule A006 — state.return() references valid contexts ──────────────────
164
+ /**
165
+ * For every screen, for every state.return(contextName) call found in its
166
+ * uses tree, the contextName must appear in the enclosing state's returns.
167
+ *
168
+ * To find the enclosing state we look up which state uses this screen.
169
+ */
170
+ checkScreenStateReturns() {
171
+ for (const [moduleName, screenMap] of this.workspace.screens) {
172
+ for (const [screenName, screenNode] of screenMap) {
173
+ const filePath = this.workspace.constructPaths.get(`${moduleName}/${screenName}`);
174
+ if (!filePath)
175
+ continue;
176
+ // Find the state that uses this screen
177
+ const enclosingState = this.findStateUsingScreen(moduleName, screenName);
178
+ if (!enclosingState)
179
+ continue;
180
+ const validReturns = new Set(this.extractReturnedContexts(enclosingState));
181
+ // Walk the screen's uses tree and check every state.return()
182
+ this.checkStateReturnsInUses(screenNode.uses, validReturns, filePath, screenNode);
183
+ }
184
+ }
185
+ }
186
+ /**
187
+ * Recursively walks a uses tree and validates every state.return() call.
188
+ */
189
+ checkStateReturnsInUses(uses, validReturns, filePath, screenNode) {
190
+ for (const entry of uses) {
191
+ if (entry.kind === 'ComponentUse') {
192
+ this.checkStateReturnsInArgs(entry.args, validReturns, filePath);
193
+ this.checkStateReturnsInUses(entry.uses, validReturns, filePath, screenNode);
194
+ }
195
+ else if (entry.kind === 'ConditionalBlock') {
196
+ this.checkStateReturnsInUses(entry.body, validReturns, filePath, screenNode);
197
+ }
198
+ else if (entry.kind === 'IterationBlock') {
199
+ this.checkStateReturnsInUses(entry.body, validReturns, filePath, screenNode);
200
+ }
201
+ }
202
+ }
203
+ /**
204
+ * Checks arguments for block expressions containing state.return() calls.
205
+ */
206
+ checkStateReturnsInArgs(args, validReturns, filePath) {
207
+ for (const arg of args) {
208
+ if (arg.value.kind === 'BlockExpression') {
209
+ const block = arg.value;
210
+ for (const stmt of block.statements) {
211
+ if (stmt.kind === 'StateReturnStatement') {
212
+ const returnStmt = stmt;
213
+ if (!validReturns.has(returnStmt.contextName)) {
214
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_INVALID_STATE_RETURN, `state.return('${returnStmt.contextName}') does not match any context in the enclosing state's returns clause`, returnStmt.token);
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ // ── Rule A007 — Ownership declarations match construct modules ─────────────
222
+ /**
223
+ * For every file with an ownerModule declaration, every construct in that
224
+ * file must have its module field matching the ownerModule.
225
+ * (The module field is filled in by the Workspace during indexing.)
226
+ */
227
+ checkOwnershipDeclarations() {
228
+ for (const [filePath, record] of this.workspace.files) {
229
+ const doc = record.parseResult.document;
230
+ if (!doc.ownerModule)
231
+ continue;
232
+ for (const node of doc.nodes) {
233
+ if (!('module' in node))
234
+ continue;
235
+ const nodeModule = node.module;
236
+ if (nodeModule && nodeModule !== doc.ownerModule) {
237
+ this.report(filePath, diagnostics_1.DiagnosticCode.A_MODULE_MISMATCH, `Construct declares module '${nodeModule}' but the ownership declaration says '${doc.ownerModule}'`, node.token);
238
+ }
239
+ }
240
+ }
241
+ }
242
+ // ── Private helpers ────────────────────────────────────────────────────────
243
+ /**
244
+ * Extracts all context names from a state's returns clause,
245
+ * handling both simple and expanded forms.
246
+ */
247
+ extractReturnedContexts(stateNode) {
248
+ if (!stateNode.returns)
249
+ return [];
250
+ if (stateNode.returns.kind === 'SimpleReturns') {
251
+ return stateNode.returns.contexts;
252
+ }
253
+ if (stateNode.returns.kind === 'ExpandedReturns') {
254
+ return stateNode.returns.entries.map(e => e.contextName);
255
+ }
256
+ return [];
257
+ }
258
+ /**
259
+ * Finds the StateNode in `moduleName` that uses the given screen.
260
+ * Returns null if no state in the module uses this screen.
261
+ */
262
+ findStateUsingScreen(moduleName, screenName) {
263
+ const stateMap = this.workspace.states.get(moduleName);
264
+ if (!stateMap)
265
+ return null;
266
+ for (const [, stateNode] of stateMap) {
267
+ for (const entry of stateNode.uses) {
268
+ if (entry.kind === 'ComponentUse' &&
269
+ entry.componentKind === 'screen' &&
270
+ (entry.name.parts.length === 1
271
+ ? entry.name.parts[0] === screenName
272
+ : entry.name.parts[entry.name.parts.length - 1] === screenName)) {
273
+ return stateNode;
274
+ }
275
+ }
276
+ }
277
+ return null;
278
+ }
279
+ /**
280
+ * Emits a diagnostic at the position of the given token.
281
+ */
282
+ report(filePath, code, message, token) {
283
+ const range = (0, diagnostics_1.rangeFromToken)(token.line, token.column, token.value.length || 1);
284
+ this.diagnostics.push({
285
+ filePath,
286
+ diagnostic: (0, diagnostics_1.analyserDiagnostic)(code, message, 'error', range),
287
+ });
288
+ }
289
+ }
290
+ exports.Analyser = Analyser;
291
+ //# sourceMappingURL=analyser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyser.js","sourceRoot":"","sources":["../../src/analyser/anal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CAAC,CAAA;QACtD,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAA;QAE1B,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,QAAQ,EAAE,CAAC;YACnC,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;gBACjC,IACI,KAAK,CAAC,IAAI,KAAK,cAAc;oBAC7B,KAAK,CAAC,aAAa,KAAK,QAAQ;oBAChC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;wBAC1B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU;wBACpC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,UAAU,CAAC,EACrE,CAAC;oBACC,OAAO,SAAS,CAAA;gBACpB,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAA;IACf,CAAC;IAED;;OAEG;IACK,MAAM,CACV,QAAgB,EAChB,IAAoB,EACpB,OAAe,EACf,KAAsD;QAEtD,MAAM,KAAK,GAAG,IAAA,4BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAA;QAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YAClB,QAAQ;YACR,UAAU,EAAE,IAAA,gCAAkB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC;SAChE,CAAC,CAAA;IACN,CAAC;CACJ;AA7VD,4BA6VC"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * diagnostics.ts
3
+ *
4
+ * Defines the Diagnostic type returned by the parser and analyser.
5
+ * Diagnostics are never thrown — they are collected and returned alongside
6
+ * the AST so the caller always receives the fullest possible picture of
7
+ * what the source contains, even when it is malformed.
8
+ *
9
+ * The LSP server maps these directly to VS Code diagnostics, using the
10
+ * `range` to underline the offending token in the editor.
11
+ */
12
+ /**
13
+ * The severity of a diagnostic.
14
+ *
15
+ * `error` — the source is invalid and cannot produce a correct implementation.
16
+ * e.g. a `when` rule referencing a state that has no definition.
17
+ * `warning` — the source is valid but likely wrong or incomplete.
18
+ * e.g. a process narrative omitted where one is strongly recommended.
19
+ * `hint` — a stylistic or structural suggestion.
20
+ * e.g. a module with no description.
21
+ */
22
+ export type DiagnosticSeverity = 'error' | 'warning' | 'hint';
23
+ /**
24
+ * A zero-based line and character position in the source.
25
+ * Matches the LSP `Position` type so diagnostics can be forwarded
26
+ * to VS Code without translation.
27
+ */
28
+ export interface Position {
29
+ /** Zero-based line number. */
30
+ line: number;
31
+ /** Zero-based character offset within the line. */
32
+ character: number;
33
+ }
34
+ /**
35
+ * A start-inclusive, end-exclusive range in the source.
36
+ * Matches the LSP `Range` type.
37
+ */
38
+ export interface Range {
39
+ start: Position;
40
+ end: Position;
41
+ }
42
+ /**
43
+ * Every diagnostic code the parser and analyser can produce.
44
+ * Codes are namespaced by layer:
45
+ * P_* — parse errors (structural / syntactic problems)
46
+ * A_* — analyser errors (semantic problems)
47
+ * W_* — warnings
48
+ * H_* — hints
49
+ */
50
+ export declare enum DiagnosticCode {
51
+ /** An unexpected token was encountered where a specific token was required. */
52
+ P_UNEXPECTED_TOKEN = "P001",
53
+ /** The source ended before the construct was complete. */
54
+ P_UNEXPECTED_EOF = "P002",
55
+ /** An opening `(` was not matched by a closing `)`. */
56
+ P_UNCLOSED_PAREN = "P003",
57
+ /** A string literal was opened with `"` but never closed. */
58
+ P_UNCLOSED_STRING = "P004",
59
+ /** A construct keyword was found in a position where it is not valid. */
60
+ P_INVALID_CONSTRUCT_POSITION = "P005",
61
+ /** A `when` rule is missing its `enter` clause. */
62
+ P_MISSING_ENTER = "P006",
63
+ /** A `when` rule is missing its `returns` clause. */
64
+ P_MISSING_RETURNS = "P007",
65
+ /** A type annotation `(Type)` was expected but not found. */
66
+ P_MISSING_TYPE = "P008",
67
+ /** An identifier (PascalCase or camelCase) was expected but not found. */
68
+ P_MISSING_IDENTIFIER = "P009",
69
+ /** An `is` keyword was expected in an argument assignment but not found. */
70
+ P_MISSING_IS = "P010",
71
+ /**
72
+ * A state referenced in a `when` rule or `start` declaration has no
73
+ * corresponding state definition in the module's directory.
74
+ */
75
+ A_UNDEFINED_STATE = "A001",
76
+ /**
77
+ * A context referenced in a `when` rule, `receives`, or `returns` clause
78
+ * has no corresponding context definition in the module's directory.
79
+ */
80
+ A_UNDEFINED_CONTEXT = "A002",
81
+ /**
82
+ * A context listed in a state's `returns` block has no corresponding
83
+ * `when` rule in any of the module's processes.
84
+ */
85
+ A_UNHANDLED_RETURN = "A003",
86
+ /**
87
+ * A state is defined but never referenced in any process `when` rule
88
+ * and is not the module's `start` state.
89
+ */
90
+ A_UNREACHABLE_STATE = "A004",
91
+ /**
92
+ * A module listed in the system's `modules` block has no corresponding
93
+ * module definition file.
94
+ */
95
+ A_UNDEFINED_MODULE = "A005",
96
+ /**
97
+ * A component referenced by qualified name (e.g. `UIModule.LoginForm`)
98
+ * cannot be resolved — either the module does not exist or the component
99
+ * is not defined within it.
100
+ */
101
+ A_UNDEFINED_COMPONENT = "A006",
102
+ /**
103
+ * The owning module declared at the top of a component file (e.g.
104
+ * `module AuthModule`) does not match the module the construct names itself.
105
+ */
106
+ A_MODULE_MISMATCH = "A007",
107
+ /**
108
+ * A `state.return(contextName)` call references a context name that does
109
+ * not appear in the enclosing state's `returns` clause.
110
+ */
111
+ A_INVALID_STATE_RETURN = "A008",
112
+ /**
113
+ * An `implements` block references a handler interface that is not declared
114
+ * in the named module.
115
+ */
116
+ A_UNDEFINED_INTERFACE = "A009",
117
+ /**
118
+ * A `when` rule has no transition narrative.
119
+ * Narratives are optional but strongly recommended for readability.
120
+ */
121
+ W_MISSING_NARRATIVE = "W001",
122
+ /**
123
+ * A construct has no description string.
124
+ * Descriptions are optional but recommended for documentation.
125
+ */
126
+ W_MISSING_DESCRIPTION = "W002",
127
+ /**
128
+ * A state has no `uses` block — it is a transient state that holds a
129
+ * position in the process map while something external resolves.
130
+ * This is valid but worth flagging so the designer is aware.
131
+ */
132
+ H_EMPTY_USES = "H001"
133
+ }
134
+ /**
135
+ * A single diagnostic produced by the parser or analyser.
136
+ *
137
+ * `code` — the diagnostic code, used by the LSP to deduplicate and
138
+ * provide quick-fix suggestions.
139
+ * `message` — a human-readable explanation of the problem.
140
+ * `severity` — how serious the problem is.
141
+ * `range` — the source range to underline in the editor. Derived from
142
+ * the offending token's line, column, and value length.
143
+ * `source` — identifies which layer produced the diagnostic:
144
+ * `'parser'` for structural problems, `'analyser'` for semantic ones.
145
+ */
146
+ export interface Diagnostic {
147
+ code: DiagnosticCode;
148
+ message: string;
149
+ severity: DiagnosticSeverity;
150
+ range: Range;
151
+ source: 'parser' | 'analyser';
152
+ }
153
+ /**
154
+ * Creates a Range from a 1-based line and column and the length of the
155
+ * offending text. Converts to the zero-based LSP convention internally.
156
+ */
157
+ export declare function rangeFromToken(line: number, column: number, length: number): Range;
158
+ /**
159
+ * Creates a parser-layer Diagnostic.
160
+ */
161
+ export declare function parseDiagnostic(code: DiagnosticCode, message: string, severity: DiagnosticSeverity, range: Range): Diagnostic;
162
+ /**
163
+ * Creates an analyser-layer Diagnostic.
164
+ */
165
+ export declare function analyserDiagnostic(code: DiagnosticCode, message: string, severity: DiagnosticSeverity, range: Range): Diagnostic;
166
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/analyser/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAI7D;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACrB,8BAA8B;IAC9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