fstirlitz / luaparse

A Lua parser written in JavaScript
https://fstirlitz.github.io/luaparse/
MIT License
459 stars 91 forks source link

Ignore shebang #32

Closed devurandom closed 8 years ago

devurandom commented 8 years ago

Luaparse marks following first line of a script (shebang) as an error:

#!/usr/bin/lua
...

This is, however, allowed on the first line, as an exception to the normal syntax, according to the Lua manual: http://www.lua.org/manual/5.3/manual.html#7

I am using Atom's linter-luaparse v0.2.0: https://atom.io/packages/linter-luaparse

oxyc commented 8 years ago

Technically this is not up to the parser but as the manual states, the interpreter (or the shell).

That being said, it does sound like a common enough use case. A linter shouldn't really need to care about such things either.. I'll try to get a fix in soon, thanks for the report.

oxyc commented 8 years ago

I just published v0.2.1 containing the fix to NPM

devurandom commented 8 years ago

Thanks!