@univerjs/engine-formula v0.5.4
Class: LexerTreeBuilder
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:59
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:96 |
Methods
checkIfAddBracket()
checkIfAddBracket(formulaString): number
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:179
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
convertRefersToAbsolute()
convertRefersToAbsolute(
formulaString,
startAbsoluteRefType,
endAbsoluteRefType,
currentSheetName): string
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:266
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
startAbsoluteRefType | AbsoluteRefType | undefined |
endAbsoluteRefType | AbsoluteRefType | undefined |
currentSheetName | string | '' |
Returns
string
dispose()
dispose(): void
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:84
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
getCurrentLexerNode()
getCurrentLexerNode(): LexerNode
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:134
Returns
getFunctionAndParameter()
getFunctionAndParameter(formulaString, strIndex):
| undefined
| {
functionName: string;
paramIndex: number;
}
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:138
Parameters
Parameter | Type |
---|---|
formulaString | string |
strIndex | number |
Returns
| undefined
| {
functionName
: string
;
paramIndex
: number
;
}
getSequenceNode()
getSequenceNode(sequenceArray): (string | ISequenceNode)[]
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:410
Parameters
Parameter | Type |
---|---|
sequenceArray | ISequenceArray [] |
Returns
(string
| ISequenceNode
)[]
getUpLevel()
getUpLevel(): number
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:94
Returns
number
isBracesClose()
isBracesClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:122
Returns
boolean
isBracketClose()
isBracketClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:126
Returns
boolean
isColonClose()
isColonClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:98
Returns
boolean
isColonOpen()
isColonOpen(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:102
Returns
boolean
isDoubleQuotationClose()
isDoubleQuotationClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:106
Returns
boolean
isLambdaClose()
isLambdaClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:114
Returns
boolean
isLambdaOpen()
isLambdaOpen(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:110
Returns
boolean
isSingleQuotationClose()
isSingleQuotationClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:118
Returns
boolean
isSquareBracketClose()
isSquareBracketClose(): boolean
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:130
Returns
boolean
moveFormulaRefOffset()
moveFormulaRefOffset(
formulaString,
refOffsetX,
refOffsetY,
ignoreAbsolute): string
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:330
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
refOffsetX | number | undefined |
refOffsetY | number | undefined |
ignoreAbsolute | boolean | false |
Returns
string
nodeMakerTest()
nodeMakerTest(formulaString):
| undefined
| VALUE
| (string | LexerNode)[]
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:615
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
| undefined
| VALUE
| (string
| LexerNode
)[]
sequenceNodesBuilder()
sequenceNodesBuilder(formulaString):
| undefined
| (string | ISequenceNode)[]
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:238
Parameters
Parameter | Type |
---|---|
formulaString | string |
Returns
| undefined
| (string
| ISequenceNode
)[]
treeBuilder()
treeBuilder(
formulaString,
transformSuffix,
injectDefinedName?,
simpleCheckDefinedName?):
| undefined
| VALUE
| LexerNode
| (string | LexerNode)[]
Defined in: submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:619
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
transformSuffix | boolean | true |
injectDefinedName ? | (sequenceArray ) => { definedNames : string []; hasDefinedName : boolean ; sequenceString : string ; } | undefined |
simpleCheckDefinedName ? | (formulaString ) => boolean | undefined |