fix: #3579 conditional parsed as optional chaining#3584
Conversation
|
Hmm, it's very special-case. I worry just slightly about the tokenizer becoming cluttered with lots of such special cases over time. This could be merged, but is it worth taking a second to consider whether any of the following would be cleaner:
Just some thoughts. If you prefer, I am willing to take a quick stab at any of the above, whichever sounds best to you -- none of them should take long, and I think any of them would overall simplify the tokenization rather that just adding another wrinkle to it. Let me know. Or I can just merge this as is if you prefer. |
|
Agree, this is an ugly hotfix. We really need to come up with something better. I would appreciate if you can try out improving the tokenization Glen! It can be that regexps will come in handy here (utilizing In the meantime, I'll merge this fix, so we can publish a new version with optional chaining and an important fixes for a bug introduced in |
|
Published now in |
|
OK, I will bump up the priority on reviving #3423 but on top of current develop branch, and make sure to include smoother delimiter tokenization. I think it will be a fresh start because a fair amount has changed since then, but should be faster having done it once. Hope to get a start on it tonight. |
Fixes #3579
Solves
math.evaluate('true?.3:.7')from being parsed as optional chaining and throwing an error.