mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Support #! as a comment on the first line only.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- Comparing slices and arrays of user-defined types that implement == operator now works #2486.
|
||||
- Add 'loop-vectorize', 'slp-vectorize', 'unroll-loops' and 'merge-functions' optimization flags #2491.
|
||||
- Add exec timings to -vv output #2490.
|
||||
- Support #! as a comment on the first line only.
|
||||
|
||||
### Fixes
|
||||
- Compiler assert with var x @noinit = 0 #2452
|
||||
|
||||
@@ -278,6 +278,14 @@ static void skip_whitespace(Lexer *lexer)
|
||||
case '\r':
|
||||
// Already filtered out.
|
||||
UNREACHABLE_VOID
|
||||
case '#':
|
||||
if (lexer->file_begin == lexer->current && peek_next(lexer) == '!')
|
||||
{
|
||||
skip(lexer, 2);
|
||||
parse_line_comment(lexer);
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user