Skip to content

Commit

Permalink
Fix incorrect handling of /*/
Browse files Browse the repository at this point in the history
  • Loading branch information
ghewgill committed Feb 1, 2025
1 parent 07156a7 commit 8fcfed6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ static std::vector<Token> tokenize_fragment(TokenizedSource *tsource, const std:
t.length = i - startindex;
} else if (c == '/') {
if (i+1 != source.end() && *(i+1) == '*') {
i += 2;
for (;;) {
if (i == source.end() || i+1 == source.end()) {
error(1006, t, "Missing closing comment '*/'");
Expand Down

0 comments on commit 8fcfed6

Please sign in to comment.