Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QmlSignatureParser Class Reference
+ Collaboration diagram for QmlSignatureParser:

Public Member Functions

 QmlSignatureParser (FunctionNode *func, const QString &signature, const Location &loc)
 
void readToken ()
 
QString lexeme ()
 
QString previousLexeme ()
 
bool match (int target)
 If the current token matches target, read the next token and return true.
 
bool matchTypeAndName (CodeChunk *type, QString *var)
 Parse a QML data type into type and an optional variable name into var.
 
bool matchParameter ()
 
bool matchFunctionDecl ()
 
 QmlSignatureParser (FunctionNode *func, const QString &signature, const Location &loc)
 
void readToken ()
 
QString lexeme ()
 
QString previousLexeme ()
 
bool match (int target)
 
bool matchTypeAndName (CodeChunk *type, QString *var)
 
bool matchParameter ()
 
bool matchFunctionDecl ()
 

Detailed Description

Definition at line 73 of file qmlvisitor.cpp.

Constructor & Destructor Documentation

◆ QmlSignatureParser() [1/2]

QmlSignatureParser::QmlSignatureParser ( FunctionNode * func,
const QString & signature,
const Location & loc )

Definition at line 189 of file qmlvisitor.cpp.

References QmlSignatureParser(), matchFunctionDecl(), readToken(), and Tokenizer::setParsingFnOrMacro().

Referenced by QmlSignatureParser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QmlSignatureParser() [2/2]

QmlSignatureParser::QmlSignatureParser ( FunctionNode * func,
const QString & signature,
const Location & loc )

Member Function Documentation

◆ lexeme() [1/2]

QString QmlSignatureParser::lexeme ( )
inline

Definition at line 78 of file qmlvisitor.cpp.

References Tokenizer::lexeme().

+ Here is the call graph for this function:

◆ lexeme() [2/2]

QString QmlSignatureParser::lexeme ( )
inline

Definition at line 78 of file qmlvisitor.cpp.

◆ match() [1/2]

bool QmlSignatureParser::match ( int target)

If the current token matches target, read the next token and return true.

Otherwise, don't read the next token, and return false.

Definition at line 206 of file qmlvisitor.cpp.

References readToken().

Referenced by matchFunctionDecl(), matchParameter(), and matchTypeAndName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ match() [2/2]

bool QmlSignatureParser::match ( int target)

◆ matchFunctionDecl() [1/2]

bool QmlSignatureParser::matchFunctionDecl ( )

Definition at line 304 of file qmlvisitor.cpp.

References Parameters::clear(), match(), matchParameter(), matchTypeAndName(), FunctionNode::parameters(), readToken(), Node< _Tp >::setLocation(), Tok_Comma, Tok_Gulbrandsen, Tok_Ident, Tok_LeftParen, and Tok_RightParen.

Referenced by QmlSignatureParser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchFunctionDecl() [2/2]

bool QmlSignatureParser::matchFunctionDecl ( )

◆ matchParameter() [1/2]

bool QmlSignatureParser::matchParameter ( )

Definition at line 277 of file qmlvisitor.cpp.

References match(), matchTypeAndName(), FunctionNode::parameters(), Tokenizer::parenDepth(), readToken(), Tok_Comma, Tok_Eoi, and Tok_Equal.

Referenced by matchFunctionDecl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchParameter() [2/2]

bool QmlSignatureParser::matchParameter ( )

◆ matchTypeAndName() [1/2]

bool QmlSignatureParser::matchTypeAndName ( CodeChunk * type,
QString * var )

Parse a QML data type into type and an optional variable name into var.

Definition at line 219 of file qmlvisitor.cpp.

References Tokenizer::bracketDepth(), match(), readToken(), Tok_char, Tok_double, Tok_Ellipsis, Tok_Eoi, Tok_Gulbrandsen, Tok_Ident, Tok_int, Tok_int64, Tok_LeftBracket, Tok_long, Tok_RightBracket, Tok_short, Tok_signed, Tok_unsigned, and Tok_void.

Referenced by matchFunctionDecl(), and matchParameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchTypeAndName() [2/2]

bool QmlSignatureParser::matchTypeAndName ( CodeChunk * type,
QString * var )

◆ previousLexeme() [1/2]

QString QmlSignatureParser::previousLexeme ( )
inline

Definition at line 79 of file qmlvisitor.cpp.

References Tokenizer::previousLexeme().

+ Here is the call graph for this function:

◆ previousLexeme() [2/2]

QString QmlSignatureParser::previousLexeme ( )
inline

Definition at line 79 of file qmlvisitor.cpp.

◆ readToken() [1/2]

void QmlSignatureParser::readToken ( )
inline

Definition at line 77 of file qmlvisitor.cpp.

References Tokenizer::getToken().

Referenced by QmlSignatureParser(), match(), matchFunctionDecl(), matchParameter(), and matchTypeAndName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readToken() [2/2]

void QmlSignatureParser::readToken ( )
inline

Definition at line 77 of file qmlvisitor.cpp.


The documentation for this class was generated from the following file: