We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6722979 commit ab2be72Copy full SHA for ab2be72
src/source/dlexer.d
@@ -372,16 +372,11 @@ struct DLexer {
372
373
import source.name;
374
Name popSheBang() {
375
- auto c = frontChar;
376
- if (c != '#') {
+ if (frontChar != '#' || nextChar != '!') {
377
return BuiltinName!"";
378
}
379
380
- while (c != '\n') {
381
- popChar();
382
- c = frontChar;
383
- }
384
-
+ popLine();
385
return context.getName(content[0 .. index]);
386
387
test/compilable/nonutf8_shebang.d
@@ -1,5 +1,4 @@
1
#!/opt/dmd/ÐÒÏÂÙ/rdmd
2
3
import core.stdc.stdio;
4
5
void main() {
0 commit comments