We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d719b5c commit 0795124Copy full SHA for 0795124
src/comp/front/lexer.rs
@@ -327,6 +327,10 @@ fn consume_any_line_comment(reader rdr) {
327
fn consume_block_comment(reader rdr) {
328
let int level = 1;
329
while (level > 0) {
330
+ if (rdr.is_eof()) {
331
+ rdr.err("unterminated block comment");
332
+ fail;
333
+ }
334
if (rdr.curr() == '/' && rdr.next() == '*') {
335
rdr.bump();
336
@@ -340,10 +344,6 @@ fn consume_block_comment(reader rdr) {
340
344
341
345
}
342
346
343
- if (rdr.is_eof()) {
- rdr.err("unterminated block comment");
- fail;
- }
347
348
// restart whitespace munch.
349
be consume_any_whitespace(rdr);
0 commit comments