Remove column 1 restriction for labels with colons (#635)

Partial fix for #457
This commit is contained in:
Eldred Habert
2021-02-23 20:42:24 +01:00
committed by GitHub
parent 929e2a4490
commit dafef5a953
5 changed files with 37 additions and 7 deletions

View File

@@ -2026,7 +2026,7 @@ static int yylex_NORMAL(void)
}
}
if (tokenType == T_ID && lexerState->atLineStart)
if (tokenType == T_ID && (lexerState->atLineStart || peek(0) == ':'))
return T_LABEL;
return tokenType;