planscript 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.
- package/LICENSE +19 -0
- package/README.md +277 -0
- package/dist/ast/types.d.ts +195 -0
- package/dist/ast/types.d.ts.map +1 -0
- package/dist/ast/types.js +5 -0
- package/dist/ast/types.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +100 -0
- package/dist/cli.js.map +1 -0
- package/dist/compiler.d.ts +30 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +80 -0
- package/dist/compiler.js.map +1 -0
- package/dist/exporters/json.d.ts +13 -0
- package/dist/exporters/json.d.ts.map +1 -0
- package/dist/exporters/json.js +17 -0
- package/dist/exporters/json.js.map +1 -0
- package/dist/exporters/svg.d.ts +27 -0
- package/dist/exporters/svg.d.ts.map +1 -0
- package/dist/exporters/svg.js +684 -0
- package/dist/exporters/svg.js.map +1 -0
- package/dist/geometry/index.d.ts +13 -0
- package/dist/geometry/index.d.ts.map +1 -0
- package/dist/geometry/index.js +333 -0
- package/dist/geometry/index.js.map +1 -0
- package/dist/geometry/types.d.ts +34 -0
- package/dist/geometry/types.d.ts.map +1 -0
- package/dist/geometry/types.js +2 -0
- package/dist/geometry/types.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/lowering/index.d.ts +25 -0
- package/dist/lowering/index.d.ts.map +1 -0
- package/dist/lowering/index.js +217 -0
- package/dist/lowering/index.js.map +1 -0
- package/dist/parser/grammar.d.ts +168 -0
- package/dist/parser/grammar.d.ts.map +1 -0
- package/dist/parser/grammar.js +7341 -0
- package/dist/parser/grammar.js.map +1 -0
- package/dist/parser/index.d.ts +27 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +26 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/validation/index.d.ts +22 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +243 -0
- package/dist/validation/index.js.map +1 -0
- package/examples/house-with-dimensions.svg +106 -0
- package/examples/house.json +478 -0
- package/examples/house.psc +86 -0
- package/examples/house.svg +57 -0
- package/package.json +54 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Lowering Error
|
|
3
|
+
// ============================================================================
|
|
4
|
+
export class LoweringError extends Error {
|
|
5
|
+
roomName;
|
|
6
|
+
constructor(message, roomName) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.roomName = roomName;
|
|
9
|
+
this.name = 'LoweringError';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// Lowering Functions
|
|
14
|
+
// ============================================================================
|
|
15
|
+
function lowerFootprint(footprint) {
|
|
16
|
+
if (footprint.type === 'FootprintPolygon') {
|
|
17
|
+
return footprint.points;
|
|
18
|
+
}
|
|
19
|
+
// FootprintRect -> Polygon
|
|
20
|
+
const { p1, p2 } = footprint;
|
|
21
|
+
const minX = Math.min(p1.x, p2.x);
|
|
22
|
+
const maxX = Math.max(p1.x, p2.x);
|
|
23
|
+
const minY = Math.min(p1.y, p2.y);
|
|
24
|
+
const maxY = Math.max(p1.y, p2.y);
|
|
25
|
+
return [
|
|
26
|
+
{ x: minX, y: minY },
|
|
27
|
+
{ x: maxX, y: minY },
|
|
28
|
+
{ x: maxX, y: maxY },
|
|
29
|
+
{ x: minX, y: maxY },
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
function rectDiagonalToPolygon(p1, p2) {
|
|
33
|
+
const minX = Math.min(p1.x, p2.x);
|
|
34
|
+
const maxX = Math.max(p1.x, p2.x);
|
|
35
|
+
const minY = Math.min(p1.y, p2.y);
|
|
36
|
+
const maxY = Math.max(p1.y, p2.y);
|
|
37
|
+
return [
|
|
38
|
+
{ x: minX, y: minY },
|
|
39
|
+
{ x: maxX, y: minY },
|
|
40
|
+
{ x: maxX, y: maxY },
|
|
41
|
+
{ x: minX, y: maxY },
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
function rectAtSizeToPolygon(at, size) {
|
|
45
|
+
return [
|
|
46
|
+
{ x: at.x, y: at.y },
|
|
47
|
+
{ x: at.x + size.x, y: at.y },
|
|
48
|
+
{ x: at.x + size.x, y: at.y + size.y },
|
|
49
|
+
{ x: at.x, y: at.y + size.y },
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
function rectCenterSizeToPolygon(center, size) {
|
|
53
|
+
const halfW = size.x / 2;
|
|
54
|
+
const halfH = size.y / 2;
|
|
55
|
+
return [
|
|
56
|
+
{ x: center.x - halfW, y: center.y - halfH },
|
|
57
|
+
{ x: center.x + halfW, y: center.y - halfH },
|
|
58
|
+
{ x: center.x + halfW, y: center.y + halfH },
|
|
59
|
+
{ x: center.x - halfW, y: center.y + halfH },
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
function getRoomEdge(room, edge) {
|
|
63
|
+
const xs = room.polygon.map((p) => p.x);
|
|
64
|
+
const ys = room.polygon.map((p) => p.y);
|
|
65
|
+
switch (edge) {
|
|
66
|
+
case 'left':
|
|
67
|
+
return Math.min(...xs);
|
|
68
|
+
case 'right':
|
|
69
|
+
return Math.max(...xs);
|
|
70
|
+
case 'top':
|
|
71
|
+
return Math.max(...ys);
|
|
72
|
+
case 'bottom':
|
|
73
|
+
return Math.min(...ys);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function getRoomBounds(room) {
|
|
77
|
+
const xs = room.polygon.map((p) => p.x);
|
|
78
|
+
const ys = room.polygon.map((p) => p.y);
|
|
79
|
+
return {
|
|
80
|
+
minX: Math.min(...xs),
|
|
81
|
+
maxX: Math.max(...xs),
|
|
82
|
+
minY: Math.min(...ys),
|
|
83
|
+
maxY: Math.max(...ys),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function lowerRoomGeometry(room, resolvedRooms) {
|
|
87
|
+
const geometry = room.geometry;
|
|
88
|
+
switch (geometry.type) {
|
|
89
|
+
case 'RoomPolygon':
|
|
90
|
+
return geometry.points;
|
|
91
|
+
case 'RoomRectDiagonal':
|
|
92
|
+
return rectDiagonalToPolygon(geometry.p1, geometry.p2);
|
|
93
|
+
case 'RoomRectAtSize':
|
|
94
|
+
return rectAtSizeToPolygon(geometry.at, geometry.size);
|
|
95
|
+
case 'RoomRectCenterSize':
|
|
96
|
+
return rectCenterSizeToPolygon(geometry.center, geometry.size);
|
|
97
|
+
case 'RoomRectSizeOnly': {
|
|
98
|
+
// Requires attach directive
|
|
99
|
+
if (!room.attach) {
|
|
100
|
+
throw new LoweringError(`Room "${room.name}" uses rect size() but has no attach directive`, room.name);
|
|
101
|
+
}
|
|
102
|
+
const targetRoom = resolvedRooms.get(room.attach.target);
|
|
103
|
+
if (!targetRoom) {
|
|
104
|
+
throw new LoweringError(`Room "${room.name}" attaches to unknown room "${room.attach.target}"`, room.name);
|
|
105
|
+
}
|
|
106
|
+
const targetBounds = getRoomBounds(targetRoom);
|
|
107
|
+
const size = geometry.size;
|
|
108
|
+
const gap = room.gap?.distance ?? 0;
|
|
109
|
+
const alignment = room.align?.alignment ?? 'center';
|
|
110
|
+
let x;
|
|
111
|
+
let y;
|
|
112
|
+
// Determine position based on direction
|
|
113
|
+
switch (room.attach.direction) {
|
|
114
|
+
case 'east_of':
|
|
115
|
+
x = targetBounds.maxX + gap;
|
|
116
|
+
break;
|
|
117
|
+
case 'west_of':
|
|
118
|
+
x = targetBounds.minX - size.x - gap;
|
|
119
|
+
break;
|
|
120
|
+
case 'north_of':
|
|
121
|
+
y = targetBounds.maxY + gap;
|
|
122
|
+
break;
|
|
123
|
+
case 'south_of':
|
|
124
|
+
y = targetBounds.minY - size.y - gap;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
// Determine alignment
|
|
128
|
+
if (room.attach.direction === 'east_of' || room.attach.direction === 'west_of') {
|
|
129
|
+
switch (alignment) {
|
|
130
|
+
case 'top':
|
|
131
|
+
y = targetBounds.maxY - size.y;
|
|
132
|
+
break;
|
|
133
|
+
case 'bottom':
|
|
134
|
+
y = targetBounds.minY;
|
|
135
|
+
break;
|
|
136
|
+
case 'center':
|
|
137
|
+
y = (targetBounds.minY + targetBounds.maxY) / 2 - size.y / 2;
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
y = targetBounds.minY;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
switch (alignment) {
|
|
145
|
+
case 'left':
|
|
146
|
+
x = targetBounds.minX;
|
|
147
|
+
break;
|
|
148
|
+
case 'right':
|
|
149
|
+
x = targetBounds.maxX - size.x;
|
|
150
|
+
break;
|
|
151
|
+
case 'center':
|
|
152
|
+
x = (targetBounds.minX + targetBounds.maxX) / 2 - size.x / 2;
|
|
153
|
+
break;
|
|
154
|
+
default:
|
|
155
|
+
x = targetBounds.minX;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return rectAtSizeToPolygon({ x: x, y: y }, size);
|
|
159
|
+
}
|
|
160
|
+
case 'RoomRectSpan': {
|
|
161
|
+
const fromRoom = resolvedRooms.get(geometry.spanX.from.room);
|
|
162
|
+
const toRoom = resolvedRooms.get(geometry.spanX.to.room);
|
|
163
|
+
if (!fromRoom) {
|
|
164
|
+
throw new LoweringError(`Room "${room.name}" references unknown room "${geometry.spanX.from.room}"`, room.name);
|
|
165
|
+
}
|
|
166
|
+
if (!toRoom) {
|
|
167
|
+
throw new LoweringError(`Room "${room.name}" references unknown room "${geometry.spanX.to.room}"`, room.name);
|
|
168
|
+
}
|
|
169
|
+
const x1 = getRoomEdge(fromRoom, geometry.spanX.from.edge);
|
|
170
|
+
const x2 = getRoomEdge(toRoom, geometry.spanX.to.edge);
|
|
171
|
+
const y1 = geometry.spanY.from;
|
|
172
|
+
const y2 = geometry.spanY.to;
|
|
173
|
+
return rectDiagonalToPolygon({ x: x1, y: y1 }, { x: x2, y: y2 });
|
|
174
|
+
}
|
|
175
|
+
default:
|
|
176
|
+
throw new LoweringError(`Unknown geometry type: ${geometry.type}`, room.name);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// ============================================================================
|
|
180
|
+
// Main Lowering Function
|
|
181
|
+
// ============================================================================
|
|
182
|
+
export function lower(program) {
|
|
183
|
+
const plan = program.plan;
|
|
184
|
+
const resolvedRooms = new Map();
|
|
185
|
+
// Lower footprint
|
|
186
|
+
const footprint = lowerFootprint(plan.footprint);
|
|
187
|
+
// Lower rooms in order (dependencies must come first)
|
|
188
|
+
for (const room of plan.rooms) {
|
|
189
|
+
const polygon = lowerRoomGeometry(room, resolvedRooms);
|
|
190
|
+
const loweredRoom = {
|
|
191
|
+
name: room.name,
|
|
192
|
+
label: room.label,
|
|
193
|
+
polygon,
|
|
194
|
+
};
|
|
195
|
+
resolvedRooms.set(room.name, loweredRoom);
|
|
196
|
+
}
|
|
197
|
+
// Extract defaults
|
|
198
|
+
const defaults = {};
|
|
199
|
+
if (program.defaults) {
|
|
200
|
+
if (program.defaults.doorWidth !== undefined) {
|
|
201
|
+
defaults.doorWidth = program.defaults.doorWidth;
|
|
202
|
+
}
|
|
203
|
+
if (program.defaults.windowWidth !== undefined) {
|
|
204
|
+
defaults.windowWidth = program.defaults.windowWidth;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
name: plan.name,
|
|
209
|
+
footprint,
|
|
210
|
+
rooms: Array.from(resolvedRooms.values()),
|
|
211
|
+
openings: plan.openings,
|
|
212
|
+
wallOverrides: plan.wallOverrides,
|
|
213
|
+
assertions: plan.assertions,
|
|
214
|
+
defaults,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lowering/index.ts"],"names":[],"mappings":"AAyCA,+EAA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: number;
|
|
6
|
+
}
|
|
7
|
+
export interface FileRange {
|
|
8
|
+
start: FilePosition;
|
|
9
|
+
end: FilePosition;
|
|
10
|
+
source: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LiteralExpectation {
|
|
13
|
+
type: "literal";
|
|
14
|
+
text: string;
|
|
15
|
+
ignoreCase: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ClassParts extends Array<string | ClassParts> {
|
|
18
|
+
}
|
|
19
|
+
export interface ClassExpectation {
|
|
20
|
+
type: "class";
|
|
21
|
+
parts: ClassParts;
|
|
22
|
+
inverted: boolean;
|
|
23
|
+
ignoreCase: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface AnyExpectation {
|
|
26
|
+
type: "any";
|
|
27
|
+
}
|
|
28
|
+
export interface EndExpectation {
|
|
29
|
+
type: "end";
|
|
30
|
+
}
|
|
31
|
+
export interface OtherExpectation {
|
|
32
|
+
type: "other";
|
|
33
|
+
description: string;
|
|
34
|
+
}
|
|
35
|
+
export type Expectation = LiteralExpectation | ClassExpectation | AnyExpectation | EndExpectation | OtherExpectation;
|
|
36
|
+
declare class _PeggySyntaxError extends Error {
|
|
37
|
+
static buildMessage(expected: Expectation[], found: string | null): string;
|
|
38
|
+
message: string;
|
|
39
|
+
expected: Expectation[];
|
|
40
|
+
found: string | null;
|
|
41
|
+
location: FileRange;
|
|
42
|
+
name: string;
|
|
43
|
+
constructor(message: string, expected: Expectation[], found: string | null, location: FileRange);
|
|
44
|
+
format(sources: {
|
|
45
|
+
source?: any;
|
|
46
|
+
text: string;
|
|
47
|
+
}[]): string;
|
|
48
|
+
}
|
|
49
|
+
export interface TraceEvent {
|
|
50
|
+
type: string;
|
|
51
|
+
rule: string;
|
|
52
|
+
result?: any;
|
|
53
|
+
location: FileRange;
|
|
54
|
+
}
|
|
55
|
+
export interface ParseOptions {
|
|
56
|
+
filename?: string;
|
|
57
|
+
startRule?: "Program";
|
|
58
|
+
tracer?: any;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}
|
|
61
|
+
export type ParseFunction = <Options extends ParseOptions>(input: string, options?: Options) => Options extends {
|
|
62
|
+
startRule: infer StartRule;
|
|
63
|
+
} ? StartRule extends "Program" ? Program : Program : Program;
|
|
64
|
+
export declare const parse: ParseFunction;
|
|
65
|
+
export declare const PeggySyntaxError: typeof _PeggySyntaxError;
|
|
66
|
+
export type PeggySyntaxError = _PeggySyntaxError;
|
|
67
|
+
export type Program = AST.Program;
|
|
68
|
+
export type UnitsDeclaration = AST.UnitsDeclaration;
|
|
69
|
+
export type UnitType = AST.UnitType;
|
|
70
|
+
export type OriginDeclaration = AST.OriginDeclaration;
|
|
71
|
+
export type AxisDeclaration = AST.AxisDeclaration;
|
|
72
|
+
export type AxisDirection = AST.AxisDirection;
|
|
73
|
+
export type GridDeclaration = AST.GridDeclaration;
|
|
74
|
+
export type DefaultsDeclaration = AST.DefaultsDeclaration;
|
|
75
|
+
export type DefaultsContent = DefaultsDoorWidth | DefaultsWindowWidth;
|
|
76
|
+
export type DefaultsDoorWidth = {
|
|
77
|
+
type: "doorWidth";
|
|
78
|
+
value: Number_1;
|
|
79
|
+
};
|
|
80
|
+
export type DefaultsWindowWidth = {
|
|
81
|
+
type: "windowWidth";
|
|
82
|
+
value: Number_1;
|
|
83
|
+
};
|
|
84
|
+
export type PlanDefinition = AST.PlanDefinition;
|
|
85
|
+
export type PlanContent = Footprint | RoomDefinition | Opening | WallThicknessOverride | Assertion;
|
|
86
|
+
export type Footprint = FootprintPolygon | FootprintRect;
|
|
87
|
+
export type FootprintPolygon = AST.FootprintPolygon;
|
|
88
|
+
export type FootprintRect = AST.FootprintRect;
|
|
89
|
+
export type RoomDefinition = AST.RoomDefinition;
|
|
90
|
+
export type RoomContent = RoomGeometry | RoomLabel | AttachDirective | AlignDirective | GapDirective;
|
|
91
|
+
export type RoomLabel = {
|
|
92
|
+
type: "label";
|
|
93
|
+
value: String_1;
|
|
94
|
+
};
|
|
95
|
+
export type RoomGeometry = RoomPolygon | RoomRectSpan | RoomRectAtSize | RoomRectCenterSize | RoomRectSizeOnly | RoomRectDiagonal;
|
|
96
|
+
export type RoomPolygon = AST.RoomPolygon;
|
|
97
|
+
export type RoomRectDiagonal = AST.RoomRectDiagonal;
|
|
98
|
+
export type RoomRectAtSize = AST.RoomRectAtSize;
|
|
99
|
+
export type RoomRectCenterSize = AST.RoomRectCenterSize;
|
|
100
|
+
export type RoomRectSizeOnly = AST.RoomRectSizeOnly;
|
|
101
|
+
export type RoomRectSpan = AST.RoomRectSpan;
|
|
102
|
+
export type EdgeReference = AST.EdgeReference;
|
|
103
|
+
export type EdgeRefSide = "left" | "right" | "top" | "bottom";
|
|
104
|
+
export type AttachDirective = AST.AttachDirective;
|
|
105
|
+
export type RelativeDirection = AST.RelativeDirection;
|
|
106
|
+
export type AlignDirective = AST.AlignDirective;
|
|
107
|
+
export type AlignmentType = AST.AlignmentType;
|
|
108
|
+
export type GapDirective = AST.GapDirective;
|
|
109
|
+
export type Opening = DoorOpening | WindowOpening;
|
|
110
|
+
export type DoorOpening = AST.DoorOpening;
|
|
111
|
+
export type DoorContent = DoorBetween | DoorOn | DoorAt | DoorWidth | DoorSwing;
|
|
112
|
+
export type DoorBetween = {
|
|
113
|
+
type: "between";
|
|
114
|
+
rooms: [string, string];
|
|
115
|
+
};
|
|
116
|
+
export type DoorOn = {
|
|
117
|
+
type: "on";
|
|
118
|
+
};
|
|
119
|
+
export type DoorAt = {
|
|
120
|
+
type: "at";
|
|
121
|
+
position: Position;
|
|
122
|
+
};
|
|
123
|
+
export type Position = AST.PositionPercentage | AST.PositionAbsolute;
|
|
124
|
+
export type DoorWidth = {
|
|
125
|
+
type: "width";
|
|
126
|
+
value: Number_1;
|
|
127
|
+
};
|
|
128
|
+
export type DoorSwing = {
|
|
129
|
+
type: "swing";
|
|
130
|
+
room: Identifier;
|
|
131
|
+
};
|
|
132
|
+
export type WindowOpening = AST.WindowOpening;
|
|
133
|
+
export type WindowContent = WindowOn | WindowAt | WindowWidth | WindowSill;
|
|
134
|
+
export type WindowOn = {
|
|
135
|
+
type: "windowOn";
|
|
136
|
+
room: Identifier;
|
|
137
|
+
edge: EdgeSide;
|
|
138
|
+
};
|
|
139
|
+
export type WindowAt = {
|
|
140
|
+
type: "at";
|
|
141
|
+
position: Position;
|
|
142
|
+
};
|
|
143
|
+
export type WindowWidth = {
|
|
144
|
+
type: "width";
|
|
145
|
+
value: Number_1;
|
|
146
|
+
};
|
|
147
|
+
export type WindowSill = {
|
|
148
|
+
type: "sill";
|
|
149
|
+
value: Number_1;
|
|
150
|
+
};
|
|
151
|
+
export type EdgeSide = AST.EdgeSide;
|
|
152
|
+
export type WallThicknessOverride = AST.WallThicknessOverride;
|
|
153
|
+
export type Assertion = AssertionInsideFootprint | AssertionNoOverlap | AssertionOpeningsOnWalls | AssertionMinRoomArea | AssertionRoomsConnected;
|
|
154
|
+
export type AssertionInsideFootprint = AST.AssertionInsideFootprint;
|
|
155
|
+
export type AssertionNoOverlap = AST.AssertionNoOverlap;
|
|
156
|
+
export type AssertionOpeningsOnWalls = AST.AssertionOpeningsOnWalls;
|
|
157
|
+
export type AssertionMinRoomArea = AST.AssertionMinRoomArea;
|
|
158
|
+
export type AssertionRoomsConnected = AST.AssertionRoomsConnected;
|
|
159
|
+
export type Point = AST.Point;
|
|
160
|
+
export type PointList = [Point, ...AST.Point[]];
|
|
161
|
+
export type Number_1 = number;
|
|
162
|
+
export type String_1 = string;
|
|
163
|
+
export type Identifier = string;
|
|
164
|
+
export type _ = (Whitespace | Comment)[];
|
|
165
|
+
export type Whitespace = string[];
|
|
166
|
+
export type Comment = ["#", string[], "\n" | null] | ["//", string[], "\n" | null] | ["/*", [undefined, string][], "*/"];
|
|
167
|
+
export {};
|
|
168
|
+
//# sourceMappingURL=grammar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../../src/parser/grammar.ts"],"names":[],"mappings":"AAEA,OAA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