Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
parser.cpp File Reference
#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, QByteArrayView::left(), qPrintable, ret, and QString::right().

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 QList< T >::at(), DEBUGPRINTF, QString::endsWith(), i, QString::left(), QString::length(), out, qPrintable, QStringLiteral, QString::right(), QString::simplified(), QList< T >::size(), 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(), LineNumber::begin, DEBUGPRINTF2, LineNumber::end, i, and LineNumber::line.

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: