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 821 of file defargs.l.

822{
823 std::unique_ptr<ArgumentList> al = std::make_unique<ArgumentList>();
824 if (argsString.empty()) return al;
825
826 yyscan_t yyscanner;
827 defargsYY_state extra(argsString.data(),al,lang);
828 defargsYYlex_init_extra(&extra,&yyscanner);
829#ifdef FLEX_DEBUG
830 defargsYYset_debug(Debug::isFlagSet(Debug::Lex_defargs)?1:0,yyscanner);
831#endif
832 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
833 DebugLex debugLex(Debug::Lex_defargs, __FILE__, nullptr);
834
835 defargsYYrestart( nullptr, yyscanner );
836 BEGIN( Start );
837 defargsYYlex(yyscanner);
838 if (yyextra->argList->empty())
839 {
840 yyextra->argList->setNoParameters(true);
841 }
842 if (extraTypeChars) *extraTypeChars=yyextra->extraTypeChars;
843 //printf("stringToArgumentList(%s) result=%s\n",argsString,qPrint(argListToString(*al)));
844 defargsYYlex_destroy(yyscanner);
845 return al;
846}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:148
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:157
@ Lex_defargs
Definition debug.h:60
static bool isFlagSet(const DebugMask mask)
Definition debug.cpp:132
yyguts_t * yyscan_t
Definition code.l:24

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

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(), and matchCanonicalTypes().