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

Extracts various pieces and information out of a rawComment string. More...

#include <qqmldomcomments_p.h>

Collaboration diagram for QQmlJS::Dom::CommentInfo:

Public Member Functions

 CommentInfo (QStringView, QQmlJS::SourceLocation loc)
QStringView preWhitespace () const
QStringView comment () const
QStringView commentContent () const
QStringView postWhitespace () const
QQmlJS::SourceLocation sourceLocation () const

Public Attributes

quint32 commentBegin = 0
quint32 commentEnd = 0
quint32 commentContentBegin = 0
quint32 commentContentEnd = 0
QStringView commentStartStr
QStringView commentEndStr
bool hasStartNewline = false
bool hasEndNewline = false
int nContentNewlines = 0
QStringView rawComment
QStringList warnings
QQmlJS::SourceLocation commentLocation

Detailed Description

Extracts various pieces and information out of a rawComment string.

Comments store a string (rawComment) with comment characters (//,..) and spaces. Sometime one wants just the comment, the commentcharacters, the space before the comment,.... CommentInfo gets such a raw comment string and makes the various pieces available

Definition at line 38 of file qqmldomcomments_p.h.

Constructor & Destructor Documentation

◆ CommentInfo()

QQmlJS::Dom::CommentInfo::CommentInfo ( QStringView rawComment,
QQmlJS::SourceLocation loc )

Definition at line 68 of file qqmldomcomments.cpp.

References hasEndNewline, hasStartNewline, and nContentNewlines.

Member Function Documentation

◆ comment()

QStringView QQmlJS::Dom::CommentInfo::comment ( ) const
inline

Definition at line 46 of file qqmldomcomments_p.h.

◆ commentContent()

QStringView QQmlJS::Dom::CommentInfo::commentContent ( ) const
inline

Definition at line 48 of file qqmldomcomments_p.h.

◆ postWhitespace()

QStringView QQmlJS::Dom::CommentInfo::postWhitespace ( ) const
inline

Definition at line 53 of file qqmldomcomments_p.h.

◆ preWhitespace()

QStringView QQmlJS::Dom::CommentInfo::preWhitespace ( ) const
inline

Definition at line 44 of file qqmldomcomments_p.h.

◆ sourceLocation()

QQmlJS::SourceLocation QQmlJS::Dom::CommentInfo::sourceLocation ( ) const
inline

Definition at line 60 of file qqmldomcomments_p.h.

Member Data Documentation

◆ commentBegin

quint32 QQmlJS::Dom::CommentInfo::commentBegin = 0

Definition at line 62 of file qqmldomcomments_p.h.

◆ commentContentBegin

quint32 QQmlJS::Dom::CommentInfo::commentContentBegin = 0

Definition at line 64 of file qqmldomcomments_p.h.

◆ commentContentEnd

quint32 QQmlJS::Dom::CommentInfo::commentContentEnd = 0

Definition at line 65 of file qqmldomcomments_p.h.

◆ commentEnd

quint32 QQmlJS::Dom::CommentInfo::commentEnd = 0

Definition at line 63 of file qqmldomcomments_p.h.

◆ commentEndStr

QStringView QQmlJS::Dom::CommentInfo::commentEndStr

Definition at line 67 of file qqmldomcomments_p.h.

◆ commentLocation

QQmlJS::SourceLocation QQmlJS::Dom::CommentInfo::commentLocation

Definition at line 73 of file qqmldomcomments_p.h.

◆ commentStartStr

QStringView QQmlJS::Dom::CommentInfo::commentStartStr

Definition at line 66 of file qqmldomcomments_p.h.

◆ hasEndNewline

bool QQmlJS::Dom::CommentInfo::hasEndNewline = false

Definition at line 69 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ hasStartNewline

bool QQmlJS::Dom::CommentInfo::hasStartNewline = false

Definition at line 68 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ nContentNewlines

int QQmlJS::Dom::CommentInfo::nContentNewlines = 0

Definition at line 70 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ rawComment

QStringView QQmlJS::Dom::CommentInfo::rawComment

Definition at line 71 of file qqmldomcomments_p.h.

◆ warnings

QStringList QQmlJS::Dom::CommentInfo::warnings

Definition at line 72 of file qqmldomcomments_p.h.


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