mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-11 22:30:53 +01:00
Add shebang support
This commit is contained in:
parent
96b1707f87
commit
2c509692ba
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ ParseResult Parser::parse(const char* buffer, size_t bufferSize, AstNameTable& n
|
||||||
{
|
{
|
||||||
std::vector<std::string> hotcomments;
|
std::vector<std::string> hotcomments;
|
||||||
|
|
||||||
|
if (p.lexer.current().type == '#' && p.lexer.lookahead().type == '!')
|
||||||
|
p.lexer.nextline();
|
||||||
|
|
||||||
while (isComment(p.lexer.current()) || (FFlag::LuauCaptureBrokenCommentSpans && p.lexer.current().type == Lexeme::BrokenComment))
|
while (isComment(p.lexer.current()) || (FFlag::LuauCaptureBrokenCommentSpans && p.lexer.current().type == Lexeme::BrokenComment))
|
||||||
{
|
{
|
||||||
const char* text = p.lexer.current().data;
|
const char* text = p.lexer.current().data;
|
||||||
|
|
Loading…
Add table
Reference in a new issue