@univerjs/engine-formula v0.4.2 • Docs
Class: LexerTreeBuilder
Extends
Constructors
new LexerTreeBuilder()
new LexerTreeBuilder(): LexerTreeBuilder
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
Methods
checkIfAddBracket()
checkIfAddBracket(formulaString): number
Estimate the number of right brackets that need to be automatically added to the end of the formula.
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
number
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:179 (opens in a new tab)
convertRefersToAbsolute()
convertRefersToAbsolute(
formulaString,
startAbsoluteRefType,
endAbsoluteRefType): string
Parameters
Parameter | Type |
---|---|
formulaString | string |
startAbsoluteRefType | AbsoluteRefType |
endAbsoluteRefType | AbsoluteRefType |
Returns
string
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:266 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Overrides
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:84 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getCurrentLexerNode()
getCurrentLexerNode(): LexerNode
Returns
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:134 (opens in a new tab)
getFunctionAndParameter()
getFunctionAndParameter(formulaString, strIndex): undefined | {
functionName: token;
paramIndex: number;
}
Parameters
Parameter | Type |
---|---|
formulaString | string |
strIndex | number |
Returns
undefined
| {
functionName
: token
;
paramIndex
: number
;
}
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:138 (opens in a new tab)
getSequenceNode()
getSequenceNode(sequenceArray): (string | ISequenceNode)[]
Parameters
Parameter | Type |
---|---|
sequenceArray | ISequenceArray [] |
Returns
(string
| ISequenceNode
)[]
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:410 (opens in a new tab)
getUpLevel()
getUpLevel(): number
Returns
number
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:94 (opens in a new tab)
isBracesClose()
isBracesClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:122 (opens in a new tab)
isBracketClose()
isBracketClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:126 (opens in a new tab)
isColonClose()
isColonClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:98 (opens in a new tab)
isColonOpen()
isColonOpen(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:102 (opens in a new tab)
isDoubleQuotationClose()
isDoubleQuotationClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:106 (opens in a new tab)
isLambdaClose()
isLambdaClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:114 (opens in a new tab)
isLambdaOpen()
isLambdaOpen(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:110 (opens in a new tab)
isSingleQuotationClose()
isSingleQuotationClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:118 (opens in a new tab)
isSquareBracketClose()
isSquareBracketClose(): boolean
Returns
boolean
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:130 (opens in a new tab)
moveFormulaRefOffset()
moveFormulaRefOffset(
formulaString,
refOffsetX,
refOffsetY,
ignoreAbsolute): string
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
refOffsetX | number | undefined |
refOffsetY | number | undefined |
ignoreAbsolute | boolean | false |
Returns
string
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:330 (opens in a new tab)
nodeMakerTest()
nodeMakerTest(formulaString): undefined | VALUE | (string | LexerNode)[]
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
undefined
| VALUE
| (string
| LexerNode
)[]
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:615 (opens in a new tab)
sequenceNodesBuilder()
sequenceNodesBuilder(formulaString): undefined | (string | ISequenceNode)[]
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
undefined
| (string
| ISequenceNode
)[]
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:238 (opens in a new tab)
treeBuilder()
treeBuilder(
formulaString,
transformSuffix,
injectDefinedName?,
simpleCheckDefinedName?): undefined | VALUE | LexerNode | (string | LexerNode)[]
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
transformSuffix | boolean | true |
injectDefinedName ? | (sequenceArray ) => { definedNames : string []; hasDefinedName : boolean ; sequenceString : string ; } | undefined |
simpleCheckDefinedName ? | (formulaString ) => boolean | undefined |
Returns
undefined
| VALUE
| LexerNode
| (string
| LexerNode
)[]
Defined in
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:619 (opens in a new tab)