@mylasertools/kerfscript 0.9.0 → 0.10.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/CHANGELOG.md +88 -0
- package/LANGUAGE.md +13 -5
- package/README.md +2 -1
- package/dist/assembly.d.cts +2 -0
- package/dist/assembly.d.ts +2 -0
- package/dist/bores.d.cts +10 -0
- package/dist/bores.d.ts +10 -0
- package/dist/cli.js +7899 -6630
- package/dist/customizer.d.cts +3 -0
- package/dist/customizer.d.ts +3 -0
- package/dist/effects.d.cts +31 -0
- package/dist/effects.d.ts +31 -0
- package/dist/evaluator.d.cts +1 -0
- package/dist/evaluator.d.ts +1 -0
- package/dist/export/mesh.d.cts +53 -0
- package/dist/export/mesh.d.ts +53 -0
- package/dist/export/model.d.cts +12 -0
- package/dist/export/model.d.ts +12 -0
- package/dist/export/triangulate.d.cts +5 -0
- package/dist/export/triangulate.d.ts +5 -0
- package/dist/export/zip.d.cts +5 -0
- package/dist/export/zip.d.ts +5 -0
- package/dist/geometry.d.cts +1 -0
- package/dist/geometry.d.ts +1 -0
- package/dist/highlight.cjs +2 -2
- package/dist/highlight.js +2 -2
- package/dist/import/dbg.d.cts +1 -0
- package/dist/import/dbg.d.ts +1 -0
- package/dist/index.cjs +435 -48
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +435 -48
- package/dist/language.cjs +410 -30
- package/dist/language.js +410 -30
- package/dist/libraries.cjs +393 -14
- package/dist/libraries.js +393 -14
- package/dist/render.d.cts +3 -0
- package/dist/render.d.ts +3 -0
- package/dist/signatures.cjs +23 -5
- package/dist/signatures.js +23 -5
- package/dist/text.d.cts +6 -0
- package/dist/text.d.ts +6 -0
- package/docs/3d-files.md +72 -0
- package/docs/cli.md +27 -22
- package/docs/customizer.md +56 -0
- package/docs/javascript.md +46 -0
- package/docs/library.md +120 -0
- package/docs/openscad.md +15 -13
- package/docs/parts-and-sheets.md +2 -1
- package/docs/versions.md +2 -2
- package/package.json +1 -1
package/dist/customizer.d.cts
CHANGED
|
@@ -13,8 +13,11 @@ export interface Parameter {
|
|
|
13
13
|
value: number | string;
|
|
14
14
|
}[];
|
|
15
15
|
drive?: boolean;
|
|
16
|
+
when?: string;
|
|
17
|
+
whenProblem?: string;
|
|
16
18
|
span: [number, number];
|
|
17
19
|
}
|
|
18
20
|
export declare function parameters(source: string): {
|
|
19
21
|
parameters: Parameter[];
|
|
20
22
|
};
|
|
23
|
+
export declare function shown(param: Parameter, values: Record<string, Value>, params: Parameter[]): boolean;
|
package/dist/customizer.d.ts
CHANGED
|
@@ -13,8 +13,11 @@ export interface Parameter {
|
|
|
13
13
|
value: number | string;
|
|
14
14
|
}[];
|
|
15
15
|
drive?: boolean;
|
|
16
|
+
when?: string;
|
|
17
|
+
whenProblem?: string;
|
|
16
18
|
span: [number, number];
|
|
17
19
|
}
|
|
18
20
|
export declare function parameters(source: string): {
|
|
19
21
|
parameters: Parameter[];
|
|
20
22
|
};
|
|
23
|
+
export declare function shown(param: Parameter, values: Record<string, Value>, params: Parameter[]): boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type RenderOptions } from './render.cjs';
|
|
2
|
+
import type { Value } from './values.cjs';
|
|
3
|
+
export interface SettingEffect {
|
|
4
|
+
name: string;
|
|
5
|
+
/** The values tried, in order */
|
|
6
|
+
tried: Value[];
|
|
7
|
+
/** "files": what is cut changes (the files, the sheets' material and
|
|
8
|
+
* thickness, or the parts list); "view": only the assembled view, the
|
|
9
|
+
* steps or the hardware; "nothing": neither; "failed": the program stops
|
|
10
|
+
* at all values but one, or all of them; "skipped": not tried */
|
|
11
|
+
effect: 'files' | 'view' | 'nothing' | 'failed' | 'skipped';
|
|
12
|
+
/** Values tried that give the same files and view: for a range, each
|
|
13
|
+
* run of neighbouring values; for a menu, each group of choices */
|
|
14
|
+
same?: Value[][];
|
|
15
|
+
/** Values the program stops at, with the error */
|
|
16
|
+
errors?: {
|
|
17
|
+
value: Value;
|
|
18
|
+
message: string;
|
|
19
|
+
}[];
|
|
20
|
+
/** Why the setting was not tried */
|
|
21
|
+
reason?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What each setting of the program changes. `samples` is how many values
|
|
24
|
+
* of a range are tried (5). */
|
|
25
|
+
export declare function settingEffects(source: string, options?: RenderOptions, samples?: number): SettingEffect[];
|
|
26
|
+
/** The effects as lines to read, and whether any setting changes nothing
|
|
27
|
+
* or fails */
|
|
28
|
+
export declare function effectsText(effects: SettingEffect[]): {
|
|
29
|
+
lines: string[];
|
|
30
|
+
idle: boolean;
|
|
31
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type RenderOptions } from './render.js';
|
|
2
|
+
import type { Value } from './values.js';
|
|
3
|
+
export interface SettingEffect {
|
|
4
|
+
name: string;
|
|
5
|
+
/** The values tried, in order */
|
|
6
|
+
tried: Value[];
|
|
7
|
+
/** "files": what is cut changes (the files, the sheets' material and
|
|
8
|
+
* thickness, or the parts list); "view": only the assembled view, the
|
|
9
|
+
* steps or the hardware; "nothing": neither; "failed": the program stops
|
|
10
|
+
* at all values but one, or all of them; "skipped": not tried */
|
|
11
|
+
effect: 'files' | 'view' | 'nothing' | 'failed' | 'skipped';
|
|
12
|
+
/** Values tried that give the same files and view: for a range, each
|
|
13
|
+
* run of neighbouring values; for a menu, each group of choices */
|
|
14
|
+
same?: Value[][];
|
|
15
|
+
/** Values the program stops at, with the error */
|
|
16
|
+
errors?: {
|
|
17
|
+
value: Value;
|
|
18
|
+
message: string;
|
|
19
|
+
}[];
|
|
20
|
+
/** Why the setting was not tried */
|
|
21
|
+
reason?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What each setting of the program changes. `samples` is how many values
|
|
24
|
+
* of a range are tried (5). */
|
|
25
|
+
export declare function settingEffects(source: string, options?: RenderOptions, samples?: number): SettingEffect[];
|
|
26
|
+
/** The effects as lines to read, and whether any setting changes nothing
|
|
27
|
+
* or fails */
|
|
28
|
+
export declare function effectsText(effects: SettingEffect[]): {
|
|
29
|
+
lines: string[];
|
|
30
|
+
idle: boolean;
|
|
31
|
+
};
|
package/dist/evaluator.d.cts
CHANGED
package/dist/evaluator.d.ts
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type AssemblyPart } from '../assembly.cjs';
|
|
2
|
+
import type { HardwareItem } from '../evaluator.cjs';
|
|
3
|
+
export interface Body {
|
|
4
|
+
/** "Lid", "Lid engrave", "dowel" */
|
|
5
|
+
name: string;
|
|
6
|
+
kind: 'part' | 'mark' | 'hardware';
|
|
7
|
+
/** The part a part or mark body belongs to, which copy, and which
|
|
8
|
+
* placed part (the same number for a part and its marks) */
|
|
9
|
+
part?: string;
|
|
10
|
+
copy?: number;
|
|
11
|
+
instance?: number;
|
|
12
|
+
/** The material, as $material or a hardware kind, or the mark's layer */
|
|
13
|
+
material: string;
|
|
14
|
+
/** #rrggbb */
|
|
15
|
+
color: string;
|
|
16
|
+
metal?: boolean;
|
|
17
|
+
clear?: boolean;
|
|
18
|
+
/** x, y, z of each vertex, in millimetres, z up */
|
|
19
|
+
positions: number[];
|
|
20
|
+
/** Three vertex indices per triangle, counter-clockwise seen from outside */
|
|
21
|
+
indices: number[];
|
|
22
|
+
}
|
|
23
|
+
export interface MeshOptions {
|
|
24
|
+
/** "assembled" puts each part where the program places it; "flat" lays
|
|
25
|
+
* them side by side on the bed, front face up, as for printing */
|
|
26
|
+
layout?: 'assembled' | 'flat';
|
|
27
|
+
/** How far engraving and scoring stand off the face, in mm; 0 leaves
|
|
28
|
+
* them out */
|
|
29
|
+
markHeight?: number;
|
|
30
|
+
/** How wide a score line is drawn, in mm */
|
|
31
|
+
lineWidth?: number;
|
|
32
|
+
/** Hardware from hardware(), in the assembled layout */
|
|
33
|
+
hardware?: boolean;
|
|
34
|
+
/** Space between parts laid flat, in mm */
|
|
35
|
+
gap?: number;
|
|
36
|
+
/** How wide a cut inside a part (a living hinge's slits) is opened, in mm */
|
|
37
|
+
slitWidth?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface MeshSource {
|
|
40
|
+
assembly: AssemblyPart[];
|
|
41
|
+
/** Every part flat, for the flat layout and for a model nothing places */
|
|
42
|
+
flat?: AssemblyPart[];
|
|
43
|
+
hardware?: HardwareItem[];
|
|
44
|
+
/** The layers, to tell cuts inside a part from marks on it */
|
|
45
|
+
layers?: {
|
|
46
|
+
name: string;
|
|
47
|
+
mode: string;
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
/** The colour a 3D view gives a sheet material */
|
|
51
|
+
export declare function materialColor(material: string): string;
|
|
52
|
+
/** The model as solid bodies, for the 3D file writers */
|
|
53
|
+
export declare function meshBodies(source: MeshSource, options?: MeshOptions): Body[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type AssemblyPart } from '../assembly.js';
|
|
2
|
+
import type { HardwareItem } from '../evaluator.js';
|
|
3
|
+
export interface Body {
|
|
4
|
+
/** "Lid", "Lid engrave", "dowel" */
|
|
5
|
+
name: string;
|
|
6
|
+
kind: 'part' | 'mark' | 'hardware';
|
|
7
|
+
/** The part a part or mark body belongs to, which copy, and which
|
|
8
|
+
* placed part (the same number for a part and its marks) */
|
|
9
|
+
part?: string;
|
|
10
|
+
copy?: number;
|
|
11
|
+
instance?: number;
|
|
12
|
+
/** The material, as $material or a hardware kind, or the mark's layer */
|
|
13
|
+
material: string;
|
|
14
|
+
/** #rrggbb */
|
|
15
|
+
color: string;
|
|
16
|
+
metal?: boolean;
|
|
17
|
+
clear?: boolean;
|
|
18
|
+
/** x, y, z of each vertex, in millimetres, z up */
|
|
19
|
+
positions: number[];
|
|
20
|
+
/** Three vertex indices per triangle, counter-clockwise seen from outside */
|
|
21
|
+
indices: number[];
|
|
22
|
+
}
|
|
23
|
+
export interface MeshOptions {
|
|
24
|
+
/** "assembled" puts each part where the program places it; "flat" lays
|
|
25
|
+
* them side by side on the bed, front face up, as for printing */
|
|
26
|
+
layout?: 'assembled' | 'flat';
|
|
27
|
+
/** How far engraving and scoring stand off the face, in mm; 0 leaves
|
|
28
|
+
* them out */
|
|
29
|
+
markHeight?: number;
|
|
30
|
+
/** How wide a score line is drawn, in mm */
|
|
31
|
+
lineWidth?: number;
|
|
32
|
+
/** Hardware from hardware(), in the assembled layout */
|
|
33
|
+
hardware?: boolean;
|
|
34
|
+
/** Space between parts laid flat, in mm */
|
|
35
|
+
gap?: number;
|
|
36
|
+
/** How wide a cut inside a part (a living hinge's slits) is opened, in mm */
|
|
37
|
+
slitWidth?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface MeshSource {
|
|
40
|
+
assembly: AssemblyPart[];
|
|
41
|
+
/** Every part flat, for the flat layout and for a model nothing places */
|
|
42
|
+
flat?: AssemblyPart[];
|
|
43
|
+
hardware?: HardwareItem[];
|
|
44
|
+
/** The layers, to tell cuts inside a part from marks on it */
|
|
45
|
+
layers?: {
|
|
46
|
+
name: string;
|
|
47
|
+
mode: string;
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
/** The colour a 3D view gives a sheet material */
|
|
51
|
+
export declare function materialColor(material: string): string;
|
|
52
|
+
/** The model as solid bodies, for the 3D file writers */
|
|
53
|
+
export declare function meshBodies(source: MeshSource, options?: MeshOptions): Body[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Body, type MeshOptions, type MeshSource } from './mesh.cjs';
|
|
2
|
+
export type ModelFormat = 'glb' | '3mf' | 'stl';
|
|
3
|
+
/** Binary STL of all the bodies as one mesh, in millimetres */
|
|
4
|
+
export declare function toStl(bodies: Body[]): Uint8Array;
|
|
5
|
+
/** A 3MF package in millimetres: each part one object, its engraving and
|
|
6
|
+
* scoring coloured parts of it, so a slicer prints them in their colours */
|
|
7
|
+
export declare function to3mf(bodies: Body[]): Uint8Array;
|
|
8
|
+
/** GLB (binary glTF 2.0): a node and a mesh for each body, in metres with
|
|
9
|
+
* y up as glTF has it; each node's extras give its kind, part and copy */
|
|
10
|
+
export declare function toGlb(bodies: Body[]): Uint8Array;
|
|
11
|
+
/** The model as a 3D file: "glb", "3mf" or "stl" */
|
|
12
|
+
export declare function toModel(source: MeshSource, format: ModelFormat, options?: MeshOptions): Uint8Array;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Body, type MeshOptions, type MeshSource } from './mesh.js';
|
|
2
|
+
export type ModelFormat = 'glb' | '3mf' | 'stl';
|
|
3
|
+
/** Binary STL of all the bodies as one mesh, in millimetres */
|
|
4
|
+
export declare function toStl(bodies: Body[]): Uint8Array;
|
|
5
|
+
/** A 3MF package in millimetres: each part one object, its engraving and
|
|
6
|
+
* scoring coloured parts of it, so a slicer prints them in their colours */
|
|
7
|
+
export declare function to3mf(bodies: Body[]): Uint8Array;
|
|
8
|
+
/** GLB (binary glTF 2.0): a node and a mesh for each body, in metres with
|
|
9
|
+
* y up as glTF has it; each node's extras give its kind, part and copy */
|
|
10
|
+
export declare function toGlb(bodies: Body[]): Uint8Array;
|
|
11
|
+
/** The model as a 3D file: "glb", "3mf" or "stl" */
|
|
12
|
+
export declare function toModel(source: MeshSource, format: ModelFormat, options?: MeshOptions): Uint8Array;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type Pt = [number, number];
|
|
2
|
+
/** Triangles of an outline with holes, as index triples into the
|
|
3
|
+
* outline's points followed by each hole's, turning counter-clockwise */
|
|
4
|
+
export declare function triangulate(outer: Pt[], holes?: Pt[][]): [number, number, number][];
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type Pt = [number, number];
|
|
2
|
+
/** Triangles of an outline with holes, as index triples into the
|
|
3
|
+
* outline's points followed by each hole's, turning counter-clockwise */
|
|
4
|
+
export declare function triangulate(outer: Pt[], holes?: Pt[][]): [number, number, number][];
|
|
5
|
+
export {};
|
package/dist/geometry.d.cts
CHANGED
package/dist/geometry.d.ts
CHANGED
package/dist/highlight.cjs
CHANGED
|
@@ -43,14 +43,14 @@ var KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
43
43
|
var CONSTANTS = /* @__PURE__ */ new Set(["true", "false", "undef", "PI"]);
|
|
44
44
|
var LAYERS = /* @__PURE__ */ new Set(["cut", "score", "engrave", "guide", "layer"]);
|
|
45
45
|
var BUILTINS = new Set(
|
|
46
|
-
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch flow contours occlude hide paint measure fill_holes largest join_islands close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets cone_flat fit align cam geneva_wheel geneva_lock geneva_crank ratchet pawl world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at offset_path train_for path_points spline_points rotation euler orient len keys merge concat reverse sort fold scan bounds crossings sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands noise text_width text_metrics finger_count".split(" ")
|
|
46
|
+
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch flow contours occlude hide paint measure fill_holes largest join_islands close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets cone_flat fit align cam geneva_wheel geneva_lock geneva_crank ratchet pawl world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect heart teardrop egg lens crescent capsule diamond rounded_polygon shield arrow chevron banner house tag ring scalloped flower cloud speech_bubble stand stand_tabs stand_slots abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at offset_path train_for path_points spline_points rotation euler orient len keys merge concat reverse sort fold scan bounds crossings sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands noise text_width text_metrics text_size finger_count".split(" ")
|
|
47
47
|
);
|
|
48
48
|
var NUMBER = /(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?(?:(?:mm|cm|m|in|ft)(?![A-Za-z0-9_]))?/y;
|
|
49
49
|
var WORD = /\$?[A-Za-z_][A-Za-z0-9_]*/y;
|
|
50
50
|
var CALL = /\s*\(/y;
|
|
51
51
|
var PATH = /<[^>]*>?/y;
|
|
52
52
|
var SECTION = /\/\*\s*\[[^\]]*\]\s*\*\//y;
|
|
53
|
-
var CONTROL = /\/\/\s*\[[^\]]*\]\s*$/y;
|
|
53
|
+
var CONTROL = /\/\/\s*\[[^\]]*\](?:\s+drive)?(?:\s+when\s.*)?\s*$/y;
|
|
54
54
|
var MODIFIER = /[*#%](?=\s*[A-Za-z_$])/y;
|
|
55
55
|
var at = (re, line, i) => {
|
|
56
56
|
re.lastIndex = i;
|
package/dist/highlight.js
CHANGED
|
@@ -16,14 +16,14 @@ var KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
16
16
|
var CONSTANTS = /* @__PURE__ */ new Set(["true", "false", "undef", "PI"]);
|
|
17
17
|
var LAYERS = /* @__PURE__ */ new Set(["cut", "score", "engrave", "guide", "layer"]);
|
|
18
18
|
var BUILTINS = new Set(
|
|
19
|
-
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch flow contours occlude hide paint measure fill_holes largest join_islands close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets cone_flat fit align cam geneva_wheel geneva_lock geneva_crank ratchet pawl world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at offset_path train_for path_points spline_points rotation euler orient len keys merge concat reverse sort fold scan bounds crossings sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands noise text_width text_metrics finger_count".split(" ")
|
|
19
|
+
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch flow contours occlude hide paint measure fill_holes largest join_islands close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets cone_flat fit align cam geneva_wheel geneva_lock geneva_crank ratchet pawl world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect heart teardrop egg lens crescent capsule diamond rounded_polygon shield arrow chevron banner house tag ring scalloped flower cloud speech_bubble stand stand_tabs stand_slots abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at offset_path train_for path_points spline_points rotation euler orient len keys merge concat reverse sort fold scan bounds crossings sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands noise text_width text_metrics text_size finger_count".split(" ")
|
|
20
20
|
);
|
|
21
21
|
var NUMBER = /(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?(?:(?:mm|cm|m|in|ft)(?![A-Za-z0-9_]))?/y;
|
|
22
22
|
var WORD = /\$?[A-Za-z_][A-Za-z0-9_]*/y;
|
|
23
23
|
var CALL = /\s*\(/y;
|
|
24
24
|
var PATH = /<[^>]*>?/y;
|
|
25
25
|
var SECTION = /\/\*\s*\[[^\]]*\]\s*\*\//y;
|
|
26
|
-
var CONTROL = /\/\/\s*\[[^\]]*\]\s*$/y;
|
|
26
|
+
var CONTROL = /\/\/\s*\[[^\]]*\](?:\s+drive)?(?:\s+when\s.*)?\s*$/y;
|
|
27
27
|
var MODIFIER = /[*#%](?=\s*[A-Za-z_$])/y;
|
|
28
28
|
var at = (re, line, i) => {
|
|
29
29
|
re.lastIndex = i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|