Fixed line numbers being off in multi-line comments.

Change-Id: I4c27892c249527980d8f52a2cca801dace70289f
parent dc2fa215
...@@ -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_++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment