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
QQmlJS::Dom::Token Class Reference

#include <qqmldomscanner_p.h>

+ Collaboration diagram for QQmlJS::Dom::Token:

Public Member Functions

 Token ()=default
 
 Token (int o, int l, int lexKind)
 
int begin () const
 
int end () const
 
void dump (const Sink &s, QStringView line=QStringView()) const
 
QString toString (QStringView line=QStringView()) const
 

Static Public Member Functions

static bool lexKindIsDelimiter (int kind)
 
static bool lexKindIsJSKeyword (int kind)
 
static bool lexKindIsIdentifier (int kind)
 
static bool lexKindIsStringType (int kind)
 
static bool lexKindIsInvalid (int kind)
 
static bool lexKindIsQmlReserved (int kind)
 
static bool lexKindIsComment (int kind)
 
static int compare (const Token &t1, const Token &t2)
 

Public Attributes

int offset = 0
 
int length = 0
 
int lexKind = QQmlJSGrammar::T_NONE
 

Detailed Description

Definition at line 31 of file qqmldomscanner_p.h.

Constructor & Destructor Documentation

◆ Token() [1/2]

QQmlJS::Dom::Token::Token ( )
inlinedefault

◆ Token() [2/2]

QQmlJS::Dom::Token::Token ( int o,
int l,
int lexKind )
inline

Definition at line 44 of file qqmldomscanner_p.h.

Member Function Documentation

◆ begin()

int QQmlJS::Dom::Token::begin ( ) const
inline

Definition at line 45 of file qqmldomscanner_p.h.

◆ compare()

static int QQmlJS::Dom::Token::compare ( const Token & t1,
const Token & t2 )
inlinestatic

Definition at line 53 of file qqmldomscanner_p.h.

References t2.

Referenced by QQmlJS::Dom::operator!=(), and QQmlJS::Dom::operator==().

+ Here is the caller graph for this function:

◆ dump()

void Token::dump ( const Sink & s,
QStringView line = QStringView() ) const

Definition at line 378 of file qqmldomscanner.cpp.

References lexKind, line, QString::mid(), QString::number(), QQmlJS::Dom::sinkEscaped(), and QQmlJS::Dom::sinkInt().

+ Here is the call graph for this function:

◆ end()

int QQmlJS::Dom::Token::end ( ) const
inline

Definition at line 46 of file qqmldomscanner_p.h.

◆ lexKindIsComment()

bool Token::lexKindIsComment ( int kind)
static

Definition at line 248 of file qqmldomscanner.cpp.

Referenced by QQmlJS::Dom::FormatPartialStatus::handleTokens(), and QQmlJS::Dom::IndentingLineWriter::reindentAndSplit().

+ Here is the caller graph for this function:

◆ lexKindIsDelimiter()

bool Token::lexKindIsDelimiter ( int kind)
static

Definition at line 176 of file qqmldomscanner.cpp.

Referenced by QQmlJS::Dom::FormatPartialStatus::handleTokens(), QQmlJS::Dom::indentForLineStartingWithToken(), and QQmlJS::Dom::FormatPartialStatus::tryStatement().

+ Here is the caller graph for this function:

◆ lexKindIsIdentifier()

bool Token::lexKindIsIdentifier ( int kind)
static

Definition at line 307 of file qqmldomscanner.cpp.

Referenced by QQmlJS::Dom::FormatPartialStatus::handleTokens(), and QQmlJS::Dom::FormatPartialStatus::tryStatement().

+ Here is the caller graph for this function:

◆ lexKindIsInvalid()

bool Token::lexKindIsInvalid ( int kind)
static

Definition at line 354 of file qqmldomscanner.cpp.

Referenced by QQmlJS::Dom::indentForLineStartingWithToken().

+ Here is the caller graph for this function:

◆ lexKindIsJSKeyword()

bool Token::lexKindIsJSKeyword ( int kind)
static

Definition at line 260 of file qqmldomscanner.cpp.

◆ lexKindIsQmlReserved()

bool Token::lexKindIsQmlReserved ( int kind)
static

Definition at line 229 of file qqmldomscanner.cpp.

◆ lexKindIsStringType()

bool Token::lexKindIsStringType ( int kind)
static

Definition at line 337 of file qqmldomscanner.cpp.

Referenced by QQmlJS::Dom::FormatPartialStatus::tryStatement().

+ Here is the caller graph for this function:

◆ toString()

QString QQmlJS::Dom::Token::toString ( QStringView line = QStringView()) const
inline

Definition at line 48 of file qqmldomscanner_p.h.

References dump(), QQmlJS::Dom::dumperToString(), and line.

+ Here is the call graph for this function:

Member Data Documentation

◆ length

int QQmlJS::Dom::Token::length = 0

Definition at line 63 of file qqmldomscanner_p.h.

◆ lexKind

int QQmlJS::Dom::Token::lexKind = QQmlJSGrammar::T_NONE

◆ offset

int QQmlJS::Dom::Token::offset = 0

Definition at line 62 of file qqmldomscanner_p.h.


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