Fixed line numbers being off in multi-line comments.

Change-Id: I4c27892c249527980d8f52a2cca801dace70289f
This commit is contained in:
Wouter van Oortmerssen 2016-10-07 17:07:39 -07:00
parent dc2fa215b8
commit ab51b03093
1 changed files with 1 additions and 0 deletions

View File

@ -352,6 +352,7 @@ CheckedError Parser::Next() {
cursor_++;
// TODO: make nested.
while (*cursor_ != '*' || cursor_[1] != '/') {
if (*cursor_ == '\n') line_++;
if (!*cursor_) return Error("end of file in comment");
cursor_++;
}