josdejong/mathjs

Indicating expression location for error

Open

#2,318 opened on Sep 19, 2021

View on GitHub
 (15 comments) (0 reactions) (0 assignees)JavaScript (13,832 stars) (1,298 forks)batch import
featurehelp wanted

Description

When evaluating with multiple expressions and one of them has an error:

math.evaluate(["1+1","2+"])

The error is:

SyntaxError: Unexpected end of expression (char 3)

I would like to know which is the expression with the error: SyntaxError: Unexpected end of expression (expr 2, char 3)

Contributor guide