We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following example where we'd like to replace
x! (x + 1)!
by
factorial(x)! factorial(x + 1)!
Currently, the way to do this would be to process the string until we encounter a !, and then start backtracking workout out the logic.
!
Suppose we had access to groups of braces, perhaps something like:
braces = {"end_index": "begin_index"}
For example, the second case above would be
braces = {4:0}
when encoutering a ! at position index, we could simply do something like the following:
index
if tokens[index-1] == ")": begin_index = braces[index-1] tokens[begin_index].string = "factorial("
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider the following example where we'd like to replace
by
Currently, the way to do this would be to process the string until we encounter a
!
, and then start backtracking workout out the logic.Suppose we had access to groups of braces, perhaps something like:
For example, the second case above would be
when encoutering a
!
at positionindex
, we could simply do something like the following:The text was updated successfully, but these errors were encountered: