fix: unmatched parens backtracking + keep indent
This PR provides better parsing, trying to backtrack to a state when all parenthesis were correctly matched if the first pass had been invalid. This helps in situations when there are calculations made outside a method or markdown numbered list:
4) 4+4 - now correctly parsed
4. 4+4 - already works
method(arg1, 4) 4+4 - now works, useful when calculating for myself on the same line
Also the expression is now being evaluated from the first non-space character, keeping original indent in tact.
Is there something that could be improved upon to get this PR merged?
Hi, I just wanted to give a heads up that I consider this PR finished, so I wanted to ask @hrsh7th if you would consider merging it.
@hrsh7th ping
thank you!