@univerjs/engine-formula v0.5.0-beta.1 • Docs


Class: LexerTreeBuilder

Extends

Constructors

new LexerTreeBuilder()

new LexerTreeBuilder(): LexerTreeBuilder

Returns

LexerTreeBuilder

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/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

ParameterType
formulaStringstring

Returns

number

Defined in

submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:179


convertRefersToAbsolute()

convertRefersToAbsolute(
   formulaString, 
   startAbsoluteRefType, 
   endAbsoluteRefType): string

Parameters

ParameterType
formulaStringstring
startAbsoluteRefTypeAbsoluteRefType
endAbsoluteRefTypeAbsoluteRefType

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:266


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:84


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getCurrentLexerNode()

getCurrentLexerNode(): LexerNode

Returns

LexerNode

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

ParameterType
formulaStringstring
strIndexnumber

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

ParameterType
sequenceArrayISequenceArray[]

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

ParameterTypeDefault value
formulaStringstringundefined
refOffsetXnumberundefined
refOffsetYnumberundefined
ignoreAbsolutebooleanfalse

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

ParameterType
formulaStringstring

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

ParameterType
formulaStringstring

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

ParameterTypeDefault value
formulaStringstringundefined
transformSuffixbooleantrue
injectDefinedName?(sequenceArray) => { definedNames: string[]; hasDefinedName: boolean; sequenceString: string; }undefined
simpleCheckDefinedName?(formulaString) => booleanundefined

Returns

undefined | VALUE | LexerNode | (string | LexerNode)[]

Defined in

submodules/univer/packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts:619