Skip to content

This site describes solve-engine 2.44.0, the version npm installs.

UnifiedParsingOptions

Defined in: packages/engine/src/types/ParsingResult.ts:125

How a document should be parsed.

includeDiagnostics?: boolean;

Defined in: packages/engine/src/types/ParsingResult.ts:149

Collect a stage-by-stage trace. For tooling only: it is not free.


includeHighlights?: boolean;

Defined in: packages/engine/src/types/ParsingResult.ts:147

Include syntax-highlighting spans.


includeLineInfo?: boolean;

Defined in: packages/engine/src/types/ParsingResult.ts:145

Include line offsets and positions. Costs a little to compute.


inputType: "code" | "raw" | "markdown";

Defined in: packages/engine/src/types/ParsingResult.ts:133

How to read the input.

markdown respects headings, comments and code fences, and looks for inline solves. raw treats every line as an expression. code is for input already known to be expressions.


localeCode?: string;

Defined in: packages/engine/src/types/ParsingResult.ts:143

Ignored, and to be removed in 3.0. The engine reads keywords and numbers in the locale it was created with, which a single parse cannot change: parseDocument("1.000 + 1", { inputType: "markdown", localeCode: "de" }) on an English engine answers 2, not 1,001. The worker’s own WorkerEngineOptions.localeCode is a different option, and is read.