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.
ScanLineResult
Defined in: packages/engine/src/lexer/ExpressionLexer.ts:170
Result from a single line processed by scanDocument(). Combines line classification, tokenized tokens, and inline solve spans into a single structure, eliminating the need for separate classifyLine() findInlineSolves(), and per-line Lexer.reset() calls.
Properties
Section titled “Properties”classification
Section titled “classification”classification: LineClassification;Defined in: packages/engine/src/lexer/ExpressionLexer.ts:180
The line classification.
endOffset
Section titled “endOffset”endOffset: number;Defined in: packages/engine/src/lexer/ExpressionLexer.ts:178
Character offset of the line end (before newline).
error?
Section titled “error?”optional error?: EngineError;Defined in: packages/engine/src/lexer/ExpressionLexer.ts:192
The structured error the tokeniser raised on this line, if it raised one (an unterminated string literal is the one it can raise today). The line carries no tokens then, and the rest of the document is unaffected: a half-typed quote used to escape ExpressionLexer.scanDocument as a throw and take every other line’s result down with it.
inlineSolves
Section titled “inlineSolves”inlineSolves: InlineSolveSpan[];Defined in: packages/engine/src/lexer/ExpressionLexer.ts:184
Inline solve spans found in this line (empty if none).
lineNumber
Section titled “lineNumber”lineNumber: number;Defined in: packages/engine/src/lexer/ExpressionLexer.ts:174
1-based line number within the document.
startOffset
Section titled “startOffset”startOffset: number;Defined in: packages/engine/src/lexer/ExpressionLexer.ts:176
Character offset of the line start within the document.
text: string;Defined in: packages/engine/src/lexer/ExpressionLexer.ts:172
The raw line text (without trailing newline).
tokens
Section titled “tokens”tokens: Token[];Defined in: packages/engine/src/lexer/ExpressionLexer.ts:182
Tokenized tokens (empty array if line is skipped).