Home | History | Annotate | Download | only in bookmaker

Lines Matching refs:child

39 void IncludeWriter::checkEnumLengths(const Definition& child, string enumName, ItemLength* length) const {
40 const Definition* enumItem = this->matchMemberName(enumName, child);
42 [](Definition* child){return MarkType::kNoJustify == child->fMarkType;})) {
45 string comment = this->enumMemberComment(enumItem, child);
262 for (auto child : phraseDef->fChildren) {
263 if (MarkType::kPhraseParam == child->fMarkType) {
266 int localLength = child->fStart - start;
278 localLength = child->fContentEnd - child->fStart;
325 void IncludeWriter::enumHeaderOut(RootDefinition* root, const Definition& child) {
328 child.fContentStart;
333 this->setStart(child.fContentStart, &child);
334 const auto& nameDef = child.fTokens.front();
348 child.fChildren[0]->fName = enumName;
365 // child[0] should be #Code comment starts at child[0].fTerminator
367 // child[1] should be #Const comment ends at child[1].fStart
456 Definition* braceHolder = child.fChildren[0];
482 const Definition& child) const {
498 const Definition& child, const Definition* token, Item* item, LastItem* last,
503 *currentEnumItem = this->matchMemberName(item->fName, child);
518 void IncludeWriter::enumMemberOut(const Definition* currentEnumItem, const Definition& child,
521 string shortComment = this->enumMemberComment(currentEnumItem, child);
598 void IncludeWriter::enumMembersOut(Definition& child) {
602 auto brace = child.fChildren[0];
619 state = this->enumMemberName(child, &token, &item, &last, &currentEnumItem);
630 this->enumMemberOut(currentEnumItem, child, item, preprocessor);
644 state = this->enumMemberName(child, nullptr, &item, &last, &currentEnumItem);
647 this->enumMemberOut(currentEnumItem, child, item, preprocessor);
711 void IncludeWriter::enumSizeItems(const Definition& child) {
715 auto brace = child.fChildren[0];
753 this->checkEnumLengths(child, enumName, &lengths);
766 this->checkEnumLengths(child, enumName, &lengths);
779 const Definition* IncludeWriter::matchMemberName(string matchName, const Definition& child) const {
780 const Definition* parent = &child;
781 if (KeyWord::kEnum == child.fKeyWord && child.fChildren.size() > 0
782 && KeyWord::kClass == child.fChildren[0]->fKeyWord) {
783 matchName = child.fChildren[0]->fName + "::" + matchName;
805 void IncludeWriter::methodOut(Definition* method, const Definition& child) {
811 fMethodDef = &child;
822 const Definition* childPtr = &child;
897 void IncludeWriter::structOut(const Definition* root, const Definition& child,
901 SkASSERT(MarkType::kClass == child.fMarkType || MarkType::kStruct == child.fMarkType);
902 this->writeString(MarkType::kClass == child.fMarkType ? "class" : "struct");
904 this->writeString(child.fName.c_str());
1001 Definition* IncludeWriter::structMemberOut(const Definition* memberStart, const Definition& child) {
1008 string name(child.fContentStart, (int) (child.fContentEnd - child.fContentStart));
1024 this->writeBlock((int) (child.fStart - memberStart->fContentStart),
1028 auto tokenIter = child.fParent->fTokens.begin();
1029 std::advance(tokenIter, child.fParentIndex + 1);
1033 SkASSERT(child.fParent->fTokens.end() != tokenIter);
1081 for (auto child : subtopic->fChildren) {
1082 if (MarkType::kConst != child->fMarkType) {
1089 while (rootPrefix + test->fName != child->fName) {
1099 auto lineIter = std::find_if(child->fChildren.begin(), child->fChildren.end(),
1101 SkASSERT(child->fChildren.end() != lineIter);
1116 auto& child = def.fTokens.front();
1117 string name(child.fContentStart, child.length());
1127 void IncludeWriter::structSizeMembers(const Definition& child) {
1133 SkASSERT(child.fChildren.size() == 1 || child.fChildren.size() == 2);
1137 auto brace = child.fChildren[0];
1266 for (const auto& child : startDef->fTokens) {
1267 if (child.fContentStart == start) {
1268 return MarkType::kMethod == child.fMarkType;
1270 if (child.fContentStart >= start) {
1273 if (find_start(&child, start)) {
1306 for (auto& child : def->fTokens) {
1307 if (KeyWord::kInline == child.fKeyWord) {
1310 if (KeyWord::kOperator == child.fKeyWord && method &&
1316 if (Bracket::kSquare == child.fBracket || Bracket::kParen == child.fBracket) {
1321 if (KeyWord::kConst == child.fKeyWord) {
1326 if (memberEnd != &child) {
1329 startDef = &child;
1330 this->setStart(child.fContentStart + 1, &child);
1333 if (child.fPrivate) {
1334 if (MarkType::kMethod == child.fMarkType) {
1340 if (Definition::Type::kKeyWord == child.fType) {
1341 SkASSERT(MarkType::kMethod != child.fMarkType);
1344 if (Definition::Type::kPunctuation == child.fType) {
1345 if (Punctuation::kLeftBrace == child.fPunctuation) {
1348 SkASSERT(Punctuation::kAsterisk == child.fPunctuation);
1352 if (Definition::Type::kWord == child.fType) {
1353 string name(child.fContentStart, child.fContentEnd - child.fContentStart);
1357 if (Definition::Type::kBracket == child.fType) {
1358 SkASSERT(Bracket::kParen == child.fBracket);
1363 if (Definition::Type::kKeyWord == child.fType) {
1364 if (KeyWord::kFriend == child.fKeyWord ||
1365 KeyWord::kSK_API == child.fKeyWord) {
1368 const IncludeKey& includeKey = kKeyWords[(int) child.fKeyWord];
1373 if (Definition::Type::kBracket == child.fType) {
1374 if (Bracket::kAngle == child.fBracket) {
1377 if (Bracket::kParen == child.fBracket) {
1380 fContinuation = child.fContentStart;
1385 ptrdiff_t childLen = child.fContentEnd - child.fContentStart;
1386 SkASSERT(')' == child.fContentStart[childLen]);
1392 if (params.startsWith(child.fContentStart, childLen)) {
1393 this->methodOut(clonedMethod, child);
1402 return child.reportError<bool>("cloned method not found");
1408 if (Definition::Type::kWord == child.fType) {
1412 size_t len = (size_t) (child.fContentEnd - child.fContentStart);
1415 if (len >= operatorLen && !strncmp(child.fContentStart, operatorStr, operatorLen)) {
1416 fContinuation = child.fContentEnd;
1420 if (Definition::Type::kPunctuation == child.fType &&
1421 (Punctuation::kSemicolon == child.fPunctuation ||
1422 Punctuation::kLeftBrace == child.fPunctuation ||
1423 (Punctuation::kColon == child.fPunctuation && inConstructor))) {
1425 const char* continueEnd = child.fContentStart;
1442 return child.reportError<bool>("method not found");
1444 this->methodOut(method, child);
1448 if (Definition::Type::kPunctuation == child.fType &&
1449 Punctuation::kAsterisk == child.fPunctuation &&
1462 this->methodOut(method, child);
1466 if (KeyWord::kTemplate == child.fParent->fKeyWord) {
1471 return child.reportError<bool>("method not found");
1473 if (Bracket::kSlashSlash == child.fBracket || Bracket::kSlashStar == child.fBracket) {
1475 fDeferComment = &child;
1479 if (MarkType::kMethod == child.fMarkType) {
1480 if (this->isInternalName(child)) {
1483 if (child.fUndocumented) {
1486 if (KeyWord::kTemplate == child.fParent->fKeyWord) {
1491 child.fContentStart;
1511 startDef = &child;
1512 this->setStart(child.fContentStart, &child);
1513 auto mapFind = fBmhParser->fMethodMap.find(child.fName);
1517 methodName = child.fName;
1519 methodName = root->fName + "::" + child.fName;
1522 inConstructor = root->fName.substr(lastName) == child.fName;
1525 fContinuation = child.fContentEnd;
1533 this->methodOut(method, child);
1537 if (Definition::Type::kKeyWord == child.fType) {
1538 if (child.fUndocumented) {
1541 switch (child.fKeyWord) {
1544 fICSStack.push_back(&child);
1548 if (child.fChildren.size() > 0) {
1558 // try child; root+child; root->parent+child; etc.
1565 name = child.fName;
1567 name = root->fName + "::" + child.fName;
1572 name = parent->fName + "::" + child.fName;
1581 this->structSizeMembers(child);
1586 if (child.fChildren.size() > 0) {
1588 child.fContentStart;
1596 startDef = requireDense ? requireDense : &child;
1601 startDef = &child;
1602 this->setStart(child.fContentStart, &child);
1605 if (!fInStruct && (!root || child.fName != root->fName)) {
1606 root = &fBmhParser->fClassMap[child.fName];
1621 if (child.fName == root->fName) {
1697 bool writeTwo = '\n' == child.fContentStart[-1]
1698 && '\n' == child.fContentStart[-2];
1701 child.fContentStart;
1705 this->writeBlockTrim(child.length() + 1, child.fContentStart);
1706 writeTwo = '\n' == child.fContentEnd[1]
1707 && '\n' == child.fContentStart[2];
1709 fStart = child.fContentEnd + 1;
1716 this->enumHeaderOut(root, child);
1717 this->enumSizeItems(child);
1723 memberStart = &child;
1726 if (MarkType::kConst == child.fMarkType) {
1727 auto constIter = fBmhParser->fConstMap.find(child.fName);
1730 this->constOut(&child, &bmhConst);
1737 memberStart = &child;
1755 memberStart = &child;
1770 memberStart = &child;
1775 requireDense = &child;
1780 if (KeyWord::kUint8_t == child.fKeyWord || KeyWord::kUint32_t == child.fKeyWord) {
1783 if (fInEnum && child.fChildren.size() > 0
1784 && KeyWord::kClass == child.fChildren[0]->fKeyWord) {
1785 if (!this->populate(child.fChildren[0], &pair, root)) {
1789 if (!this->populate(&child, &pair, root)) {
1792 if (KeyWord::kClass == child.fKeyWord || KeyWord::kStruct == child.fKeyWord) {
1821 if (Definition::Type::kBracket == child.fType) {
1822 if (KeyWord::kEnum == child.fParent->fKeyWord ||
1823 (KeyWord::kClass == child.fParent->fKeyWord && child.fParent->fParent &&
1824 KeyWord::kEnum == child.fParent->fParent->fKeyWord)) {
1825 SkASSERT(Bracket::kBrace == child.fBracket);
1826 this->enumMembersOut(*child.fParent);
1829 startDef = child.fParent;
1830 this->setStart(child.fParent->fContentEnd, child.fParent);
1841 if (KeyWord::kDefine == child.fKeyWord && this->defineOut(child)) {
1849 if (!this->populate(&child, &pair, root)) {
1855 this->setStart(child.fContentEnd, &child);
1861 if (Definition::Type::kWord == child.fType) {
1862 if (MarkType::kMember == child.fMarkType) {
1865 std::advance(iter, child.fParentIndex - 1);
1877 memberEnd = this->structMemberOut(memberStart, child);
1878 startDef = &child;
1879 this->setStart(child.fContentEnd + 1, &child);
1881 } else if (MarkType::kNone == child.fMarkType && sawConst && fEnumDef) {
1887 match += string(child.fContentStart, child.fContentEnd - child.fContentStart);
1899 } else if (MarkType::kNone == child.fMarkType && sawConst && !fEnumDef) {
1903 match += string(child.fContentStart, child.fContentEnd - child.fContentStart);
1914 fConstDef = &child;
1920 if (child.fMemberStart) {
1921 memberStart = &child;
1926 if (Definition::Type::kPunctuation == child.fType) {
1927 child.fPunctuation) {
1937 if (constIsFirst) { // If first #Const child, output subtopic description.
1972 this->setStart(child.fContentStart + 1, &child);
2004 if (Punctuation::kLeftBrace == child.fPunctuation ||
2005 Punctuation::kColon == child.fPunctuation ||
2006 Punctuation::kAsterisk == child.fPunctuation
2118 [](Definition* child){ return MarkType::kCode == child->fMarkType; } );
2140 for (auto child : fBmhMethod->fChildren) {
2141 if (MarkType::kParam != child->fMarkType) {
2144 if (methodname == child->fName) {
2153 for (auto child : def->fChildren) {
2154 if (MarkType::kSubstitute == child->fMarkType) {
2155 return string(child->fContentStart, (int) (child->fContentEnd - child->fContentStart));
2157 if (MarkType::kAlias == child->fMarkType && def->fName == child->fName) {
2158 return this->resolveAlias(child);
2233 for (auto child : parent->fChildren) {
2236 if ((MarkType::kClass == child->fMarkType ||
2237 MarkType::kStruct == child->fMarkType ||
2238 MarkType::kTypedef == child->fMarkType ||
2239 (MarkType::kEnum == child->fMarkType && !child->fAnonymous) ||
2240 MarkType::kEnumClass == child->fMarkType) && (match == child->fName ||
2241 skmatch == child->fName)) {
2242 substitute = child->fName;
2248 for (auto child : rootDef->fChildren) {
2249 if (MarkType::kSubstitute == child->fMarkType) {
2250 substitute = string(child->fContentStart, child->length());
2255 if (MarkType::kClass == child->fMarkType ||
2256 MarkType::kStruct == child->fMarkType ||
2257 (MarkType::kEnum == child->fMarkType && !child->fAnonymous) ||
2258 MarkType::kEnumClass == child->fMarkType) {
2260 substitute = child->fName;
2261 if (MarkType::kEnum == child->fMarkType) {