Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes #444 - Allow unsuppressed comments in imports to be compiled #935
As mentioned in #444, imported comments are being ignored. This seems to be because imports are parsed as Block nodes, which have previously only compiled comments when properties were present. This fix adds comment compilation for Block nodes without properties as well, but only if the Block does not have scope (as is the case with an import). In order to prevent comments from existing plugins and libraries (like Nib) from being compiled, suppressed comments (without '!') are ignored.
Not sure if this is the best way to handle the problem, but it's fairly simple and seems to work well for me. I played with trying to use Root nodes for imports but ran into a lot of problems there. That said, I'd be happy to rework if there's a better way to solve this.