Should the Parser.set
function validate variable names?
#3290
Closed
orelbn
started this conversation in
Design decisions
Replies: 3 comments 15 replies
-
Thanks, good point. Right now the parser allows setting any variable name, and only when using the variable in an expression, an error will be thrown. It would be good to validate the variable name in the method @nkumawat34 this actually is a very nice first issue, is this something you would like to pick up? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes I will pick it. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to documentation, variable names must meet certain criteria:
https://mathjs.org/docs/expressions/syntax.html#constants-and-variables
But if you use the set function on the parser, it does not validate that criteria.
Beta Was this translation helpful? Give feedback.
All reactions