Closed chioni16 closed 11 months ago
Depends on #1490 being merged
When renaming, the character directly after variable names get deleted.
I have added a fix. This had to do with the way half open/exclusive ranges were handled, as you had suspected.
Thanks!
This feature depends on having the right span information for identifiers in the parse tree. Currently, some changes are needed to either add the missing span information in some cases, or improve the already present spans (look for one-off errors).
The rest of the "goto-*" functions also depend on the availability of proper spans. But in their case, as no modification is made to the source code, lack of accurate spans is less of an issue. But
rename
does modify the source code and hence having incorrect spans can result in unintentionally overwriting pieces of source code, which is highly undesirable.The changes made as part of this PR provide the necessary code for
rename
to work. Correcting the parse tree is expected to be done as part of future PRsA non-exhaustive list of changes to be made to parse tree: (https://github.com/hyperledger/solang/pull/1411#issuecomment-1648031602)