desmost 0.9.1 → 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.
Files changed (97) hide show
  1. package/README.md +11 -2
  2. package/dist/compiler/compile.d.ts +1 -7
  3. package/dist/compiler/compile.d.ts.map +1 -1
  4. package/dist/compiler/compile.js +3 -94
  5. package/dist/compiler/compile.js.map +1 -1
  6. package/dist/compiler/compiler.d.ts +56 -0
  7. package/dist/compiler/compiler.d.ts.map +1 -0
  8. package/dist/compiler/compiler.js +209 -0
  9. package/dist/compiler/compiler.js.map +1 -0
  10. package/dist/compiler/format.d.ts +2 -2
  11. package/dist/compiler/format.d.ts.map +1 -1
  12. package/dist/compiler/format.js +18 -9
  13. package/dist/compiler/format.js.map +1 -1
  14. package/dist/decompiler/decompile.d.ts +1 -1
  15. package/dist/decompiler/decompile.d.ts.map +1 -1
  16. package/dist/decompiler/extract.d.ts.map +1 -1
  17. package/dist/decompiler/extract.js +7 -3
  18. package/dist/decompiler/extract.js.map +1 -1
  19. package/dist/errors.d.ts +35 -27
  20. package/dist/errors.d.ts.map +1 -1
  21. package/dist/errors.js +46 -48
  22. package/dist/errors.js.map +1 -1
  23. package/dist/index.internal.d.ts +1 -1
  24. package/dist/index.internal.d.ts.map +1 -1
  25. package/dist/magic/global/desmos.d.ts +2 -2
  26. package/dist/magic/global/desmos.d.ts.map +1 -1
  27. package/dist/magic/global/desmos.js +3 -2
  28. package/dist/magic/global/desmos.js.map +1 -1
  29. package/dist/magic/global/viewport.d.ts +2 -2
  30. package/dist/magic/global/viewport.d.ts.map +1 -1
  31. package/dist/magic/global/viewport.js +5 -5
  32. package/dist/magic/global/viewport.js.map +1 -1
  33. package/dist/magic/incantation.d.ts +4 -4
  34. package/dist/magic/incantation.d.ts.map +1 -1
  35. package/dist/magic/incantation.js +15 -8
  36. package/dist/magic/incantation.js.map +1 -1
  37. package/dist/magic/local/colour.d.ts +3 -1
  38. package/dist/magic/local/colour.d.ts.map +1 -1
  39. package/dist/magic/local/colour.js +15 -11
  40. package/dist/magic/local/colour.js.map +1 -1
  41. package/dist/magic/local/label.d.ts.map +1 -1
  42. package/dist/magic/local/label.js +7 -7
  43. package/dist/magic/local/label.js.map +1 -1
  44. package/dist/magic/local/line.d.ts +2 -2
  45. package/dist/magic/local/line.d.ts.map +1 -1
  46. package/dist/magic/local/line.js +0 -1
  47. package/dist/magic/local/line.js.map +1 -1
  48. package/dist/options.d.ts +57 -23
  49. package/dist/options.d.ts.map +1 -1
  50. package/dist/options.js +2 -1
  51. package/dist/options.js.map +1 -1
  52. package/dist/parser/ast.d.ts +3 -17
  53. package/dist/parser/ast.d.ts.map +1 -1
  54. package/dist/parser/ast.js +0 -2
  55. package/dist/parser/ast.js.map +1 -1
  56. package/dist/parser/desmost-parser.d.ts +33 -22
  57. package/dist/parser/desmost-parser.d.ts.map +1 -1
  58. package/dist/parser/desmost-parser.js +106 -92
  59. package/dist/parser/desmost-parser.js.map +1 -1
  60. package/dist/parser/generic-parser.d.ts +19 -10
  61. package/dist/parser/generic-parser.d.ts.map +1 -1
  62. package/dist/parser/generic-parser.js +56 -16
  63. package/dist/parser/generic-parser.js.map +1 -1
  64. package/dist/utils.d.ts +9 -2
  65. package/dist/utils.d.ts.map +1 -1
  66. package/dist/utils.js +13 -2
  67. package/dist/utils.js.map +1 -1
  68. package/package.json +5 -2
  69. package/src/compiler/compile.ts +7 -120
  70. package/src/compiler/compiler.ts +275 -0
  71. package/src/compiler/format.ts +19 -7
  72. package/src/decompiler/decompile.ts +1 -1
  73. package/src/decompiler/extract.ts +3 -1
  74. package/src/errors.ts +40 -24
  75. package/src/index.internal.ts +1 -1
  76. package/src/magic/.template.ts +2 -2
  77. package/src/magic/global/desmos.ts +7 -9
  78. package/src/magic/global/viewport.ts +11 -17
  79. package/src/magic/incantation.ts +21 -22
  80. package/src/magic/local/colour.ts +23 -13
  81. package/src/magic/local/label.ts +11 -17
  82. package/src/magic/local/line.ts +2 -2
  83. package/src/options.ts +81 -47
  84. package/src/parser/ast.ts +1 -21
  85. package/src/parser/desmost-parser.ts +131 -135
  86. package/src/parser/generic-parser.ts +71 -29
  87. package/src/utils.ts +25 -3
  88. package/dist/compiler/evaluate.d.ts +0 -18
  89. package/dist/compiler/evaluate.d.ts.map +0 -1
  90. package/dist/compiler/evaluate.js +0 -93
  91. package/dist/compiler/evaluate.js.map +0 -1
  92. package/dist/desmos.d.ts +0 -16
  93. package/dist/desmos.d.ts.map +0 -1
  94. package/dist/desmos.js +0 -19
  95. package/dist/desmos.js.map +0 -1
  96. package/src/compiler/evaluate.ts +0 -128
  97. package/src/desmos.ts +0 -22
@@ -1,6 +1,6 @@
1
1
  import { Incantation, ArgIncantation, type LOCAL } from "../incantation.js";
2
2
  import type { DesmostOptions } from "../../options.js";
3
- import { type Unrecoverable } from "../../errors.js";
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): Unrecoverable<LineOptions>;
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,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,UAAU,WAAW;IAEpB,KAAK,CAAC,EAAI,M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antation, ArgIncantation } from "../incantation.js";
2
- import {} from "../../errors.js";
3
2
  const VALID_FIELDS = ["style", "width", "opacity"];
4
3
  export class LineIncantation extends ArgIncantation {
5
4
  description = "Change line styles for a rendered block.";
@@ -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;AAGzE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAUlD,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,C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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 *surfaced* to the end user?
33
+ * How should errors be displayed?
28
34
  *
29
- * - `surface` (default): Blocks that result in errors will become Desmos text expressions containing the error message, leaving other expressions unaffected.
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. This means you don't get any output at all, but errors are also immediately obvious.
32
- * - Note that this will *clear all expressions* in the calculator instance.
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]\n`.
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,7 +60,7 @@ 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`, meaning all output is shown.
63
+ * Defaults to `true` all output is shown.
57
64
  */
58
65
  expand_errors: boolean;
59
66
  /**
@@ -63,57 +70,84 @@ export interface DesmostOptions {
63
70
  *
64
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.
65
72
  *
66
- * Defaults to `true`, meaning arguments are checked. The Desmos API happily accepts and ignores invalid fields, so Desmost provides a safety net for you ;)
73
+ * Defaults to `true` arguments are checked. The Desmos API happily accepts and ignores invalid fields, so Desmost provides a safety net for you ;)
67
74
  */
68
75
  check_args: boolean;
69
76
  /**
70
77
  * Prettify LaTeX output so it renders nicely in the Desmos editor?
71
78
  *
72
- * Defaults to `true`, meaning LaTeX is prettified.
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.
73
82
  */
74
83
  prettify: boolean;
75
84
  /**
76
85
  * Strip common indentation from `/text{}` blocks?
77
86
  *
78
- * Defaults to `true`, meaning text is dedented.
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.
79
97
  */
80
98
  dedent_text: boolean;
81
99
  /**
82
- * Should `%` LaTeX comments be ignored, instead of turned into text expressions (notes)?
100
+ * Should `%` LaTeX comments be ignored, instead of turned into text blocks (notes)?
83
101
  *
84
- * Defaults to `false`, meaning comments are kept.
102
+ * ```hs
103
+ * % Do I become a text expression?
104
+ * y = x
105
+ * ```
106
+ *
107
+ * Defaults to `false` – comments are kept.
85
108
  */
86
109
  ignore_comments: boolean;
87
110
  /**
88
111
  * Should all line breaks be ignored, instead of kept as blank expressions?
89
112
  *
90
- * Defaults to `false`, meaning all blank lines are kept.
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.
91
122
  */
92
123
  ignore_all_blanks: boolean;
93
124
  /**
94
125
  * Should trailing blank lines at the start of the source be kept as blank expressions?
95
126
  *
96
- * Defaults to `false`, meaning leading blank lines are ignored.
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.
97
136
  */
98
137
  keep_leading_blanks: boolean;
99
138
  /**
100
139
  * Should trailing blank lines at the end of the source be kept as blank expressions?
101
140
  *
102
- * Defaults to `false`, meaning trailing blank lines are ignored.
141
+ * Defaults to `false` trailing blank lines are ignored.
103
142
  */
104
143
  keep_trailing_blanks: boolean;
105
144
  /**
106
- * Return debug diagnostics?
145
+ * Return debug diagnostics from `compile()`?
107
146
  *
108
- * 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.
109
148
  *
110
- * Defaults to `false`, meaning `compile()` returns `void`.
149
+ * Defaults to `false` `compile()` returns `void`.
111
150
  */
112
151
  debug: boolean;
113
152
  }
114
- export declare const DEFAULT_OPTIONS: DesmostOptions;
115
- /**
116
- * Fill in `options` with Desmost's defaults to produce a complete `DesmostOptions` config.
117
- */
118
- export declare function fill_defaults(options: Partial<DesmostOptions> | undefined): DesmostOptions;
119
153
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,cAAc;IAE9B;;;;;;;;;O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E,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,
@@ -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;AAkI7C,MAAM,CAAC,MAAM,eAAe,GAC5B;IACG,MAAM,EAAE,SAAS;IACjB,YAAY,EAAE,QAAQ;IACtB,YAAY,EAAE,oBAAoB,IAAI,IAAI;IAC5C,aAAa,EAAE,IAAI;IACjB,QAAQ,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,KAAK;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"}
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"}
@@ -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: Array<IncantationInvocation<Incantation.Effect.LOCAL> | InvalidInvocation>;
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 | Ast.InvalidInvocation;
25
+ export type Ast = Ast.Expression | Ast.IncantationInvocation;
40
26
  //# sourceMappingURL=ast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/parser/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvD,yBAAiB,GAAG,CACpB;IACC,qCAAqC;IACrC,KAAY,IAAI;QAEf,UAAU,eAA2B;QACrC,sBAAsB,2BAA2B;QACjD,mBAAmB,wBAA2B;KAC9C;IAGD,oDAAoD;IACpD,UAAiB,UAAU;QAE1B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAA;QACrB,IAAI,EA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AW,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"}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/parser/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvD,MAAM,KAAW,GAAG,CAgDnB;AAhDD,WAAiB,GAAG;IAEnB,qCAAqC;IACrC,IAAY,IAKX;IALD,WAAY,IAAI;QAEf,iCAAqC,CAAA;QACrC,yDAAiD,CAAA;QACjD,mDAA8C,CAAA;IAC/C,CAAC,EALW,IAAI,GAAJ,QAAI,KAAJ,QAAI,QAKf;AAwCF,CAAC,EAhDgB,GAAG,KAAH,GAAG,QAgDnB"}
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 type { NoMatch, Unrecoverable } from "../errors.js";
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, producing an `Ast` object, or `null` if the parser has successfully reached the end of the 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(): Ast | null;
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(): Unrecoverable<{
24
- global: Ast.IncantationInvocation<GLOBAL> | Ast.InvalidInvocation;
42
+ parse_pre_sep(): Fallible<{
43
+ global: Ast.IncantationInvocation<GLOBAL> | null;
25
44
  } | {
26
- local: Array<Ast.IncantationInvocation<LOCAL> | Ast.InvalidInvocation>;
45
+ locals: Ast.IncantationInvocation<LOCAL>[];
27
46
  }>;
28
47
  /**
29
48
  * Parse the Desmost `::` separator.
30
49
  */
31
- parse_sep(): Unrecoverable<void>;
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(): Unrecoverable<Ast.Expression>;
39
- parse_comment(): Unrecoverable<Ast.Expression>;
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(): Unrecoverable<string>;
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 a local incantation invocation.
64
+ * Attempt to parse an incantation invocation allowed by `incantations`.
50
65
  */
51
- try_parse_local_incantation(): Ast.IncantationInvocation<LOCAL> | Ast.InvalidInvocation | NoMatch;
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(): Unrecoverable<Ast.Expression | NoMatch>;
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): Unrecoverable<string>;
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":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGxD,OAAO,EACN,WAAW,EAEX,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAQ,MAAM,UAAU,CAAC;AAGpD;;GAEG;AACH,qBAAa,aAAc,SAAQ,aAAa;IAEnB,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc;gBAAlD,MAAM,EAAE,MAAM,EAAY,OAAO,CAAC,EAAE,cAAc,YAAA;IAQ9D;;OAEG;IACI,UAAU,IAAI,GAAG,GAAG,IAAI;IAkD/B;;;;;OAKG;IACH,aAAa,IACZ,aAAa,CACX;QAAE,MAAM,EAAE,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAC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