Mark Wielaard writes:
> [PATCH 1/2] Handle shebang line, plus any whitespace and comment
> [PATCH 2/2] Remove has_shebang flag from AST and HIR Crate classes
Pushed to githup:
https://github.com/Rust-GCC/gccrs/pull/546
Marc
--
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
https://gcc.gnu.org/ma
The lexer deals with the shebang and the parser cannot detect whether
there is or isn't a shebang line. The flag isn't relevant or useful in
the AST and HIR Crate classes.
---
gcc/rust/ast/rust-ast-full-test.cc | 5 +
gcc/rust/ast/rust-ast.h | 13 +
gcc/rust/h
The lexer tried to handle the shebang line but used loc directly,
instead of the current_column. And it assumed a '/' should immediately
follow the "#!". But if the "#!" is followed by whitespace and/or
comments and a '[' character, then the first line isn't see as a
shebang line (even if the kerne
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 (optio