Closed abdul-qadirdeveloper closed 10 years ago
I believe Jace.Tokenizer.TokenReader.IsPartOfVariable
is the only logic that discerns what characters are valid as parts of variable names. The only acknowledged characters are alphanumeric with the restriction that numeric characters cannot begin the variable name.
Jace.NET simply ignores $
characters (among some others), so your input expression is basically read as "1+2+3"
. So this isn't really wrong behavior so much as it is a feature request to support $
as a valid character in variable names.
To implement this yourself, I believe you can just add a clause to the or-chain in IsPartOfVariable
to check whether the character is equal to $
. I did so and it worked for me.
This is fixed in Jace 0.8.7. It will no longer silently ignore invalid characters, but it will now throw a ParseException.
I provided expression $1+$2+$3 and variables list as follows $1=0 $2=0 $3=0 it should return 0, but it returned 6.