diff options
author | Cary Clark <caryclark@skia.org> | 2017-12-01 11:49:58 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-01 17:13:39 +0000 |
commit | 3cd22cc543ba410f8b46b8b0ca22fb8580040472 (patch) | |
tree | cf5a4d8a4d024492c8f23203c6ec042f856a324c /tools/bookmaker | |
parent | 8ceee43de49b314fff58852c2d89ed3885ae71ee (diff) |
working on skimage
working on skimage
Docs-Preview: https://skia.org/?cl=76562
Bug: skia:
Change-Id: I288d2a9bbbdf01bff9efd5f0a9d308d3c76391a4
Reviewed-on: https://skia-review.googlesource.com/76562
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tools/bookmaker')
-rw-r--r-- | tools/bookmaker/bookmaker.h | 3 | ||||
-rw-r--r-- | tools/bookmaker/includeWriter.cpp | 61 |
2 files changed, 36 insertions, 28 deletions
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h index 8cd128804c..2d0f03cde0 100644 --- a/tools/bookmaker/bookmaker.h +++ b/tools/bookmaker/bookmaker.h @@ -1200,7 +1200,8 @@ public: , { "Return", nullptr, MarkType::kReturn, R_Y, E_N, M(Method) } , { "", nullptr, MarkType::kRoot, R_Y, E_N, 0 } , { "", nullptr, MarkType::kRow, R_Y, E_N, M(Table) | M(List) } -, { "SeeAlso", nullptr, MarkType::kSeeAlso, R_Y, E_N, M_CSST | M_E | M(Method) } +, { "SeeAlso", nullptr, MarkType::kSeeAlso, R_Y, E_N, + M_CSST | M_E | M(Method) | M(Typedef) } , { "StdOut", nullptr, MarkType::kStdOut, R_N, E_N, M(Example) } , { "Struct", &fClassMap, MarkType::kStruct, R_Y, E_O, M(Class) | M(Root) | M_ST } , { "Substitute", nullptr, MarkType::kSubstitute, R_N, E_N, M_ST } diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp index c462826f48..8c6d7a938c 100644 --- a/tools/bookmaker/includeWriter.cpp +++ b/tools/bookmaker/includeWriter.cpp @@ -67,9 +67,7 @@ void IncludeWriter::descriptionOut(const Definition* def) { commentStart = prop->fContentStart; commentLen = (int) (prop->fContentEnd - commentStart); if (commentLen > 0) { - if (Wrote::kNone != this->rewriteBlock(commentLen, commentStart, Phrase::kNo)) { - this->lfcr(); - } + this->writeBlockIndent(commentLen, commentStart); } commentStart = prop->fTerminator; commentLen = (int) (def->fContentEnd - commentStart); @@ -913,6 +911,9 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti const Definition* requireDense = nullptr; const Definition* startDef = nullptr; for (auto& child : def->fTokens) { + if (18 == child.fParentIndex) { + SkDebugf(""); + } if (KeyWord::kOperator == child.fKeyWord && method && Definition::MethodType::kOperator == method->fMethodType) { eatOperator = true; @@ -976,34 +977,40 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti continue; } } - if (Definition::Type::kBracket == child.fType && Bracket::kParen == child.fBracket) { - if (!clonedMethod) { - if (inConstructor) { - fContinuation = child.fContentStart; - } + if (Definition::Type::kBracket == child.fType) { + if (Bracket::kAngle == child.fBracket) { continue; } - int alternate = 1; - ptrdiff_t childLen = child.fContentEnd - child.fContentStart; - SkASSERT(')' == child.fContentStart[childLen]); - ++childLen; - do { - TextParser params(clonedMethod->fFileName, clonedMethod->fStart, - clonedMethod->fContentStart, clonedMethod->fLineCount); - params.skipToEndBracket('('); - if (params.startsWith(child.fContentStart, childLen)) { - this->methodOut(clonedMethod, child); - break; + if (Bracket::kParen == child.fBracket) { + if (!clonedMethod) { + if (inConstructor) { + fContinuation = child.fContentStart; + } + continue; } - ++alternate; - string alternateMethod = methodName + '_' + to_string(alternate); - clonedMethod = root->find(alternateMethod, RootDefinition::AllowParens::kNo); - } while (clonedMethod); - if (!clonedMethod) { - return this->reportError<bool>("cloned method not found"); + int alternate = 1; + ptrdiff_t childLen = child.fContentEnd - child.fContentStart; + SkASSERT(')' == child.fContentStart[childLen]); + ++childLen; + do { + TextParser params(clonedMethod->fFileName, clonedMethod->fStart, + clonedMethod->fContentStart, clonedMethod->fLineCount); + params.skipToEndBracket('('); + if (params.startsWith(child.fContentStart, childLen)) { + this->methodOut(clonedMethod, child); + break; + } + ++alternate; + string alternateMethod = methodName + '_' + to_string(alternate); + clonedMethod = root->find(alternateMethod, + RootDefinition::AllowParens::kNo); + } while (clonedMethod); + if (!clonedMethod) { + return this->reportError<bool>("cloned method not found"); + } + clonedMethod = nullptr; + continue; } - clonedMethod = nullptr; - continue; } if (Definition::Type::kWord == child.fType) { if (clonedMethod) { |