mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
Fixes #90 - flatc chokes on IDL files starting with a comment
Change-Id: I5ab692ceb6809493720c1bff69a2e3210efd4618
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
6ca102e413
commit
07d5965c81
@@ -184,7 +184,7 @@ void Parser::Next() {
|
||||
const char *start = ++cursor_;
|
||||
while (*cursor_ && *cursor_ != '\n') cursor_++;
|
||||
if (*start == '/') { // documentation comment
|
||||
if (!seen_newline)
|
||||
if (cursor_ != source_ && !seen_newline)
|
||||
Error("a documentation comment should be on a line on its own");
|
||||
doc_comment_.push_back(std::string(start + 1, cursor_));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user