Struct FormulaParser
Parses formula strings into abstract syntax tree (AST) nodes. 公式剖析器,用於將公式字串剖析為抽象語法樹 (AST)。
public ref struct FormulaParser
- Inherited Members
Constructors
FormulaParser(string)
Initializes a new instance of the FormulaParser struct with the specified formula string. 使用指定的公式字串初始化 FormulaParser 結構的新執行個體。
public FormulaParser(string formula)
Parameters
formulastringThe formula string. / 公式字串。
Methods
Parse()
Starts parsing the formula. 開始剖析公式。
public AstNode Parse()
Returns
- AstNode
The parsed AST root node. / 剖析後的 AST 根節點。
Exceptions
- InvalidOperationException
When an unexpected token remains at the end of the formula. / 當公式結尾有未預期的語彙基元時擲出。