Hi, Shebang handling, the first line starting with #! was not done fully correct and it isn't necessary to keep track of the shebang line in the AST or HIR Crate classes.
Because an inner attribute also starts with #! the first line isn't regarded as a shebang line if the #! is followed by (optional) whitespace and comments and a [. In that case the #! is seen as the start of an inner attribute. I added various testcases that hopefully show the funny things you can get when the first line starts with #!. [PATCH 1/2] Handle shebang line, plus any whitespace and comment [PATCH 2/2] Remove has_shebang flag from AST and HIR Crate classes Patches can also be found here: https://code.wildebeest.org/git/user/mjw/gccrs/log/?h=shebang Cheers, Mark -- Gcc-rust mailing list Gcc-rust@gcc.gnu.org https://gcc.gnu.org/mailman/listinfo/gcc-rust