Skip to content

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.

ExpressionTokens

Defined in: packages/engine/src/engine/ExpressionEngine.ts:465

The part of one expression the engine reads as code, as ExpressionEngine.readExpressionTokens returns it.

readonly start: number;

Defined in: packages/engine/src/engine/ExpressionEngine.ts:473

The index of the first token the parser reads. Nonzero only when the line opens with a label the parser set aside (“rent: 1200” starts at the token after the colon), since a label is prose, not code.


readonly tokens: readonly Token[];

Defined in: packages/engine/src/engine/ExpressionEngine.ts:467

The expression’s normalised tokens, with offsets into the text that was read.


readonly unit:
| DocumentUnit
| null;

Defined in: packages/engine/src/engine/ExpressionEngine.ts:479

The unit the expression defines when it is a user-unit definition (1 sprint = 2 weeks), whose words name a unit rather than a variable; null otherwise.