Skip to content
Snippets Groups Projects
Commit ab51b030 authored by Wouter van Oortmerssen's avatar Wouter van Oortmerssen
Browse files

Fixed line numbers being off in multi-line comments.

Change-Id: I4c27892c249527980d8f52a2cca801dace70289f
parent dc2fa215
No related branches found
No related tags found
No related merge requests found
...@@ -352,6 +352,7 @@ CheckedError Parser::Next() { ...@@ -352,6 +352,7 @@ CheckedError Parser::Next() {
cursor_++; cursor_++;
// TODO: make nested. // TODO: make nested.
while (*cursor_ != '*' || cursor_[1] != '/') { while (*cursor_ != '*' || cursor_[1] != '/') {
if (*cursor_ == '\n') line_++;
if (!*cursor_) return Error("end of file in comment"); if (!*cursor_) return Error("end of file in comment");
cursor_++; cursor_++;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment