This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.
InlineSolvePosition
Defined in: packages/engine/src/types/ParsingResult.ts:20
One inline solve, and where it sits in its line.
An inline solve is an expression embedded in prose between backticks. A line can hold several, so positions are what let a host place each result against the right span rather than at the end of the line.
Properties
Section titled “Properties”columnNumber
Section titled “columnNumber”columnNumber: number;Defined in: packages/engine/src/types/ParsingResult.ts:30
One-based column, for hosts that report positions to a user.
end: number;Defined in: packages/engine/src/types/ParsingResult.ts:24
Character offset just past the end of the inline solve (its closing backtick).
error?
Section titled “error?”optional error?: string | null;Defined in: packages/engine/src/types/ParsingResult.ts:34
Message when this span failed, leaving others on the line intact.
errorCode?
Section titled “errorCode?”optional errorCode?: string | null;Defined in: packages/engine/src/types/ParsingResult.ts:41
The code of the failure in error (NO_PREFIX_PARSELET,
UNDEFINED_VARIABLE), the same code the expression throws on its own:
what a host branches on. Null or absent when error is. A failure the
expression returned as a value keeps its code on the value in result.
errorSpan?
Section titled “errorSpan?”optional errorSpan?: SourceSpan | null;Defined in: packages/engine/src/types/ParsingResult.ts:48
Where in the line the failure in error is: character offsets into
the line’s text (not the expression’s), the one-based line number, and the
one-based column. Null when the engine has no position for it (an
undefined variable is raised with none), and null or absent when error is.
expression
Section titled “expression”expression: string;Defined in: packages/engine/src/types/ParsingResult.ts:26
The expression text, without the surrounding backticks.
lineNumber
Section titled “lineNumber”lineNumber: number;Defined in: packages/engine/src/types/ParsingResult.ts:28
One-based line number.
result?
Section titled “result?”optional result?: Value | null;Defined in: packages/engine/src/types/ParsingResult.ts:32
The evaluated value, or null when evaluation failed or was skipped.
start: number;Defined in: packages/engine/src/types/ParsingResult.ts:22
Character offset where the inline solve starts (its opening s and backtick), within its line.