Join GitHub today
Distinction between Import braces and string interpolation braces #424 #454
This PR is a proposed fix for #424.
An important note would be that the proposed solution splits the "left brace" case into two to help distinguish between an import brace and a string interpolation one. The existing code contemplated both cases within the same block, creating multiple "inner" boolean checks to distinguish between the two cases. Keeping them separate allows for more fine tuning in the future and IMHO, simpler code to reason about due to less branching logic.
I'm not quite sure if this is the right way to solve it, please let me know (tests in particular!)
Looks great! I agree it is nicer to split those into separate branches. Just one minor comment and I'm happy to merge : )
PS. Sorry for the slow response, the email got lost in my inbox.