Finished expr-eval testing
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
edf4518494
commit
3a81441d0b
5 changed files with 260 additions and 132 deletions
|
@ -111,7 +111,7 @@ function simplify(tokens, unaryOps, binaryOps, ternaryOps, values) {
|
|||
* In the given instructions, replaces variable by expr.
|
||||
* @param {Instruction[]} tokens
|
||||
* @param {string} variable
|
||||
* @param {number} expr
|
||||
* @param {ExprEvalExpression} expr
|
||||
* @return {Instruction[]}
|
||||
*/
|
||||
function substitute(tokens, variable, expr) {
|
||||
|
@ -487,18 +487,6 @@ export class ExprEvalExpression {
|
|||
return evaluate(this.tokens, this, values)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of symbols (string of characters) in the expressions.
|
||||
* Can be functions, constants, or variables.
|
||||
* @returns {string[]}
|
||||
*/
|
||||
symbols(options) {
|
||||
options = options || {}
|
||||
const vars = []
|
||||
getSymbols(this.tokens, vars, options)
|
||||
return vars
|
||||
}
|
||||
|
||||
toString() {
|
||||
return expressionToString(this.tokens, false)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue