@ZedThree , the refactor for the call chains parsing looks good, however, I've found a few issues with it that somehow made it past the tests. I've updated the tests to be more rigorous now, and should catch these issues now.
One issue was that the 'parent' group wasn't getting properly picked up when there were () in the call chain (for example when indexing into an array). Unfortunately I don't think this can't be done with regex alone because it requires bracket matching.
Another issue along the same vain was with the 'arguments' group for a subcall also not always being correct because of bracket matching.
To fix these issues, the contents of the parentheses are first striped prior to applying the regex. Then each layer of parentheses are stripped checked for matches. Additionally, I've moved the subcall section into the call section sense both can exist on the same line, and both get stored to self.calls anyways.
@ZedThree , the refactor for the call chains parsing looks good, however, I've found a few issues with it that somehow made it past the tests. I've updated the tests to be more rigorous now, and should catch these issues now.
One issue was that the 'parent' group wasn't getting properly picked up when there were () in the call chain (for example when indexing into an array). Unfortunately I don't think this can't be done with regex alone because it requires bracket matching.
Another issue along the same vain was with the 'arguments' group for a subcall also not always being correct because of bracket matching.
To fix these issues, the contents of the parentheses are first striped prior to applying the regex. Then each layer of parentheses are stripped checked for matches. Additionally, I've moved the subcall section into the call section sense both can exist on the same line, and both get stored to self.calls anyways.