aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bookmaker/bookmaker.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-07-31 11:48:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-31 16:49:12 +0000
commit579985ce4f5cdd34df4d72a25b3623b9bddcbbba (patch)
tree8433324b3b0e6754b95cbfb56a4863464fe618af /tools/bookmaker/bookmaker.cpp
parentdf0e09feacb29290fe94d37f921731b18f2edae0 (diff)
fix self references
try removing self references in method definitions. If this creates awkward wording, it can always be allowed in another CL. Also tighten rules for identifying function references in include comments. R=briansoman@google.com, caryclark@google.com TBR=reed@google.com Bug: skia:6898 Change-Id: I1a0e6b2a76dacfe71d134deb4589fb74e6611a03 Reviewed-on: https://skia-review.googlesource.com/28624 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tools/bookmaker/bookmaker.cpp')
-rw-r--r--tools/bookmaker/bookmaker.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 3b67663000..7a0e0851fe 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -48,20 +48,10 @@ more complications I haven't figured out. I don't know when or how to pluralize
references. This should be "objects' reference counts" probably, but then
I lose the link to SkRefCnt.
-SkPaint.bmh line 2074
-arcs at front of sentence not capitalized
-
SkPaint.bmh line 2639
I'd argue that 'fill path' is OK, in that is it the path that will fill, not the path
that has already been filled. I see the awkwardness though, and will add it to my bug list.
-check for function name in its own description
-
-multiple line #Param / #Return only copies first line?
-
-rework underlinethickness / strikeout thickness
-
-getTextIntercepts lost underline comment
*/
static string normalized_name(string name) {
@@ -1018,6 +1008,19 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
if (!this->popParentStack(fParent)) { // if not one liner, pop
return false;
}
+ if (MarkType::kParam == markType || MarkType::kReturn == markType) {
+ const char* parmEndCheck = definition->fContentEnd;
+ while (parmEndCheck < definition->fTerminator) {
+ if (fMC == parmEndCheck[0]) {
+ break;
+ }
+ if (' ' < parmEndCheck[0]) {
+ this->reportError<bool>(
+ "use full end marker on multiline #Param and #Return");
+ }
+ ++parmEndCheck;
+ }
+ }
} else {
fMarkup.emplace_front(markType, defStart, fLineCount, fParent);
definition = &fMarkup.front();