@univerjs/engine-formula v0.5.0-beta.1 • 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 | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
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
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:179
convertRefersToAbsolute()
convertRefersToAbsolute(
formulaString,
startAbsoluteRefType,
endAbsoluteRefType): string
Parameters
Parameter | Type |
---|---|
formulaString | string |
startAbsoluteRefType | AbsoluteRefType |
endAbsoluteRefType | AbsoluteRefType |
Returns
string
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:266
dispose()
dispose(): void
Returns
void
Overrides
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:84
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
getCurrentLexerNode()
getCurrentLexerNode(): LexerNode
Returns
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:134
getFunctionAndParameter()
getFunctionAndParameter(formulaString, strIndex): undefined | {
functionName: token;
paramIndex: number;
}
Parameters
Parameter | Type |
---|---|
formulaString | string |
strIndex | number |
Returns
undefined
| {
functionName
: token
;
paramIndex
: number
;
}
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:138
getSequenceNode()
getSequenceNode(sequenceArray): (string | ISequenceNode)[]
Parameters
Parameter | Type |
---|---|
sequenceArray | ISequenceArray [] |
Returns
(string
| ISequenceNode
)[]
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:410
getUpLevel()
getUpLevel(): number
Returns
number
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:94
isBracesClose()
isBracesClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:122
isBracketClose()
isBracketClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:126
isColonClose()
isColonClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:98
isColonOpen()
isColonOpen(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:102
isDoubleQuotationClose()
isDoubleQuotationClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:106
isLambdaClose()
isLambdaClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:114
isLambdaOpen()
isLambdaOpen(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:110
isSingleQuotationClose()
isSingleQuotationClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:118
isSquareBracketClose()
isSquareBracketClose(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:130
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
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:330
nodeMakerTest()
nodeMakerTest(formulaString): undefined | VALUE | (string | LexerNode)[]
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
undefined
| VALUE
| (string
| LexerNode
)[]
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:615
sequenceNodesBuilder()
sequenceNodesBuilder(formulaString): undefined | (string | ISequenceNode)[]
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
undefined
| (string
| ISequenceNode
)[]
Defined in
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:238
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
submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:619