Doxygen
Loading...
Searching...
No Matches
defargs.h File Reference
#include <memory>
#include "types.h"
Include dependency graph for defargs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::unique_ptr< ArgumentListstringToArgumentList (SrcLangExt lang, const DString &argsString, DString *extraTypeChars=nullptr)

Function Documentation

◆ stringToArgumentList()

std::unique_ptr< ArgumentList > stringToArgumentList ( SrcLangExt lang,
const DString & argsString,
DString * extraTypeChars )

Converts an argument string into an ArgumentList.

Parameters
[in]langlanguage of the current argument list
[in]argsStringthe list of Arguments.
[out]extraTypeCharspoint to string to which trailing characters for complex types are written to

Definition at line 828 of file defargs.l.

829{
830 std::unique_ptr<ArgumentList> al = std::make_unique<ArgumentList>();
831 if (argsString.empty()) return al;
832
833 yyscan_t yyscanner;
834 defargsYY_state extra(argsString.data(),al,lang);
835 defargsYYlex_init_extra(&extra,&yyscanner);
836#ifdef FLEX_DEBUG
837 defargsYYset_debug(Debug::isFlagSet(Debug::Lex_defargs)?1:0,yyscanner);
838#endif
839 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
840 DebugLex debugLex(Debug::Lex_defargs, __FILE__, nullptr);
841
842 defargsYYrestart( nullptr, yyscanner );
843 BEGIN( Start );
844 defargsYYlex(yyscanner);
845 if (yyextra->argList->empty())
846 {
847 yyextra->argList->setNoParameters(true);
848 }
849 if (extraTypeChars) *extraTypeChars=yyextra->extraTypeChars;
850 //printf("stringToArgumentList(%s) result=%s\n",argsString,qPrint(argListToString(*al)));
851 defargsYYlex_destroy(yyscanner);
852 return al;
853}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:152
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition dstring.h:161
@ Lex_defargs
Definition debug.h:60
static bool isFlagSet(const DebugMask mask)
Definition debug.cpp:133
yyguts_t * yyscan_t
Definition code.l:24

References DString::data(), DString::empty(), Debug::isFlagSet(), Debug::Lex_defargs, and stringToArgumentList().

Referenced by addClassToContext(), ClassDefImpl::addMemberToTemplateInstance(), buildDefineList(), buildFunctionList(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildMemberList(), combineDeclarationAndDefinition(), computeTemplateClassRelations(), findTemplateInstanceRelation(), generateDEFForMember(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), MemberDefImpl::init(), ClassDefImpl::insertTemplateInstance(), matchCanonicalTypes(), and stringToArgumentList().