summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2016-10-07 17:07:39 -0700
committerWouter van Oortmerssen <wvo@google.com>2016-10-12 11:22:20 -0700
commitab51b030939e02e55cac6f9e779d8696013819a9 (patch)
tree5e01d597c24b437f5076b6687f73f42edd6b1ad5
parentdc2fa215b854b31aa9a7f8c959ce08297ec79e23 (diff)
downloadflatbuffers-ab51b030939e02e55cac6f9e779d8696013819a9.tar.gz
flatbuffers-ab51b030939e02e55cac6f9e779d8696013819a9.tar.bz2
flatbuffers-ab51b030939e02e55cac6f9e779d8696013819a9.zip
Fixed line numbers being off in multi-line comments.
Change-Id: I4c27892c249527980d8f52a2cca801dace70289f
-rw-r--r--src/idl_parser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp
index 06948bce..c9fa1b0d 100644
--- a/src/idl_parser.cpp
+++ b/src/idl_parser.cpp
@@ -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_++;
}