You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started looking at this, and it seemed easiest to create Token.ShebangLine. It would only show up if the first 2 bytes of the file were #!, and it could only be the first token, and would be guaranteed to only show up once total.
The parser would look at the first token and skip it if it is a shebang line, otherwise put it back and continue.
Activity
andrewrk commentedon Sep 18, 2018
I started looking at this, and it seemed easiest to create Token.ShebangLine. It would only show up if the first 2 bytes of the file were
#!, and it could only be the first token, and would be guaranteed to only show up once total.The parser would look at the first token and skip it if it is a shebang line, otherwise put it back and continue.
Do you think I shouldn't do it this way?
andrewrk commentedon Sep 18, 2018
I went ahead and did it since this is better than status quo, but feel free to change the implementation if you have a better way.
tiehuis commentedon Sep 19, 2018
This solution is good. Easy for external users when using
std/zig.