Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
parser.cpp File Reference

(fb226262e8b371372fdc66b832b9eab24741f70d)

#include "tracepointgen.h"
#include "parser.h"
#include <qtextstream.h>
#include <qregularexpression.h>
#include <qfileinfo.h>
+ Include dependency graph for parser.cpp:

Go to the source code of this file.

Classes

struct  EnumNameValue
 

Functions

static void removeOffsetRange (qsizetype begin, qsizetype end, QList< LineNumber > &offsets)
 
static bool findSpaceRange (const QString &data, qsizetype &offset, qsizetype &end)
 
static void simplifyData (QString &data, QList< LineNumber > &offsets)
 
static void simplifyData (QString &data)
 
static QString preprocessMetadata (const QString &in)
 
static QList< EnumNameValueenumsToValues (const QStringList &values)
 

Function Documentation

◆ enumsToValues()

static QList< EnumNameValue > enumsToValues ( const QStringList & values)
static

Definition at line 325 of file parser.cpp.

References DEBUGPRINTF, integer, iter, QString::left(), EnumNameValue::name, qPrintable, ret, QString::right(), and QString::trimmed().

Referenced by Parser::parseMetadata().

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

◆ findSpaceRange()

static bool findSpaceRange ( const QString & data,
qsizetype & offset,
qsizetype & end )
static

Definition at line 37 of file parser.cpp.

References i.

Referenced by simplifyData(), and simplifyData().

+ Here is the caller graph for this function:

◆ preprocessMetadata()

static QString preprocessMetadata ( const QString & in)
static

Definition at line 105 of file parser.cpp.

References DEBUGPRINTF, QString::endsWith(), i, QString::left(), QString::length(), out, qPrintable, QStringLiteral, QString::right(), QString::simplified(), and QString::startsWith().

Referenced by Parser::parseMetadata(), and Parser::parsePrefix().

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

◆ removeOffsetRange()

static void removeOffsetRange ( qsizetype begin,
qsizetype end,
QList< LineNumber > & offsets )
static

Definition at line 10 of file parser.cpp.

References begin(), DEBUGPRINTF2, LineNumber::end, and i.

Referenced by simplifyData().

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

◆ simplifyData() [1/2]

static void simplifyData ( QString & data)
static

Definition at line 81 of file parser.cpp.

References findSpaceRange(), and QStringLiteral.

+ Here is the call graph for this function:

◆ simplifyData() [2/2]

static void simplifyData ( QString & data,
QList< LineNumber > & offsets )
static

Definition at line 52 of file parser.cpp.

References findSpaceRange(), QStringLiteral, and removeOffsetRange().

Referenced by Parser::findEnumValues(), and Parser::parse().

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