diff options
author | Cary Clark <caryclark@skia.org> | 2018-01-03 08:37:53 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-03 14:21:19 +0000 |
commit | 61dfc3a53d9d47843dc80b0a61e445e86a482185 (patch) | |
tree | 16fbd517e4c532f8cd1df89a93142af044651109 /tools/bookmaker/includeParser.cpp | |
parent | 36add77b9cde8c370eebbefc38960da42867f4c0 (diff) |
support srgb flag in bookmaker
allow examples to work with colorspace
fix point array plural form
fix spacing after private message
add some SkImage documentation
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=90360
Bug: skia:6898
Change-Id: I045ee68e7dd9747ec5d40d95588bbc1594c45366
Reviewed-on: https://skia-review.googlesource.com/90360
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tools/bookmaker/includeParser.cpp')
-rw-r--r-- | tools/bookmaker/includeParser.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp index da2ee54c2e..363aacc650 100644 --- a/tools/bookmaker/includeParser.cpp +++ b/tools/bookmaker/includeParser.cpp @@ -1493,6 +1493,9 @@ bool IncludeParser::parseMethod(Definition* child, Definition* markupDef) { } tokenIter->fName = nameStr; tokenIter->fMarkType = MarkType::kMethod; + if (string::npos != nameStr.find("defined")) { + SkDebugf(""); + } tokenIter->fPrivate = string::npos != nameStr.find("::"); auto testIter = child->fParent->fTokens.begin(); SkASSERT(child->fParentIndex > 0); @@ -1642,10 +1645,18 @@ bool IncludeParser::parseObject(Definition* child, Definition* markupDef) { auto tokenIter = child->fParent->fTokens.begin(); std::advance(tokenIter, child->fParentIndex); tokenIter = std::prev(tokenIter); - TextParser checkDeprecated(&*tokenIter); - if (checkDeprecated.startsWith("SK_ATTR_DEPRECATED")) { + TextParser previousToken(&*tokenIter); + if (previousToken.startsWith("SK_ATTR_DEPRECATED")) { break; } + if (Bracket::kPound == child->fParent->fBracket && + KeyWord::kIf == child->fParent->fKeyWord) { + // TODO: this will skip methods named defined() -- for the + // moment there aren't any + if (previousToken.startsWith("defined")) { + break; + } + } } if (!this->parseMethod(child, markupDef)) { return child->reportError<bool>("failed to parse method"); |