Lines Matching refs:methodParser
422 TextParser methodParser(fFileName, fStart, end, fLineCount); in checkMethod() local
423 methodParser.skipWhiteSpace(); in checkMethod()
424 SkASSERT(methodParser.startsWith("#Method")); in checkMethod()
425 methodParser.skipName("#Method"); in checkMethod()
426 methodParser.skipSpace(); in checkMethod()
432 bool expectReturn = this->methodHasReturn(name, &methodParser); in checkMethod()
444 return methodParser.reportError<bool>("no #Return expected"); in checkMethod()
447 return methodParser.reportError<bool>("multiple #Return markers"); in checkMethod()
452 return methodParser.reportError<bool>("missing #Return marker"); in checkMethod()
454 const char* paren = methodParser.strnchr('(', methodParser.fEnd); in checkMethod()
456 return methodParser.reportError<bool>("missing #Method function definition"); in checkMethod()
461 methodParser.fChar = nextEnd + 1; in checkMethod()
462 methodParser.skipSpace(); in checkMethod()
463 if (!this->nextMethodParam(&methodParser, &nextEnd, ¶mName)) { in checkMethod()
475 return methodParser.reportError<bool>("multiple #Method param with same name"); in checkMethod()
480 return methodParser.reportError<bool>("multiple #Param with same name"); in checkMethod()
486 return methodParser.reportError<bool>("no #Param found"); in checkMethod()
546 methodParser.reportError<bool>("missing description"); in checkMethod()
703 TextParser methodParser(fFileName, fStart, end, fLineCount); in formatFunction() local
704 methodParser.skipWhiteSpace(); in formatFunction()
705 SkASSERT(methodParser.startsWith("#Method")); in formatFunction()
706 methodParser.skipName("#Method"); in formatFunction()
707 methodParser.skipSpace(); in formatFunction()
708 const char* lastStart = methodParser.fChar; in formatFunction()
711 const char* nameInParser = methodParser.strnstr(name.c_str(), methodParser.fEnd); in formatFunction()
712 methodParser.skipTo(nameInParser); in formatFunction()
713 const char* lastEnd = methodParser.fChar; in formatFunction()
717 const char* paren = methodParser.strnchr('(', methodParser.fEnd); in formatFunction()
725 TextParserSave savePlace(&methodParser); in formatFunction()
730 const char* delimiter = methodParser.anyOf(",)"); in formatFunction()
731 const char* nextEnd = delimiter ? delimiter : methodParser.fEnd; in formatFunction()
748 methodParser.skipTo(delimiter); in formatFunction()
755 lastEnd = methodParser.fChar; in formatFunction()
763 const char* delimiter = methodParser.anyOf(",)"); in formatFunction()
764 const char* nextEnd = delimiter ? delimiter : methodParser.fEnd; in formatFunction()
796 methodParser.skipTo(delimiter); in formatFunction()
909 bool Definition::methodHasReturn(string name, TextParser* methodParser) const { in methodHasReturn()
910 if (methodParser->skipExact("static")) { in methodHasReturn()
911 methodParser->skipWhiteSpace(); in methodHasReturn()
913 if (methodParser->skipExact("virtual")) { in methodHasReturn()
914 methodParser->skipWhiteSpace(); in methodHasReturn()
916 const char* lastStart = methodParser->fChar; in methodHasReturn()
917 const char* nameInParser = methodParser->strnstr(name.c_str(), methodParser->fEnd); in methodHasReturn()
918 methodParser->skipTo(nameInParser); in methodHasReturn()
919 const char* lastEnd = methodParser->fChar; in methodHasReturn()
926 return methodParser->reportError<bool>("unexpected void"); in methodHasReturn()
971 bool Definition::nextMethodParam(TextParser* methodParser, const char** nextEndPtr, in nextMethodParam() argument
974 TextParserSave saveState(methodParser); in nextMethodParam()
976 if (methodParser->eof()) { in nextMethodParam()
977 return methodParser->reportError<bool>("#Method function missing close paren"); in nextMethodParam()
979 char ch = methodParser->peek(); in nextMethodParam()
984 *nextEndPtr = methodParser->fChar; in nextMethodParam()
992 methodParser->next(); in nextMethodParam()
997 const char* assign = methodParser->strnstr(" = ", paramEnd); in nextMethodParam()
1001 const char* closeBracket = methodParser->strnstr("]", paramEnd); in nextMethodParam()
1003 const char* openBracket = methodParser->strnstr("[", paramEnd); in nextMethodParam()
1012 const char* function = methodParser->strnstr(")(", paramEnd); in nextMethodParam()
1016 while (paramEnd > methodParser->fChar && ' ' == paramEnd[-1]) { in nextMethodParam()
1020 while (paramStart > methodParser->fChar && isalnum(paramStart[-1])) { in nextMethodParam()
1023 if (paramStart > methodParser->fChar && paramStart >= paramEnd) { in nextMethodParam()
1024 return methodParser->reportError<bool>("#Method missing param name"); in nextMethodParam()
1029 return methodParser->reportError<bool>("#Method malformed param"); in nextMethodParam()