aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bookmaker
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bookmaker')
-rw-r--r--tools/bookmaker/bookmaker.cpp4
-rw-r--r--tools/bookmaker/includeParser.cpp4
-rw-r--r--tools/bookmaker/includeWriter.cpp4
3 files changed, 12 insertions, 0 deletions
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 58c73e663f..15598be95f 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -318,6 +318,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
// fRoot->fChildren.push_back(definition);
}
}
+ SkASSERT(string::npos == name.find('\n'));
definition->fName = name;
if (MarkType::kMethod == markType) {
if (string::npos != name.find(':', 0)) {
@@ -1837,6 +1838,9 @@ string BmhParser::methodName() {
saveState.restore();
}
// this->next();
+ if (string::npos != builder.find('\n')) {
+ builder.erase(std::remove(builder.begin(), builder.end(), '\n'), builder.end());
+ }
return uniqueRootName(builder, MarkType::kMethod);
}
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index fdaf0ccfe2..716d90afeb 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -278,6 +278,10 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
string paramName = className + "::";
paramName += string(token.fContentStart,
token.fContentEnd - token.fContentStart);
+ if (string::npos != paramName.find('\n')) {
+ paramName.erase(std::remove(paramName.begin(), paramName.end(), '\n'),
+ paramName.end());
+ }
def = root->find(paramName, RootDefinition::AllowParens::kYes);
if (!def && 0 == token.fName.find("operator")) {
string operatorName = className + "::";
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index cd67be0f5d..18beff4809 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -1465,6 +1465,10 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
--continueEnd;
}
methodName += string(fContinuation, continueEnd - fContinuation);
+ if (string::npos != methodName.find('\n')) {
+ methodName.erase(std::remove(methodName.begin(), methodName.end(), '\n'),
+ methodName.end());
+ }
method = this->findMethod(methodName, root);
if (!method) {
if (fBmhStructDef && fBmhStructDef->fDeprecated) {