@stackables/bridge-compiler 0.0.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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bridge-lint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge-lint.d.ts","sourceRoot":"","sources":["../src/bridge-lint.ts"],"names":[],"mappings":""}
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * bridge-lint — CLI tool to lint .bridge files.
4
+ *
5
+ * Usage:
6
+ * bridge-lint <file.bridge> [file2.bridge ...]
7
+ * bridge-lint *.bridge
8
+ *
9
+ * Exits with code 1 if any file has errors, 0 otherwise.
10
+ *
11
+ * Uses the shared BridgeLanguageService — same intelligence as the
12
+ * VS Code extension and the playground editor.
13
+ */
14
+ import { readFileSync } from "node:fs";
15
+ import { resolve, relative } from "node:path";
16
+ import { BridgeLanguageService } from "./language-service.js";
17
+ const args = process.argv.slice(2);
18
+ if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
19
+ console.log(`Usage: bridge-lint <file.bridge> [file2.bridge ...]
20
+
21
+ Lint Bridge DSL files and report diagnostics.
22
+
23
+ Options:
24
+ --help, -h Show this help message
25
+ --json Output diagnostics as JSON`);
26
+ process.exit(0);
27
+ }
28
+ const jsonOutput = args.includes("--json");
29
+ const files = args.filter((a) => !a.startsWith("-"));
30
+ const svc = new BridgeLanguageService();
31
+ let hasErrors = false;
32
+ const allJsonDiags = [];
33
+ for (const rawPath of files) {
34
+ const filePath = resolve(rawPath);
35
+ let text;
36
+ try {
37
+ text = readFileSync(filePath, "utf-8");
38
+ }
39
+ catch (err) {
40
+ console.error(`Error reading ${rawPath}: ${err.message}`);
41
+ hasErrors = true;
42
+ continue;
43
+ }
44
+ svc.update(text);
45
+ const diags = svc.getDiagnostics();
46
+ if (diags.length === 0)
47
+ continue;
48
+ const relPath = relative(process.cwd(), filePath);
49
+ for (const d of diags) {
50
+ if (d.severity === "error")
51
+ hasErrors = true;
52
+ if (jsonOutput) {
53
+ allJsonDiags.push({
54
+ file: relPath,
55
+ line: d.range.start.line + 1,
56
+ character: d.range.start.character + 1,
57
+ severity: d.severity,
58
+ message: d.message,
59
+ });
60
+ }
61
+ else {
62
+ const sev = d.severity === "error"
63
+ ? "\x1b[31merror\x1b[0m"
64
+ : "\x1b[33mwarning\x1b[0m";
65
+ const loc = `${d.range.start.line + 1}:${d.range.start.character + 1}`;
66
+ console.log(`${relPath}:${loc} ${sev} ${d.message}`);
67
+ }
68
+ }
69
+ }
70
+ if (jsonOutput) {
71
+ console.log(JSON.stringify(allJsonDiags, null, 2));
72
+ }
73
+ process.exit(hasErrors ? 1 : 0);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @stackables/bridge-compiler — Bridge DSL parser, serializer, and language service.
3
+ *
4
+ * Turns `.bridge` source text into `Instruction[]` (JSON AST) and provides
5
+ * IDE intelligence (diagnostics, completions, hover).
6
+ */
7
+ export { parseBridgeChevrotain as parseBridge, parseBridgeChevrotain, parseBridgeDiagnostics, } from "./parser/index.ts";
8
+ export type { BridgeDiagnostic, BridgeParseResult } from "./parser/index.ts";
9
+ export { BridgeLexer, allTokens } from "./parser/index.ts";
10
+ export { parseBridge as parseBridgeFormat, serializeBridge } from "./bridge-format.ts";
11
+ export { BridgeLanguageService } from "./language-service.ts";
12
+ export type { BridgeCompletion, BridgeHover, CompletionKind, Position, Range, } from "./language-service.ts";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,qBAAqB,IAAI,WAAW,EACpC,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,KAAK,GACN,MAAM,uBAAuB,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @stackables/bridge-compiler — Bridge DSL parser, serializer, and language service.
3
+ *
4
+ * Turns `.bridge` source text into `Instruction[]` (JSON AST) and provides
5
+ * IDE intelligence (diagnostics, completions, hover).
6
+ */
7
+ // ── Parser ──────────────────────────────────────────────────────────────────
8
+ export { parseBridgeChevrotain as parseBridge, parseBridgeChevrotain, parseBridgeDiagnostics, } from "./parser/index.js";
9
+ export { BridgeLexer, allTokens } from "./parser/index.js";
10
+ // ── Serializer ──────────────────────────────────────────────────────────────
11
+ export { parseBridge as parseBridgeFormat, serializeBridge } from "./bridge-format.js";
12
+ // ── Language service ────────────────────────────────────────────────────────
13
+ export { BridgeLanguageService } from "./language-service.js";
@@ -0,0 +1,50 @@
1
+ import type { BridgeDiagnostic } from "./parser/index.ts";
2
+ export type Position = {
3
+ line: number;
4
+ character: number;
5
+ };
6
+ export type Range = {
7
+ start: Position;
8
+ end: Position;
9
+ };
10
+ export type CompletionKind = "function" | "variable" | "keyword" | "type";
11
+ export type BridgeCompletion = {
12
+ label: string;
13
+ kind: CompletionKind;
14
+ detail?: string;
15
+ documentation?: string;
16
+ };
17
+ export type BridgeHover = {
18
+ /** Markdown content */
19
+ content: string;
20
+ range?: Range;
21
+ };
22
+ export declare class BridgeLanguageService {
23
+ private text;
24
+ private lines;
25
+ private instructions;
26
+ private startLines;
27
+ private parserDiagnostics;
28
+ /**
29
+ * Update the document text. Re-parses and caches the AST + diagnostics
30
+ * so subsequent calls to getDiagnostics / getCompletions / getHover
31
+ * reuse the same parse result.
32
+ */
33
+ update(text: string): void;
34
+ /**
35
+ * All diagnostics — parser errors + semantic checks (unknown tool refs, etc.)
36
+ *
37
+ * Ranges use 0-based lines, 0-based characters (LSP convention).
38
+ */
39
+ getDiagnostics(): BridgeDiagnostic[];
40
+ /**
41
+ * Completions at the given cursor position (0-based line/character).
42
+ */
43
+ getCompletions(pos: Position): BridgeCompletion[];
44
+ /**
45
+ * Hover information at the given cursor position (0-based line/character).
46
+ * Returns null when there's nothing meaningful to show.
47
+ */
48
+ getHover(pos: Position): BridgeHover | null;
49
+ }
50
+ //# sourceMappingURL=language-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-service.d.ts","sourceRoot":"","sources":["../src/language-service.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAU1D,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,KAAK,GAAG;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAoCF,qBAAa,qBAAqB;IAChC,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,iBAAiB,CAA0B;IAEnD;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAmB1B;;;;OAIG;IACH,cAAc,IAAI,gBAAgB,EAAE;IA+BpC;;OAEG;IACH,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,EAAE;IA4CjD;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,GAAG,IAAI;CAqE5C"}
@@ -0,0 +1,243 @@
1
+ /**
2
+ * Bridge Language Service — shared intelligence layer for all consumers.
3
+ *
4
+ * Provides diagnostics, completions, and hover information for Bridge DSL
5
+ * documents. Transport-agnostic: consumers (LSP server, CodeMirror, CLI)
6
+ * are thin adapters that map these results to their own formats.
7
+ *
8
+ * Usage:
9
+ * const svc = new BridgeLanguageService();
10
+ * svc.update(text);
11
+ * svc.getDiagnostics(); // parser errors + semantic checks
12
+ * svc.getCompletions({ line, character });
13
+ * svc.getHover({ line, character });
14
+ */
15
+ import { parseBridgeDiagnostics } from "./parser/index.js";
16
+ import { std } from "@stackables/bridge-stdlib";
17
+ // ── Internal lookup tables (built once at module load) ─────────────────────
18
+ const builtinToolNames = [
19
+ ...Object.keys(std).map((k) => `std.${k}`),
20
+ ];
21
+ const builtinToolNameSet = new Set(builtinToolNames);
22
+ /** Recursively enumerate all leaf function paths in `obj` as "prefix.key" strings. */
23
+ function flattenToolPaths(obj, prefix) {
24
+ const result = [];
25
+ for (const [key, val] of Object.entries(obj)) {
26
+ const path = `${prefix}.${key}`;
27
+ if (typeof val === "function") {
28
+ result.push(path);
29
+ }
30
+ else if (typeof val === "object" && val !== null) {
31
+ result.push(...flattenToolPaths(val, path));
32
+ }
33
+ }
34
+ return result;
35
+ }
36
+ /**
37
+ * User-facing tool names — only `std.*` leaf paths, fully qualified.
38
+ * `internal.*` tools are engine-internal and not exposed to users.
39
+ * e.g. ["std.str.toUpperCase", "std.str.toLowerCase", ..., "std.audit", ...]
40
+ */
41
+ const userFacingToolNames = flattenToolPaths(std, "std");
42
+ // Only validate std.* references in user code (not internal.* which is engine-only)
43
+ const BUILTIN_REF_RE = /\b(std\.[A-Za-z_]\w*)\b/g;
44
+ // ── Language Service ───────────────────────────────────────────────────────
45
+ export class BridgeLanguageService {
46
+ text = "";
47
+ lines = [];
48
+ instructions = [];
49
+ startLines = new Map();
50
+ parserDiagnostics = [];
51
+ /**
52
+ * Update the document text. Re-parses and caches the AST + diagnostics
53
+ * so subsequent calls to getDiagnostics / getCompletions / getHover
54
+ * reuse the same parse result.
55
+ */
56
+ update(text) {
57
+ this.text = text;
58
+ this.lines = text.split("\n");
59
+ if (!text.trim()) {
60
+ this.instructions = [];
61
+ this.startLines = new Map();
62
+ this.parserDiagnostics = [];
63
+ return;
64
+ }
65
+ const result = parseBridgeDiagnostics(text);
66
+ this.instructions = result.instructions;
67
+ this.startLines = result.startLines;
68
+ this.parserDiagnostics = result.diagnostics;
69
+ }
70
+ // ── Diagnostics ────────────────────────────────────────────────────────
71
+ /**
72
+ * All diagnostics — parser errors + semantic checks (unknown tool refs, etc.)
73
+ *
74
+ * Ranges use 0-based lines, 0-based characters (LSP convention).
75
+ */
76
+ getDiagnostics() {
77
+ if (!this.text.trim())
78
+ return [];
79
+ const diags = [...this.parserDiagnostics];
80
+ // Scan for unknown std.* tool references (internal.* is engine-only; skip)
81
+ for (let i = 0; i < this.lines.length; i++) {
82
+ const line = this.lines[i];
83
+ if (line.trimStart().startsWith("#"))
84
+ continue;
85
+ BUILTIN_REF_RE.lastIndex = 0;
86
+ let m;
87
+ while ((m = BUILTIN_REF_RE.exec(line)) !== null) {
88
+ const ref = m[1];
89
+ if (!builtinToolNameSet.has(ref)) {
90
+ diags.push({
91
+ message: `Unknown built-in tool "${ref}"`,
92
+ severity: "error",
93
+ range: {
94
+ start: { line: i, character: m.index },
95
+ end: { line: i, character: m.index + ref.length },
96
+ },
97
+ });
98
+ }
99
+ }
100
+ }
101
+ return diags;
102
+ }
103
+ // ── Completions ────────────────────────────────────────────────────────
104
+ /**
105
+ * Completions at the given cursor position (0-based line/character).
106
+ */
107
+ getCompletions(pos) {
108
+ const lineText = this.lines[pos.line] ?? "";
109
+ const textBefore = lineText.slice(0, pos.character);
110
+ // After "std." or a deeper std path (e.g. "std.str.") → suggest next segment
111
+ const nsPrefixMatch = textBefore.match(/\b(std(?:\.\w+)*)\.\w*$/);
112
+ if (nsPrefixMatch) {
113
+ const prefix = nsPrefixMatch[1] + "."; // e.g. "std." or "std.str."
114
+ const seen = new Set();
115
+ const completions = [];
116
+ for (const fqn of userFacingToolNames) {
117
+ if (fqn.startsWith(prefix)) {
118
+ const rest = fqn.slice(prefix.length);
119
+ const nextSegment = rest.split(".")[0];
120
+ if (!seen.has(nextSegment)) {
121
+ seen.add(nextSegment);
122
+ const isLeaf = !rest.includes(".");
123
+ completions.push({
124
+ label: nextSegment,
125
+ kind: isLeaf ? "function" : "variable",
126
+ detail: prefix + nextSegment,
127
+ });
128
+ }
129
+ }
130
+ }
131
+ return completions;
132
+ }
133
+ // After "with " at start of line or after "from " / "extends " → suggest FQN tools
134
+ const contextMatch = textBefore.match(/(?:^\s*with\s+|(?:from|extends)\s+)\S*$/);
135
+ if (contextMatch) {
136
+ return userFacingToolNames.map((fqn) => ({
137
+ label: fqn,
138
+ kind: "function",
139
+ }));
140
+ }
141
+ return [];
142
+ }
143
+ // ── Hover ──────────────────────────────────────────────────────────────
144
+ /**
145
+ * Hover information at the given cursor position (0-based line/character).
146
+ * Returns null when there's nothing meaningful to show.
147
+ */
148
+ getHover(pos) {
149
+ const lineText = this.lines[pos.line] ?? "";
150
+ const word = getWordAt(lineText, pos.character);
151
+ if (word.length < 2)
152
+ return null;
153
+ if (this.instructions.length === 0)
154
+ return null;
155
+ // Find the instruction whose start line is closest to (but ≤) the cursor
156
+ const cursorLineNum = pos.line + 1; // startLines are 1-based
157
+ let closestInst = this.instructions[0];
158
+ let closestStart = this.startLines.get(closestInst) ?? 1;
159
+ for (const inst of this.instructions) {
160
+ const sl = this.startLines.get(inst) ?? 1;
161
+ if (sl <= cursorLineNum && sl >= closestStart) {
162
+ closestStart = sl;
163
+ closestInst = inst;
164
+ }
165
+ }
166
+ // ── Bridge / Define ─────────────────────────────────────────────────
167
+ if (closestInst.kind === "bridge" || closestInst.kind === "define") {
168
+ const h = closestInst.handles.find((h) => h.handle === word);
169
+ if (h)
170
+ return { content: handleBindingMarkdown(h) };
171
+ if (closestInst.kind === "bridge") {
172
+ if (word === closestInst.type || word === closestInst.field) {
173
+ const hc = closestInst.handles.length;
174
+ const wc = closestInst.wires.length;
175
+ return {
176
+ content: `**Bridge** \`${closestInst.type}.${closestInst.field}\`\n\n${hc} handle${hc !== 1 ? "s" : ""} · ${wc} wire${wc !== 1 ? "s" : ""}`,
177
+ };
178
+ }
179
+ }
180
+ if (closestInst.kind === "define" && word === closestInst.name) {
181
+ return {
182
+ content: `**Define** \`${closestInst.name}\`\n\nReusable subgraph (${closestInst.handles.length} handles · ${closestInst.wires.length} wires)`,
183
+ };
184
+ }
185
+ }
186
+ // ── Tool ────────────────────────────────────────────────────────────
187
+ if (closestInst.kind === "tool") {
188
+ const d = closestInst.deps.find((d) => d.handle === word);
189
+ if (d)
190
+ return { content: toolDepMarkdown(d) };
191
+ if (word === closestInst.name ||
192
+ word === closestInst.fn ||
193
+ word === closestInst.extends) {
194
+ const fn = closestInst.fn ?? `extends ${closestInst.extends}`;
195
+ const dc = closestInst.deps.length;
196
+ const wc = closestInst.wires.length;
197
+ return {
198
+ content: `**Tool** \`${closestInst.name}\`\n\nFunction: \`${fn}\`\n\n${dc} dep${dc !== 1 ? "s" : ""} · ${wc} wire${wc !== 1 ? "s" : ""}`,
199
+ };
200
+ }
201
+ }
202
+ // ── Const ───────────────────────────────────────────────────────────
203
+ if (closestInst.kind === "const" && word === closestInst.name) {
204
+ return {
205
+ content: `**Const** \`${closestInst.name}\`\n\nValue: \`${closestInst.value}\``,
206
+ };
207
+ }
208
+ return null;
209
+ }
210
+ }
211
+ // ── Utility helpers ────────────────────────────────────────────────────────
212
+ /** Extract the identifier-like word that contains `character` on `line`. */
213
+ function getWordAt(line, character) {
214
+ const before = line.slice(0, character).match(/[\w-]*$/)?.[0] ?? "";
215
+ const after = line.slice(character).match(/^[\w-]*/)?.[0] ?? "";
216
+ return before + after;
217
+ }
218
+ function handleBindingMarkdown(h) {
219
+ switch (h.kind) {
220
+ case "tool":
221
+ return `**Tool handle** \`${h.handle}\`\n\nSource: \`${h.name}\``;
222
+ case "input":
223
+ return `**Input handle** \`${h.handle}\`\n\nGraphQL field arguments`;
224
+ case "output":
225
+ return `**Output handle** \`${h.handle}\`\n\nGraphQL field return value`;
226
+ case "context":
227
+ return `**Context handle** \`${h.handle}\`\n\nGraphQL execution context`;
228
+ case "const":
229
+ return `**Const handle** \`${h.handle}\`\n\nNamed constants declared in this file`;
230
+ case "define":
231
+ return `**Define handle** \`${h.handle}\`\n\nInlined from \`define ${h.name}\``;
232
+ }
233
+ }
234
+ function toolDepMarkdown(d) {
235
+ switch (d.kind) {
236
+ case "context":
237
+ return `**Context dep** \`${d.handle}\`\n\nGraphQL execution context`;
238
+ case "const":
239
+ return `**Const dep** \`${d.handle}\`\n\nNamed constants declared in this file`;
240
+ case "tool":
241
+ return `**Tool dep** \`${d.handle}\`\n\nTool: \`${d.tool}\``;
242
+ }
243
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Chevrotain-based parser for the Bridge DSL.
3
+ *
4
+ * Re-exports the public parse function as well as the lexer for direct access.
5
+ */
6
+ export { parseBridgeChevrotain, parseBridgeDiagnostics } from "./parser.ts";
7
+ export type { BridgeDiagnostic, BridgeParseResult } from "./parser.ts";
8
+ export { BridgeLexer, allTokens } from "./lexer.ts";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Chevrotain-based parser for the Bridge DSL.
3
+ *
4
+ * Re-exports the public parse function as well as the lexer for direct access.
5
+ */
6
+ export { parseBridgeChevrotain, parseBridgeDiagnostics } from "./parser.js";
7
+ export { BridgeLexer, allTokens } from "./lexer.js";
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Chevrotain Lexer for the Bridge DSL.
3
+ *
4
+ * Tokenizes .bridge source text into a stream consumed by the CstParser.
5
+ * Comments and whitespace are automatically skipped (placed on hidden channels).
6
+ */
7
+ import { Lexer } from "chevrotain";
8
+ export declare const Newline: import("chevrotain").TokenType;
9
+ export declare const WS: import("chevrotain").TokenType;
10
+ export declare const Comment: import("chevrotain").TokenType;
11
+ export declare const Identifier: import("chevrotain").TokenType;
12
+ export declare const VersionKw: import("chevrotain").TokenType;
13
+ export declare const ToolKw: import("chevrotain").TokenType;
14
+ export declare const BridgeKw: import("chevrotain").TokenType;
15
+ export declare const DefineKw: import("chevrotain").TokenType;
16
+ export declare const ConstKw: import("chevrotain").TokenType;
17
+ export declare const WithKw: import("chevrotain").TokenType;
18
+ export declare const AsKw: import("chevrotain").TokenType;
19
+ export declare const FromKw: import("chevrotain").TokenType;
20
+ export declare const InputKw: import("chevrotain").TokenType;
21
+ export declare const OutputKw: import("chevrotain").TokenType;
22
+ export declare const ContextKw: import("chevrotain").TokenType;
23
+ export declare const OnKw: import("chevrotain").TokenType;
24
+ export declare const ErrorKw: import("chevrotain").TokenType;
25
+ export declare const ForceKw: import("chevrotain").TokenType;
26
+ export declare const AliasKw: import("chevrotain").TokenType;
27
+ export declare const CatchKw: import("chevrotain").TokenType;
28
+ export declare const AndKw: import("chevrotain").TokenType;
29
+ export declare const OrKw: import("chevrotain").TokenType;
30
+ export declare const NotKw: import("chevrotain").TokenType;
31
+ export declare const ThrowKw: import("chevrotain").TokenType;
32
+ export declare const PanicKw: import("chevrotain").TokenType;
33
+ export declare const ContinueKw: import("chevrotain").TokenType;
34
+ export declare const BreakKw: import("chevrotain").TokenType;
35
+ export declare const Arrow: import("chevrotain").TokenType;
36
+ export declare const NullCoalesce: import("chevrotain").TokenType;
37
+ export declare const ErrorCoalesce: import("chevrotain").TokenType;
38
+ export declare const SafeNav: import("chevrotain").TokenType;
39
+ export declare const QuestionMark: import("chevrotain").TokenType;
40
+ export declare const GreaterEqual: import("chevrotain").TokenType;
41
+ export declare const LessEqual: import("chevrotain").TokenType;
42
+ export declare const DoubleEquals: import("chevrotain").TokenType;
43
+ export declare const NotEquals: import("chevrotain").TokenType;
44
+ export declare const GreaterThan: import("chevrotain").TokenType;
45
+ export declare const LessThan: import("chevrotain").TokenType;
46
+ export declare const Star: import("chevrotain").TokenType;
47
+ export declare const Plus: import("chevrotain").TokenType;
48
+ export declare const LParen: import("chevrotain").TokenType;
49
+ export declare const RParen: import("chevrotain").TokenType;
50
+ export declare const LCurly: import("chevrotain").TokenType;
51
+ export declare const RCurly: import("chevrotain").TokenType;
52
+ export declare const LSquare: import("chevrotain").TokenType;
53
+ export declare const RSquare: import("chevrotain").TokenType;
54
+ export declare const Equals: import("chevrotain").TokenType;
55
+ export declare const Dot: import("chevrotain").TokenType;
56
+ export declare const Colon: import("chevrotain").TokenType;
57
+ export declare const Comma: import("chevrotain").TokenType;
58
+ export declare const StringLiteral: import("chevrotain").TokenType;
59
+ export declare const NumberLiteral: import("chevrotain").TokenType;
60
+ export declare const TrueLiteral: import("chevrotain").TokenType;
61
+ export declare const FalseLiteral: import("chevrotain").TokenType;
62
+ export declare const NullLiteral: import("chevrotain").TokenType;
63
+ export declare const PathToken: import("chevrotain").TokenType;
64
+ export declare const Slash: import("chevrotain").TokenType;
65
+ export declare const Minus: import("chevrotain").TokenType;
66
+ export declare const allTokens: import("chevrotain").TokenType[];
67
+ export declare const BridgeLexer: Lexer;
68
+ //# sourceMappingURL=lexer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexer.d.ts","sourceRoot":"","sources":["../../src/parser/lexer.ts"],"names":[],"mappings":"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"}