@mylasertools/kerfscript 0.2.1 → 0.3.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 +81 -2
- package/LANGUAGE.md +95 -64
- package/README.md +21 -10
- package/THIRD-PARTY-NOTICES.md +13 -4
- package/dist/cli.js +529 -243
- package/dist/evaluator.d.cts +3 -0
- package/dist/evaluator.d.ts +3 -0
- package/dist/export/dxf.d.cts +1 -1
- package/dist/export/dxf.d.ts +1 -1
- package/dist/font.d.cts +3 -0
- package/dist/font.d.ts +3 -0
- package/dist/functions.d.cts +21 -2
- package/dist/functions.d.ts +21 -2
- package/dist/index.cjs +11 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/lexer.d.cts +4 -1
- package/dist/lexer.d.ts +4 -1
- package/dist/parser.d.cts +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/render.d.cts +1 -1
- package/dist/render.d.ts +1 -1
- package/dist/values.d.cts +10 -2
- package/dist/values.d.ts +10 -2
- package/dist/wasm.d.cts +1 -0
- package/dist/wasm.d.ts +1 -0
- package/docs/cli.md +46 -20
- package/docs/compatibility.md +3 -3
- package/docs/customizer.md +9 -9
- package/docs/desktop.md +96 -0
- package/docs/javascript.md +29 -27
- package/docs/layers.md +6 -6
- package/docs/openscad.md +9 -9
- package/docs/versions.md +2 -2
- package/docs/webassembly.md +131 -0
- package/fonts/OFL.txt +92 -0
- package/package.json +6 -3
package/dist/evaluator.d.cts
CHANGED
|
@@ -98,6 +98,8 @@ export declare class Evaluator {
|
|
|
98
98
|
private loop;
|
|
99
99
|
private evalArgs;
|
|
100
100
|
private bindParams;
|
|
101
|
+
private unknownArg;
|
|
102
|
+
private warn;
|
|
101
103
|
private callModule;
|
|
102
104
|
private childStmts;
|
|
103
105
|
callFunction(f: FnDef | Closure, args: Args, caller: Env, name: string): Value;
|
|
@@ -107,6 +109,7 @@ export declare class Evaluator {
|
|
|
107
109
|
private charge;
|
|
108
110
|
private call;
|
|
109
111
|
private specialFunction;
|
|
112
|
+
private assert;
|
|
110
113
|
private echo;
|
|
111
114
|
private echoText;
|
|
112
115
|
private arith;
|
package/dist/evaluator.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ export declare class Evaluator {
|
|
|
98
98
|
private loop;
|
|
99
99
|
private evalArgs;
|
|
100
100
|
private bindParams;
|
|
101
|
+
private unknownArg;
|
|
102
|
+
private warn;
|
|
101
103
|
private callModule;
|
|
102
104
|
private childStmts;
|
|
103
105
|
callFunction(f: FnDef | Closure, args: Args, caller: Env, name: string): Value;
|
|
@@ -107,6 +109,7 @@ export declare class Evaluator {
|
|
|
107
109
|
private charge;
|
|
108
110
|
private call;
|
|
109
111
|
private specialFunction;
|
|
112
|
+
private assert;
|
|
110
113
|
private echo;
|
|
111
114
|
private echoText;
|
|
112
115
|
private arith;
|
package/dist/export/dxf.d.cts
CHANGED
package/dist/export/dxf.d.ts
CHANGED
package/dist/font.d.cts
ADDED
package/dist/font.d.ts
ADDED
package/dist/functions.d.cts
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { type Value } from './values.cjs';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface FnCtx {
|
|
3
|
+
maxLength: number;
|
|
4
|
+
step: (n?: number) => void;
|
|
5
|
+
given: number;
|
|
6
|
+
}
|
|
7
|
+
type Run = (args: Value[], c: FnCtx) => Value;
|
|
8
|
+
export interface Builtin {
|
|
9
|
+
params: string[];
|
|
10
|
+
rest: boolean;
|
|
11
|
+
order?: (n: number) => string[];
|
|
12
|
+
run: Run;
|
|
13
|
+
}
|
|
14
|
+
export declare function givenTwice(f: Builtin, pos: Value[], named: Map<string, Value>): string[];
|
|
15
|
+
export declare function bindArgs(f: Builtin, pos: Value[], named: Map<string, Value>): Value[];
|
|
16
|
+
/**
|
|
17
|
+
* Steps a built-in takes to go through its arguments: one for each item of a
|
|
18
|
+
* list or range and each character of a string. len() of a list is a single
|
|
19
|
+
* step. A range is counted up to just past max, the most items it may hold.
|
|
20
|
+
*/
|
|
21
|
+
export declare function argumentWork(name: string, args: Value[], max: number): number;
|
|
22
|
+
export declare const FUNCTIONS: Record<string, Builtin>;
|
|
4
23
|
export {};
|
package/dist/functions.d.ts
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { type Value } from './values.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface FnCtx {
|
|
3
|
+
maxLength: number;
|
|
4
|
+
step: (n?: number) => void;
|
|
5
|
+
given: number;
|
|
6
|
+
}
|
|
7
|
+
type Run = (args: Value[], c: FnCtx) => Value;
|
|
8
|
+
export interface Builtin {
|
|
9
|
+
params: string[];
|
|
10
|
+
rest: boolean;
|
|
11
|
+
order?: (n: number) => string[];
|
|
12
|
+
run: Run;
|
|
13
|
+
}
|
|
14
|
+
export declare function givenTwice(f: Builtin, pos: Value[], named: Map<string, Value>): string[];
|
|
15
|
+
export declare function bindArgs(f: Builtin, pos: Value[], named: Map<string, Value>): Value[];
|
|
16
|
+
/**
|
|
17
|
+
* Steps a built-in takes to go through its arguments: one for each item of a
|
|
18
|
+
* list or range and each character of a string. len() of a list is a single
|
|
19
|
+
* step. A range is counted up to just past max, the most items it may hold.
|
|
20
|
+
*/
|
|
21
|
+
export declare function argumentWork(name: string, args: Value[], max: number): number;
|
|
22
|
+
export declare const FUNCTIONS: Record<string, Builtin>;
|
|
4
23
|
export {};
|