desmost 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/README.md +87 -11
- package/dist/compiler/compile.d.ts +1 -7
- package/dist/compiler/compile.d.ts.map +1 -1
- package/dist/compiler/compile.js +3 -94
- package/dist/compiler/compile.js.map +1 -1
- package/dist/compiler/compiler.d.ts +56 -0
- package/dist/compiler/compiler.d.ts.map +1 -0
- package/dist/compiler/compiler.js +209 -0
- package/dist/compiler/compiler.js.map +1 -0
- package/dist/compiler/format.d.ts +2 -2
- package/dist/compiler/format.d.ts.map +1 -1
- package/dist/compiler/format.js +18 -9
- package/dist/compiler/format.js.map +1 -1
- package/dist/decompiler/decompile.d.ts +1 -1
- package/dist/decompiler/decompile.d.ts.map +1 -1
- package/dist/decompiler/decompile.js +1 -3
- package/dist/decompiler/decompile.js.map +1 -1
- package/dist/decompiler/extract.d.ts.map +1 -1
- package/dist/decompiler/extract.js +7 -3
- package/dist/decompiler/extract.js.map +1 -1
- package/dist/decompiler/format.d.ts.map +1 -1
- package/dist/decompiler/format.js +0 -1
- package/dist/decompiler/format.js.map +1 -1
- package/dist/errors.d.ts +35 -27
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +46 -48
- package/dist/errors.js.map +1 -1
- package/dist/index.internal.d.ts +1 -1
- package/dist/index.internal.d.ts.map +1 -1
- package/dist/magic/global/desmos.d.ts +2 -2
- package/dist/magic/global/desmos.d.ts.map +1 -1
- package/dist/magic/global/desmos.js +3 -2
- package/dist/magic/global/desmos.js.map +1 -1
- package/dist/magic/global/viewport.d.ts +2 -2
- package/dist/magic/global/viewport.d.ts.map +1 -1
- package/dist/magic/global/viewport.js +5 -5
- package/dist/magic/global/viewport.js.map +1 -1
- package/dist/magic/incantation.d.ts +4 -4
- package/dist/magic/incantation.d.ts.map +1 -1
- package/dist/magic/incantation.js +15 -8
- package/dist/magic/incantation.js.map +1 -1
- package/dist/magic/local/colour.d.ts +3 -1
- package/dist/magic/local/colour.d.ts.map +1 -1
- package/dist/magic/local/colour.js +15 -11
- package/dist/magic/local/colour.js.map +1 -1
- package/dist/magic/local/label.d.ts +2 -2
- package/dist/magic/local/label.d.ts.map +1 -1
- package/dist/magic/local/label.js +8 -7
- package/dist/magic/local/label.js.map +1 -1
- package/dist/magic/local/line.d.ts +2 -2
- package/dist/magic/local/line.d.ts.map +1 -1
- package/dist/magic/local/line.js +0 -1
- package/dist/magic/local/line.js.map +1 -1
- package/dist/options.d.ts +59 -27
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js +2 -1
- package/dist/options.js.map +1 -1
- package/dist/parser/ast.d.ts +3 -17
- package/dist/parser/ast.d.ts.map +1 -1
- package/dist/parser/ast.js +0 -2
- package/dist/parser/ast.js.map +1 -1
- package/dist/parser/desmost-parser.d.ts +33 -22
- package/dist/parser/desmost-parser.d.ts.map +1 -1
- package/dist/parser/desmost-parser.js +106 -92
- package/dist/parser/desmost-parser.js.map +1 -1
- package/dist/parser/generic-parser.d.ts +19 -10
- package/dist/parser/generic-parser.d.ts.map +1 -1
- package/dist/parser/generic-parser.js +56 -16
- package/dist/parser/generic-parser.js.map +1 -1
- package/dist/utils.d.ts +9 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +13 -2
- package/dist/utils.js.map +1 -1
- package/package.json +4 -3
- package/src/compiler/compile.ts +7 -120
- package/src/compiler/compiler.ts +275 -0
- package/src/compiler/format.ts +19 -7
- package/src/decompiler/decompile.ts +1 -7
- package/src/decompiler/extract.ts +3 -1
- package/src/decompiler/format.ts +0 -1
- package/src/errors.ts +40 -24
- package/src/index.internal.ts +1 -1
- package/src/magic/.template.ts +2 -2
- package/src/magic/global/desmos.ts +7 -9
- package/src/magic/global/viewport.ts +11 -17
- package/src/magic/incantation.ts +21 -22
- package/src/magic/local/colour.ts +23 -13
- package/src/magic/local/label.ts +14 -19
- package/src/magic/local/line.ts +2 -2
- package/src/options.ts +83 -51
- package/src/parser/ast.ts +1 -21
- package/src/parser/desmost-parser.ts +131 -135
- package/src/parser/generic-parser.ts +71 -29
- package/src/utils.ts +25 -3
- package/dist/compiler/evaluate.d.ts +0 -18
- package/dist/compiler/evaluate.d.ts.map +0 -1
- package/dist/compiler/evaluate.js +0 -93
- package/dist/compiler/evaluate.js.map +0 -1
- package/dist/desmos.d.ts +0 -16
- package/dist/desmos.d.ts.map +0 -1
- package/dist/desmos.js +0 -19
- package/dist/desmos.js.map +0 -1
- package/src/compiler/evaluate.ts +0 -128
- package/src/desmos.ts +0 -22
|
@@ -3,8 +3,8 @@ import type { DesmostOptions } from "../../options.js";
|
|
|
3
3
|
interface LabelOptions {
|
|
4
4
|
text: string;
|
|
5
5
|
show?: boolean;
|
|
6
|
-
size?: number
|
|
7
|
-
pos?:
|
|
6
|
+
size?: number;
|
|
7
|
+
pos?: "ABOVE" | "BELOW" | "LEFT" | "RIGHT" | "ABOVE_LEFT" | "ABOVE_RIGHT" | "BELOW_LEFT" | "BELOW_RIGHT";
|
|
8
8
|
}
|
|
9
9
|
export declare class LabelIncantation extends ArgIncantation<LOCAL> {
|
|
10
10
|
readonly description = "Label a block that evaluates to a point(s).";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/magic/local/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,UAAU,YAAY;IAErB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/magic/local/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,UAAU,YAAY;IAErB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,GAAG,aAAa,CAAC;CACzG;AAUD,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAE1D,SAAkB,WAAW,iDACmB;IAEhD,SAAkB,UAAU,WAAY;IACxC,SAAkB,YAAY,QAAO;IACrC,SAAkB,QAAQ,8BAAiC;IAElD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,IAAI,EAAE,YAAY;IAWxD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,YAAY;CA4CzE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Incantation, ArgIncantation } from "../incantation.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DesmostError } from "../../errors.js";
|
|
3
3
|
const VALID_FIELDS = ["text", "show", "size", "pos"];
|
|
4
4
|
const VALID_POSITIONS = [
|
|
5
5
|
"ABOVE", "BELOW", "LEFT", "RIGHT",
|
|
@@ -17,20 +17,21 @@ export class LabelIncantation extends ArgIncantation {
|
|
|
17
17
|
// @ts-expect-error: outdated types
|
|
18
18
|
if (data.size != undefined)
|
|
19
19
|
target.labelSize = data.size;
|
|
20
|
+
// @ts-expect-error: outdated types
|
|
20
21
|
if (data.pos != undefined)
|
|
21
22
|
target.labelOrientation = data.pos;
|
|
22
23
|
}
|
|
23
24
|
evaluate_arg(raw, options) {
|
|
24
25
|
let out = super.evaluate_arg(raw, options);
|
|
25
26
|
if (options.check_args) {
|
|
26
|
-
super.require_nonempty(out,
|
|
27
|
+
super.require_nonempty(out, {
|
|
28
|
+
msg: `/label received empty argument`,
|
|
27
29
|
hint: `You can provide [${VALID_FIELDS.join(", ")}]`,
|
|
28
|
-
flagged_by: "check_args",
|
|
29
30
|
});
|
|
30
31
|
if (!("text" in out)) {
|
|
31
|
-
throw new
|
|
32
|
+
throw new DesmostError.MissingInput({
|
|
33
|
+
msg: `/label is missing label text`,
|
|
32
34
|
hint: `Provide text for the label: \`/label{text: "sup world!"}\``,
|
|
33
|
-
flagged_by: "check_args",
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
super.require_known(out, VALID_FIELDS);
|
|
@@ -45,9 +46,9 @@ export class LabelIncantation extends ArgIncantation {
|
|
|
45
46
|
// @ts-expect-error: indexing
|
|
46
47
|
let orientation = Desmos.LabelOrientations[pos];
|
|
47
48
|
if (options.check_args && orientation == undefined) {
|
|
48
|
-
throw new
|
|
49
|
+
throw new DesmostError.InvalidArgument({
|
|
50
|
+
msg: `/label received invalid label position: ${pos}`,
|
|
49
51
|
hint: `Valid label positions are ${VALID_POSITIONS.join(", ")}`,
|
|
50
|
-
flagged_by: "check_args"
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
54
|
out.pos = orientation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/magic/local/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/magic/local/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAY5C,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAErD,MAAM,eAAe,GAAG;IACvB,O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AAE,4DAA4D;iBAClE,CAAC,CAAC;YACJ,CAAC;YAED,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACxC,CAAC;QAED,IAAI,OAAO,GAAG,CAAC,GAAG,IAAI,WAAW,EAAE,CAAC;YACnC,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAE5D,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnC,8BAA8B;gBAC9B,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,CAAC;iBACI,CAAC;gBACL,6BAA6B;gBAC7B,IAAI,WAAW,GAAG,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;gBAEhD,IAAI,OAAO,CAAC,UAAU,IAAI,WAAW,IAAI,SAAS,EAAE,CAAC;oBACpD,MAAM,IAAI,YAAY,CAAC,eAAe,CAAC;wBACtC,GAAG,EAAG,2CAA2C,GAAG,EAAE;wBACtD,IAAI,EAAE,6BAA6B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;qBAC/D,CAAC,CAAC;gBACJ,CAAC;gBAED,GAAG,CAAC,GAAG,GAAG,WAAW,CAAC;YACvB,CAAC;QACF,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Incantation, ArgIncantation, type LOCAL } from "../incantation.js";
|
|
2
2
|
import type { DesmostOptions } from "../../options.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { Fallible } from "../../errors.js";
|
|
4
4
|
interface LineOptions {
|
|
5
5
|
style?: keyof typeof Desmos.Styles;
|
|
6
6
|
width?: number;
|
|
@@ -12,7 +12,7 @@ export declare class LineIncantation extends ArgIncantation<LOCAL> {
|
|
|
12
12
|
readonly requires_arg = true;
|
|
13
13
|
readonly arg_type = Incantation.ArgType.OBJECT;
|
|
14
14
|
apply(target: Desmos.ExpressionState, data: LineOptions): void;
|
|
15
|
-
evaluate_arg(raw: string, options: DesmostOptions):
|
|
15
|
+
evaluate_arg(raw: string, options: DesmostOptions): Fallible<LineOptions>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
18
18
|
//# sourceMappingURL=line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/magic/local/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/magic/local/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,UAAU,WAAW;IAEpB,KAAK,CAAC,EAAI,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC;IACrC,KAAK,CAAC,EAAI,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,qBAAa,eAAgB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAEzD,SAAkB,WAAW,8CACgB;IAE7C,SAAkB,UAAU,UAAW;IACvC,SAAkB,YAAY,QAAO;IACrC,SAAkB,QAAQ,8BAAiC;IAElD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,IAAI,EAAE,WAAW;IASvD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,QAAQ,CAAC,WAAW,CAAC;CAWlF"}
|
package/dist/magic/local/line.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../src/magic/local/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../src/magic/local/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;AAazE,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;AAGnD,MAAM,OAAO,eAAgB,SAAQ,cAAqB;IAEvC,WAAW,GAC1B,0CAA0C,CAAA;IAE3B,UAAU,GAAK,MAAM,CAAA;IACrB,YAAY,GAAG,IAAI,CAAA;IACnB,QAAQ,GAAO,WAAW,CAAC,OAAO,CAAC,MAAM,CAAA;IAElD,KAAK,CAAC,MAA8B,EAAE,IAAiB;QAE/D,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAEnD,IAAI,IAAI,CAAC,KAAK,IAAM,SAAS;YAAE,MAAM,CAAC,SAAS,GAAK,IAAI,CAAC,KAAK,CAAC;QAC/D,IAAI,IAAI,CAAC,KAAK,IAAM,SAAS;YAAE,MAAM,CAAC,SAAS,GAAK,IAAI,CAAC,KAAK,CAAC;QAC/D,IAAI,IAAI,CAAC,OAAO,IAAI,SAAS;YAAE,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;IAClE,CAAC;IAEQ,YAAY,CAAC,GAAW,EAAE,OAAuB;QAEzD,IAAI,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAgB,CAAC;QAE1D,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACxB,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAC5B,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD"}
|
package/dist/options.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** Default options that Desmost uses for `compile()` and `decompile()`. */
|
|
2
|
+
export declare const DEFAULT_OPTIONS: DesmostOptions;
|
|
3
|
+
/**
|
|
4
|
+
* Fill in `options` with Desmost's defaults to produce a complete `DesmostOptions` config.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fill_defaults(options: Partial<DesmostOptions> | undefined): DesmostOptions;
|
|
1
7
|
/**
|
|
2
8
|
* Options to customise Desmost compilation.
|
|
3
9
|
*
|
|
@@ -24,14 +30,15 @@
|
|
|
24
30
|
*/
|
|
25
31
|
export interface DesmostOptions {
|
|
26
32
|
/**
|
|
27
|
-
* How should errors be
|
|
33
|
+
* How should errors be displayed?
|
|
28
34
|
*
|
|
29
|
-
* - `surface` (default): Blocks that result in errors will become Desmos text
|
|
35
|
+
* - `surface` (default): Blocks that result in errors will become Desmos text blocks containing the error message, leaving other expressions unaffected.
|
|
30
36
|
*
|
|
31
|
-
* - `crash`: The entire compilation to Desmos will terminate with a single error message
|
|
32
|
-
*
|
|
37
|
+
* - `crash`: The entire compilation to Desmos will terminate with a single error message in a text block.
|
|
38
|
+
* - This means you don't get any Desmos rendering at all, but errors are also immediately obvious.
|
|
39
|
+
* - Note that this will *clear all expressions* in the calculator instance. If you pass in a non-blank `Desmos.Calculator` to `compile()`, it could get cleared.
|
|
33
40
|
*
|
|
34
|
-
* - `suppress`: Silently fail on the frontend (if you wish to give the illusion that everything is fine).
|
|
41
|
+
* - `suppress`: Silently fail on the frontend (if you wish to give the illusion that everything is fine!).
|
|
35
42
|
*/
|
|
36
43
|
errors: "surface" | "crash" | "suppress";
|
|
37
44
|
/**
|
|
@@ -45,7 +52,7 @@ export interface DesmostOptions {
|
|
|
45
52
|
/**
|
|
46
53
|
* The prefix to prepend to error blocks.
|
|
47
54
|
*
|
|
48
|
-
* Defaults to `[DESMOST ERROR]
|
|
55
|
+
* Defaults to `"[DESMOST ERROR]"`.
|
|
49
56
|
*
|
|
50
57
|
* Provide a `""` blank string if you wish for no prefix to be added.
|
|
51
58
|
*/
|
|
@@ -53,69 +60,94 @@ export interface DesmostOptions {
|
|
|
53
60
|
/**
|
|
54
61
|
* Show all the available diagnostics for errors, including hints and debug information?
|
|
55
62
|
*
|
|
56
|
-
* Defaults to `true
|
|
63
|
+
* Defaults to `true` – all output is shown.
|
|
57
64
|
*/
|
|
58
65
|
expand_errors: boolean;
|
|
59
66
|
/**
|
|
60
|
-
* Error if an incantation receives a `{}` object argument with unknown fields?
|
|
61
|
-
*
|
|
62
|
-
* This also errors if an incantation receives an empty `{}` object.
|
|
67
|
+
* Error if an incantation receives a `{}` object argument with unknown fields, or no fields at all?
|
|
63
68
|
*
|
|
64
|
-
* For instance, `/label{position: LEFT}` is invalid; it should be `/label{pos: LEFT}`. With `check_args: false`, this silently no-ops
|
|
69
|
+
* For instance, `/label{position: LEFT}` is invalid; it should be `/label{pos: LEFT}`. With `check_args: false`, this silently no-ops.
|
|
65
70
|
*
|
|
66
71
|
* Desmost doesn’t remove unknown fields, it just passes them directly to the Desmos API. If you know what you’re doing and a field you know exists isn’t supported by Desmos, you can disable this to avoid erroring.
|
|
67
72
|
*
|
|
68
|
-
* Defaults to `true
|
|
73
|
+
* Defaults to `true` – arguments are checked. The Desmos API happily accepts and ignores invalid fields, so Desmost provides a safety net for you ;)
|
|
69
74
|
*/
|
|
70
75
|
check_args: boolean;
|
|
71
76
|
/**
|
|
72
77
|
* Prettify LaTeX output so it renders nicely in the Desmos editor?
|
|
73
78
|
*
|
|
74
|
-
*
|
|
79
|
+
* This means you can keep your source code much neater. It handles stuff like converting `()` –> `\left(\right)`, `x, y` –> `x,\ y`, `min(x, y)` –> `\operatorname{min}\left(x,\ y\right)`, and more!
|
|
80
|
+
*
|
|
81
|
+
* Defaults to `true` – LaTeX is prettified.
|
|
75
82
|
*/
|
|
76
83
|
prettify: boolean;
|
|
77
84
|
/**
|
|
78
85
|
* Strip common indentation from `/text{}` blocks?
|
|
79
86
|
*
|
|
80
|
-
*
|
|
87
|
+
* This allows you to indent content for readability:
|
|
88
|
+
*
|
|
89
|
+
* ```hs
|
|
90
|
+
* /text{
|
|
91
|
+
* Now I have
|
|
92
|
+
* a lovely indent
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* Defaults to `true` – text is dedented.
|
|
81
97
|
*/
|
|
82
98
|
dedent_text: boolean;
|
|
83
99
|
/**
|
|
84
|
-
* Should `%` LaTeX comments be ignored, instead of turned into text
|
|
100
|
+
* Should `%` LaTeX comments be ignored, instead of turned into text blocks (notes)?
|
|
85
101
|
*
|
|
86
|
-
*
|
|
102
|
+
* ```hs
|
|
103
|
+
* % Do I become a text expression?
|
|
104
|
+
* y = x
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* Defaults to `false` – comments are kept.
|
|
87
108
|
*/
|
|
88
109
|
ignore_comments: boolean;
|
|
89
110
|
/**
|
|
90
111
|
* Should all line breaks be ignored, instead of kept as blank expressions?
|
|
91
112
|
*
|
|
92
|
-
*
|
|
113
|
+
* ```hs
|
|
114
|
+
* % Should there be a blank block after this?
|
|
115
|
+
*
|
|
116
|
+
* % Should there be a blank block before this?
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* This takes precedence over `keep_leading_blanks` and `keep_trailing_blanks`.
|
|
120
|
+
*
|
|
121
|
+
* Defaults to `false` – blank lines are recognised.
|
|
93
122
|
*/
|
|
94
123
|
ignore_all_blanks: boolean;
|
|
95
124
|
/**
|
|
96
125
|
* Should trailing blank lines at the start of the source be kept as blank expressions?
|
|
97
126
|
*
|
|
98
|
-
*
|
|
127
|
+
* This is disabled by default so line breaks after global incantations don’t mess things up:
|
|
128
|
+
*
|
|
129
|
+
* ```hs
|
|
130
|
+
* /viewport{left: -8, right: 8}
|
|
131
|
+
*
|
|
132
|
+
* % I don’t have a blank block above me, yay
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* Defaults to `false` – leading blank lines are ignored.
|
|
99
136
|
*/
|
|
100
137
|
keep_leading_blanks: boolean;
|
|
101
138
|
/**
|
|
102
139
|
* Should trailing blank lines at the end of the source be kept as blank expressions?
|
|
103
140
|
*
|
|
104
|
-
* Defaults to `false
|
|
141
|
+
* Defaults to `false` – trailing blank lines are ignored.
|
|
105
142
|
*/
|
|
106
143
|
keep_trailing_blanks: boolean;
|
|
107
144
|
/**
|
|
108
|
-
* Return debug diagnostics
|
|
145
|
+
* Return debug diagnostics from `compile()`?
|
|
109
146
|
*
|
|
110
|
-
* This includes the unevaluated AST and performance diagnostics.
|
|
147
|
+
* This includes the unevaluated AST and performance diagnostics. Relevant types are exposed from `desmost/internal`, but beware that these are implementation details and unstable.
|
|
111
148
|
*
|
|
112
|
-
* Defaults to `false
|
|
149
|
+
* Defaults to `false` – `compile()` returns `void`.
|
|
113
150
|
*/
|
|
114
151
|
debug: boolean;
|
|
115
152
|
}
|
|
116
|
-
export declare const DEFAULT_OPTIONS: DesmostOptions;
|
|
117
|
-
/**
|
|
118
|
-
* Fill in `options` with Desmost's defaults to produce a complete `DesmostOptions` config.
|
|
119
|
-
*/
|
|
120
|
-
export declare function fill_defaults(options: Partial<DesmostOptions> | undefined): DesmostOptions;
|
|
121
153
|
//# sourceMappingURL=options.d.ts.map
|
package/dist/options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,cAAc;IAE9B
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAIA,2EAA2E;AAC3E,eAAO,MAAM,eAAe,EAAE,cAc7B,CAAC;AAGF;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,cAAc,CAM1F;AAGD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,cAAc;IAE9B;;;;;;;;;;OAUG;IACH,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;IAExC;;;;;;OAMG;IACH,YAAY,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAA;IAExC;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAA;IAEtB;;;;;;;;OAQG;IACH,UAAU,EAAE,OAAO,CAAA;IAEnB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;;;;;OAaG;IACH,WAAW,EAAE,OAAO,CAAA;IAEpB;;;;;;;;;OASG;IACH,eAAe,EAAE,OAAO,CAAA;IAExB;;;;;;;;;;;;OAYG;IACH,iBAAiB,EAAE,OAAO,CAAA;IAE1B;;;;;;;;;;;;OAYG;IACH,mBAAmB,EAAE,OAAO,CAAA;IAE5B;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAA;IAE7B;;;;;;OAMG;IACH,KAAK,EAAE,OAAO,CAAA;CACd"}
|
package/dist/options.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { LINE } from "./utils.js";
|
|
2
2
|
import { compile } from "./compiler/compile.js";
|
|
3
|
+
/** Default options that Desmost uses for `compile()` and `decompile()`. */
|
|
3
4
|
export const DEFAULT_OPTIONS = {
|
|
4
5
|
errors: "surface",
|
|
5
6
|
place_errors: "inline",
|
|
6
7
|
error_prefix: `[DESMOST ERROR]\n${LINE}\n`,
|
|
7
8
|
expand_errors: true,
|
|
9
|
+
check_args: true,
|
|
8
10
|
prettify: true,
|
|
9
11
|
dedent_text: true,
|
|
10
|
-
check_args: false,
|
|
11
12
|
ignore_comments: false,
|
|
12
13
|
ignore_all_blanks: false,
|
|
13
14
|
keep_leading_blanks: false,
|
package/dist/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAC5B;IACG,MAAM,EAAE,SAAS;IACjB,YAAY,EAAE,QAAQ;IACtB,YAAY,EAAE,oBAAoB,IAAI,IAAI;IAC5C,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;IACf,eAAe,EAAE,KAAK;IACtB,iBAAiB,EAAE,KAAK;IACxB,mBAAmB,EAAE,KAAK;IAC1B,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE,KAAK;CACd,CAAC;AAGF;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAA4C;IAEvE,OAAO;QACJ,GAAG,eAAe;QAClB,GAAG,OAAO;KACZ,CAAC;AACL,CAAC"}
|
package/dist/parser/ast.d.ts
CHANGED
|
@@ -1,40 +1,26 @@
|
|
|
1
|
-
import { UnrecoverableError } from "../errors.js";
|
|
2
1
|
import { Incantation, ArgIncantation } from "../magic/index.js";
|
|
3
2
|
export declare namespace Ast {
|
|
4
3
|
/** What kind of AST node this is. */
|
|
5
4
|
enum Kind {
|
|
6
5
|
EXPRESSION = "Expression",
|
|
7
|
-
INCANTATION_INVOCATION = "Incantation-Invocation"
|
|
8
|
-
INVALID_INCANTATION = "Invalid-Incantation"
|
|
6
|
+
INCANTATION_INVOCATION = "Incantation-Invocation"
|
|
9
7
|
}
|
|
10
8
|
/** A Desmos expression to add to the calculator. */
|
|
11
9
|
interface Expression {
|
|
12
10
|
kind: Kind.EXPRESSION;
|
|
13
11
|
data: Desmos.ExpressionState;
|
|
14
|
-
incantations:
|
|
12
|
+
incantations: IncantationInvocation<Incantation.Effect.LOCAL>[];
|
|
15
13
|
}
|
|
16
14
|
/** A pending incantation invocation that requires applying its argument (if any), then applying its effect. */
|
|
17
15
|
type IncantationInvocation<Effect extends Incantation.Effect = Incantation.Effect> = {
|
|
18
16
|
kind: Kind.INCANTATION_INVOCATION;
|
|
19
17
|
incantation: Incantation<Effect>;
|
|
20
|
-
arg_raw: undefined;
|
|
21
18
|
} | {
|
|
22
19
|
kind: Kind.INCANTATION_INVOCATION;
|
|
23
20
|
incantation: ArgIncantation<Effect>;
|
|
24
21
|
arg_raw: string | undefined;
|
|
25
22
|
};
|
|
26
|
-
/**
|
|
27
|
-
* An invalid invantation invocation that raised an error when parsed.
|
|
28
|
-
*
|
|
29
|
-
* This will be propogated to the user as an extra Desmos text expression (unless they have `errors: "suppress"` configured).
|
|
30
|
-
*/
|
|
31
|
-
interface InvalidInvocation {
|
|
32
|
-
kind: Kind.INVALID_INCANTATION;
|
|
33
|
-
incantation: Incantation;
|
|
34
|
-
arg_raw?: string;
|
|
35
|
-
error: UnrecoverableError;
|
|
36
|
-
}
|
|
37
23
|
}
|
|
38
24
|
/** An abstract object produced by the parser. */
|
|
39
|
-
export type Ast = Ast.Expression | Ast.IncantationInvocation
|
|
25
|
+
export type Ast = Ast.Expression | Ast.IncantationInvocation;
|
|
40
26
|
//# sourceMappingURL=ast.d.ts.map
|
package/dist/parser/ast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/parser/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/parser/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvD,yBAAiB,GAAG,CACpB;IACC,qCAAqC;IACrC,KAAY,IAAI;QAEf,UAAU,eAA2B;QACrC,sBAAsB,2BAA2B;KACjD;IAGD,oDAAoD;IACpD,UAAiB,UAAU;QAE1B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAA;QACrB,IAAI,EAAE,MAAM,CAAC,eAAe,CAAA;QAC5B,YAAY,EAAE,qBAAqB,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;KAC/D;IAGD,+GAA+G;IAC/G,KAAY,qBAAqB,CAAC,MAAM,SAAS,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,IACrF;QACD,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAA;QACjC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;KAChC,GACC;QACD,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAA;QACjC,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;QACnC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAC3B,CAAC;CACH;AAED,iDAAiD;AACjD,MAAM,MAAM,GAAG,GACZ,GAAG,CAAC,UAAU,GACd,GAAG,CAAC,qBAAqB,CAC3B"}
|
package/dist/parser/ast.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UnrecoverableError } from "../errors.js";
|
|
2
1
|
import { Incantation, ArgIncantation } from "../magic/index.js";
|
|
3
2
|
export var Ast;
|
|
4
3
|
(function (Ast) {
|
|
@@ -7,7 +6,6 @@ export var Ast;
|
|
|
7
6
|
(function (Kind) {
|
|
8
7
|
Kind["EXPRESSION"] = "Expression";
|
|
9
8
|
Kind["INCANTATION_INVOCATION"] = "Incantation-Invocation";
|
|
10
|
-
Kind["INVALID_INCANTATION"] = "Invalid-Incantation";
|
|
11
9
|
})(Kind = Ast.Kind || (Ast.Kind = {}));
|
|
12
10
|
})(Ast || (Ast = {}));
|
|
13
11
|
//# sourceMappingURL=ast.js.map
|
package/dist/parser/ast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/parser/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/parser/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvD,MAAM,KAAW,GAAG,CA8BnB;AA9BD,WAAiB,GAAG;IAEnB,qCAAqC;IACrC,IAAY,IAIX;IAJD,WAAY,IAAI;QAEf,iCAAqC,CAAA;QACrC,yDAAiD,CAAA;IAClD,CAAC,EAJW,IAAI,GAAJ,QAAI,KAAJ,QAAI,QAIf;AAuBF,CAAC,EA9BgB,GAAG,KAAH,GAAG,QA8BnB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GenericParser } from "./generic-parser.js";
|
|
2
2
|
import { Ast } from "./ast.js";
|
|
3
3
|
import type { DesmostOptions } from "../options.js";
|
|
4
|
-
import
|
|
4
|
+
import { DesmostError } from "../errors.js";
|
|
5
|
+
import type { NoMatch, Fallible } from "../errors.js";
|
|
5
6
|
import { Incantation } from "../magic/index.js";
|
|
6
7
|
import type { GLOBAL, LOCAL } from "../magic/index.js";
|
|
7
8
|
/**
|
|
@@ -11,52 +12,62 @@ export declare class DesmostParser extends GenericParser {
|
|
|
11
12
|
protected options?: DesmostOptions | undefined;
|
|
12
13
|
constructor(source: string, options?: DesmostOptions | undefined);
|
|
13
14
|
/**
|
|
14
|
-
* Parse the next semantic block of source code
|
|
15
|
+
* Parse the next semantic block of source code.
|
|
16
|
+
*
|
|
17
|
+
* This returns:
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* // an AST block(s) + any errors encountered
|
|
21
|
+
* { blocks: Ast[], errors: [...] }
|
|
22
|
+
*
|
|
23
|
+
* // ignored block + any errors encountered
|
|
24
|
+
* { blocks: [], errors: [...] }
|
|
25
|
+
*
|
|
26
|
+
* // parser has reached the end of the source
|
|
27
|
+
* undefined
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* `block: null` could be ignored content like comments, or it could be a parse that couldn't recover and so failed to produce a block.
|
|
15
31
|
*/
|
|
16
|
-
parse_next():
|
|
32
|
+
parse_next(): Fallible<{
|
|
33
|
+
blocks: Ast[];
|
|
34
|
+
errors: DesmostError[];
|
|
35
|
+
} | undefined>;
|
|
17
36
|
/**
|
|
18
37
|
* Parse Desmost syntax before the `::` separator, which may be:
|
|
19
38
|
*
|
|
20
39
|
* - 1 global incantation
|
|
21
40
|
* - 1+ local incantations
|
|
22
41
|
*/
|
|
23
|
-
parse_pre_sep():
|
|
24
|
-
global: Ast.IncantationInvocation<GLOBAL> |
|
|
42
|
+
parse_pre_sep(): Fallible<{
|
|
43
|
+
global: Ast.IncantationInvocation<GLOBAL> | null;
|
|
25
44
|
} | {
|
|
26
|
-
|
|
45
|
+
locals: Ast.IncantationInvocation<LOCAL>[];
|
|
27
46
|
}>;
|
|
28
47
|
/**
|
|
29
48
|
* Parse the Desmost `::` separator.
|
|
30
49
|
*/
|
|
31
|
-
parse_sep():
|
|
50
|
+
parse_sep(): Fallible<void>;
|
|
32
51
|
/**
|
|
33
52
|
* Parse Desmost syntax after the `::` separator, which may be:
|
|
34
53
|
*
|
|
35
54
|
* - 1 line of LaTeX
|
|
36
55
|
* - 1 expression incantation
|
|
37
56
|
*/
|
|
38
|
-
parse_post_sep():
|
|
39
|
-
parse_comment():
|
|
57
|
+
parse_post_sep(): Fallible<Ast.Expression>;
|
|
58
|
+
parse_comment(): Fallible<Ast.Expression>;
|
|
40
59
|
/**
|
|
41
60
|
* Parse a single line of arbitrary text.
|
|
42
61
|
*/
|
|
43
|
-
parse_line():
|
|
44
|
-
/**
|
|
45
|
-
* Attempt to parse a global incantation invocation.
|
|
46
|
-
*/
|
|
47
|
-
try_parse_global_incantation(): Ast.IncantationInvocation<GLOBAL> | Ast.InvalidInvocation | NoMatch;
|
|
62
|
+
parse_line(): Fallible<string>;
|
|
48
63
|
/**
|
|
49
|
-
* Attempt to parse
|
|
64
|
+
* Attempt to parse an incantation invocation allowed by `incantations`.
|
|
50
65
|
*/
|
|
51
|
-
|
|
66
|
+
try_parse_incantation<Effect extends Incantation.Effect>(incantations: Incantation<Effect>[]): Fallible<Ast.IncantationInvocation<Effect> | NoMatch>;
|
|
52
67
|
/**
|
|
53
68
|
* Attempt to parse an expression incantation invocation.
|
|
54
69
|
*/
|
|
55
|
-
try_parse_expr_incantation():
|
|
56
|
-
/**
|
|
57
|
-
* Attempt to parse an incantation identifier.
|
|
58
|
-
*/
|
|
59
|
-
try_parse_identifier<Effect extends Incantation.Effect>(incantations: Incantation<Effect>[]): Incantation<Effect> | NoMatch;
|
|
70
|
+
try_parse_expr_incantation(): Fallible<Ast.Expression | NoMatch>;
|
|
60
71
|
/**
|
|
61
72
|
* Parse an argument to an incantation, enclosed in `{}`.
|
|
62
73
|
*
|
|
@@ -121,6 +132,6 @@ export declare class DesmostParser extends GenericParser {
|
|
|
121
132
|
* - String / LaTeX: Track only balanced `{}` and escaped `\{\}`.
|
|
122
133
|
* - JavaScript object: The above, plus balanced string quotes.
|
|
123
134
|
*/
|
|
124
|
-
arg_type: Incantation.ArgType):
|
|
135
|
+
arg_type: Incantation.ArgType): Fallible<string>;
|
|
125
136
|
}
|
|
126
137
|
//# sourceMappingURL=desmost-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desmost-parser.d.ts","sourceRoot":"","sources":["../../src/parser/desmost-parser.ts"],"names":[],"mappings":"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