Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QCss::Parser Class Reference

#include <qcssparser_p.h>

+ Collaboration diagram for QCss::Parser:

Public Member Functions

 Parser ()
 
 Parser (const QString &css, bool file=false)
 
void init (const QString &css, bool file=false)
 
bool parse (StyleSheet *styleSheet, Qt::CaseSensitivity nameCaseSensitivity=Qt::CaseSensitive)
 
Symbol errorSymbol ()
 
bool parseImport (ImportRule *importRule)
 
bool parseMedia (MediaRule *mediaRule)
 
bool parseMedium (QStringList *media)
 
bool parsePage (PageRule *pageRule)
 
bool parsePseudoPage (QString *selector)
 
bool parseNextOperator (Value *value)
 
bool parseCombinator (BasicSelector::Relation *relation)
 
bool parseProperty (Declaration *decl)
 
bool parseRuleset (StyleRule *styleRule)
 
bool parseSelector (Selector *sel)
 
bool parseSimpleSelector (BasicSelector *basicSel)
 
bool parseClass (QString *name)
 
bool parseElementName (QString *name)
 
bool parseAttrib (AttributeSelector *attr)
 
bool parsePseudo (Pseudo *pseudo)
 
bool parseNextDeclaration (Declaration *declaration)
 
bool parsePrio (Declaration *declaration)
 
bool parseExpr (QList< Value > *values)
 
bool parseTerm (Value *value)
 
bool parseFunction (QString *name, QString *args)
 
bool parseHexColor (QColor *col)
 
bool testAndParseUri (QString *uri)
 
bool testRuleset ()
 
bool testSelector ()
 
bool parseNextSelector (Selector *sel)
 
bool testSimpleSelector ()
 
bool parseNextSimpleSelector (BasicSelector *basicSel)
 
bool testElementName ()
 
bool testClass ()
 
bool testAttrib ()
 
bool testPseudo ()
 
bool testMedium ()
 
bool parseNextMedium (QStringList *media)
 
bool testPseudoPage ()
 
bool testImport ()
 
bool testMedia ()
 
bool testPage ()
 
bool testCombinator ()
 
bool testProperty ()
 
bool testTerm ()
 
bool testExpr ()
 
bool parseNextExpr (QList< Value > *values)
 
bool testPrio ()
 
bool testHexColor ()
 
bool testFunction ()
 
bool parseNextFunction (QString *name, QString *args)
 
bool lookupElementName () const
 
void skipSpace ()
 
bool hasNext () const
 
TokenType next ()
 
bool next (TokenType t)
 
bool test (TokenType t)
 
void prev ()
 
const Symbolsymbol () const
 
QString lexem () const
 
QString unquotedLexem () const
 
QString lexemUntil (TokenType t)
 
bool until (TokenType target, TokenType target2=NONE)
 
TokenType lookup () const
 
bool testTokenAndEndsWith (TokenType t, QLatin1StringView str)
 
bool recordError ()
 

Public Attributes

QList< Symbolsymbols
 
int index
 
int errorIndex
 
bool hasEscapeSequences
 
QString sourcePath
 

Detailed Description

Definition at line 722 of file qcssparser_p.h.

Constructor & Destructor Documentation

◆ Parser() [1/2]

Parser::Parser ( )

Definition at line 2301 of file qcssparser.cpp.

References errorIndex, and hasEscapeSequences.

◆ Parser() [2/2]

Parser::Parser ( const QString css,
bool  file = false 
)
explicit

Definition at line 2296 of file qcssparser.cpp.

References init().

+ Here is the call graph for this function:

Member Function Documentation

◆ errorSymbol()

Symbol Parser::errorSymbol ( )

Definition at line 2374 of file qcssparser.cpp.

References QList< T >::at(), errorIndex, and symbols.

+ Here is the call graph for this function:

◆ hasNext()

bool QCss::Parser::hasNext ( ) const
inline

Definition at line 789 of file qcssparser_p.h.

Referenced by lexemUntil(), next(), parse(), parseBrushValue(), QSvgHandler::parseCSStoXMLAttrs(), parseNextOperator(), and parseTerm().

+ Here is the caller graph for this function:

◆ init()

void Parser::init ( const QString css,
bool  file = false 
)

Definition at line 2308 of file qcssparser.cpp.

References QFileInfo::absolutePath(), QString::clear(), QList< T >::clear(), errorIndex, file, hasEscapeSequences, QFile::open(), QCss::Scanner::preprocess(), qWarning, QIODeviceBase::ReadOnly, QList< T >::reserve(), QCss::Scanner::scan(), sourcePath, and symbols.

Referenced by Parser(), and QSvgHandler::parseCSStoXMLAttrs().

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

◆ lexem()

QString QCss::Parser::lexem ( ) const
inline

Definition at line 795 of file qcssparser_p.h.

Referenced by lexemUntil(), parseAttrib(), parseBrushValue(), parseClass(), QSvgHandler::parseCSStoXMLAttrs(), parseElementName(), parseFunction(), parseHexColor(), parseImport(), parseMedium(), parseProperty(), parsePseudo(), parsePseudoPage(), parseSimpleSelector(), parseTerm(), testPrio(), testTokenAndEndsWith(), and unquotedLexem().

+ Here is the caller graph for this function:

◆ lexemUntil()

QString Parser::lexemUntil ( QCss::TokenType  t)

Definition at line 2920 of file qcssparser.cpp.

References hasNext(), QCss::Symbol::lexem(), lexem(), next(), and symbol().

+ Here is the call graph for this function:

◆ lookup()

TokenType QCss::Parser::lookup ( ) const
inline

Definition at line 799 of file qcssparser_p.h.

References QCss::NONE.

Referenced by parseCombinator(), parseElementName(), parseTerm(), and unquotedLexem().

+ Here is the caller graph for this function:

◆ lookupElementName()

bool QCss::Parser::lookupElementName ( ) const
inline

Definition at line 785 of file qcssparser_p.h.

References QCss::IDENT, and QCss::STAR.

Referenced by parseSimpleSelector().

+ Here is the caller graph for this function:

◆ next() [1/2]

TokenType QCss::Parser::next ( )
inline

Definition at line 790 of file qcssparser_p.h.

Referenced by lexemUntil(), next(), parse(), parseAttrib(), parseBrushValue(), parseClass(), QSvgHandler::parseCSStoXMLAttrs(), parseImport(), parseMedia(), parseNextDeclaration(), parseNextOperator(), parsePage(), parsePseudo(), parsePseudoPage(), parseRuleset(), and parseTerm().

+ Here is the caller graph for this function:

◆ next() [2/2]

bool Parser::next ( QCss::TokenType  t)

Definition at line 2892 of file qcssparser.cpp.

References hasNext(), next(), and recordError().

+ Here is the call graph for this function:

◆ parse()

bool Parser::parse ( StyleSheet styleSheet,
Qt::CaseSensitivity  nameCaseSensitivity = Qt::CaseSensitive 
)

Definition at line 2333 of file qcssparser.cpp.

References QCss::ATKEYWORD_SYM, QCss::StyleSheet::buildIndexes(), QCss::CDC, QCss::CDO, hasNext(), QCss::StyleSheet::importRules, QCss::StyleSheet::mediaRules, next(), QCss::StyleSheet::pageRules, parseImport(), parseMedia(), parsePage(), parseRuleset(), QCss::RBRACE, rule, QCss::S, QCss::SEMICOLON, QCss::STRING, QCss::StyleSheet::styleRules, test(), testImport(), testMedia(), testPage(), testRuleset(), testTokenAndEndsWith(), and until().

Referenced by QSvgHandler::characters(), QTextHtmlParserNode::parseStyleAttribute(), QTextHtmlParser::parseTag(), QSvgHandler::processingInstruction(), and QTextDocument::setDefaultStyleSheet().

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

◆ parseAttrib()

bool Parser::parseAttrib ( AttributeSelector attr)

Definition at line 2636 of file qcssparser.cpp.

References QCss::BEGINSWITH, QCss::CONTAINS, QCss::DASHMATCH, QCss::ENDSWITH, QCss::EQUAL, QCss::IDENT, QCss::INCLUDES, lexem(), QCss::AttributeSelector::MatchBeginsWith, QCss::AttributeSelector::MatchContains, QCss::AttributeSelector::MatchDashMatch, QCss::AttributeSelector::MatchEndsWith, QCss::AttributeSelector::MatchEqual, QCss::AttributeSelector::MatchIncludes, QCss::AttributeSelector::name, next(), QCss::RBRACKET, skipSpace(), QCss::STRING, test(), unquotedLexem(), QCss::AttributeSelector::value, and QCss::AttributeSelector::valueMatchCriterium.

Referenced by parseSimpleSelector().

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

◆ parseClass()

bool Parser::parseClass ( QString name)

Definition at line 2619 of file qcssparser.cpp.

References QCss::IDENT, lexem(), and next().

Referenced by parseSimpleSelector().

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

◆ parseCombinator()

bool Parser::parseCombinator ( BasicSelector::Relation relation)

Definition at line 2485 of file qcssparser.cpp.

References QCss::GREATER, lookup(), QCss::BasicSelector::MatchNextSelectorIfAncestor, QCss::BasicSelector::MatchNextSelectorIfDirectAdjecent, QCss::BasicSelector::MatchNextSelectorIfIndirectAdjecent, QCss::BasicSelector::MatchNextSelectorIfParent, QCss::BasicSelector::NoRelation, QCss::PLUS, prev(), QCss::S, skipSpace(), test(), and QCss::TILDE.

Referenced by parseSelector().

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

◆ parseElementName()

bool Parser::parseElementName ( QString name)

Definition at line 2626 of file qcssparser.cpp.

References QCss::IDENT, lexem(), lookup(), and QCss::STAR.

Referenced by parseSimpleSelector().

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

◆ parseExpr()

bool Parser::parseExpr ( QList< Value > *  values)

Definition at line 2724 of file qcssparser.cpp.

References parseNextOperator(), parseTerm(), testTerm(), and QCss::Value::Unknown.

+ Here is the call graph for this function:

◆ parseFunction()

bool Parser::parseFunction ( QString name,
QString args 
)

Definition at line 2834 of file qcssparser.cpp.

References QList< T >::append(), args, QList< T >::at(), i, index, QCss::Symbol::lexem(), lexem(), QCss::RPAREN, skipSpace(), symbols, and until().

Referenced by parseTerm(), and testAndParseUri().

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

◆ parseHexColor()

bool Parser::parseHexColor ( QColor col)

Definition at line 2853 of file qcssparser.cpp.

References QColor::fromString(), QColor::isValid(), lexem(), qWarning, and skipSpace().

Referenced by parseTerm().

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

◆ parseImport()

bool Parser::parseImport ( ImportRule importRule)

Definition at line 2388 of file qcssparser.cpp.

References QCss::COMMA, QCss::ImportRule::href, lexem(), QCss::ImportRule::media, next(), parseMedium(), parseNextMedium(), removeOptionalQuotes(), QCss::SEMICOLON, skipSpace(), QCss::STRING, test(), testAndParseUri(), and testMedium().

Referenced by parse().

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

◆ parseMedia()

bool Parser::parseMedia ( MediaRule mediaRule)

Definition at line 2416 of file qcssparser.cpp.

References QCss::COMMA, QCss::LBRACE, QCss::MediaRule::media, next(), parseNextMedium(), parseRuleset(), QCss::RBRACE, rule, skipSpace(), QCss::MediaRule::styleRules, test(), and testRuleset().

Referenced by parse().

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

◆ parseMedium()

bool Parser::parseMedium ( QStringList media)

Definition at line 2437 of file qcssparser.cpp.

References lexem(), and skipSpace().

Referenced by parseImport().

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

◆ parseNextDeclaration()

bool Parser::parseNextDeclaration ( Declaration declaration)

Definition at line 2688 of file qcssparser.cpp.

References QCss::COLON, QCss::Declaration::d, next(), parseNextExpr(), parsePrio(), parseProperty(), skipSpace(), testPrio(), and testProperty().

Referenced by parsePage(), and parseRuleset().

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

◆ parseNextExpr()

bool QCss::Parser::parseNextExpr ( QList< Value > *  values)
inline

Definition at line 774 of file qcssparser_p.h.

Referenced by parseNextDeclaration().

+ Here is the caller graph for this function:

◆ parseNextFunction()

bool QCss::Parser::parseNextFunction ( QString name,
QString args 
)
inline

Definition at line 783 of file qcssparser_p.h.

References args.

◆ parseNextMedium()

bool QCss::Parser::parseNextMedium ( QStringList media)
inline

Definition at line 765 of file qcssparser_p.h.

Referenced by parseImport(), and parseMedia().

+ Here is the caller graph for this function:

◆ parseNextOperator()

bool Parser::parseNextOperator ( Value value)

Definition at line 2474 of file qcssparser.cpp.

References QCss::COMMA, hasNext(), next(), prev(), skipSpace(), QCss::SLASH, QCss::Value::TermOperatorComma, and QCss::Value::TermOperatorSlash.

Referenced by parseExpr().

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

◆ parseNextSelector()

bool QCss::Parser::parseNextSelector ( Selector sel)
inline

Definition at line 757 of file qcssparser_p.h.

Referenced by parseRuleset().

+ Here is the caller graph for this function:

◆ parseNextSimpleSelector()

bool QCss::Parser::parseNextSimpleSelector ( BasicSelector basicSel)
inline

Definition at line 759 of file qcssparser_p.h.

◆ parsePage()

bool Parser::parsePage ( PageRule pageRule)

Definition at line 2444 of file qcssparser.cpp.

References QCss::PageRule::declarations, QCss::Declaration::isEmpty(), QCss::LBRACE, next(), parseNextDeclaration(), parsePseudoPage(), QCss::RBRACE, QCss::PageRule::selector, QCss::SEMICOLON, skipSpace(), test(), and testPseudoPage().

Referenced by parse().

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

◆ parsePrio()

bool Parser::parsePrio ( Declaration declaration)

Definition at line 2717 of file qcssparser.cpp.

References QCss::Declaration::d, and skipSpace().

Referenced by parseNextDeclaration().

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

◆ parseProperty()

bool Parser::parseProperty ( Declaration decl)

Definition at line 2505 of file qcssparser.cpp.

References QCss::Declaration::d, findKnownValue(), isInheritable(), lexem(), QCss::NumProperties, properties, and skipSpace().

Referenced by parseNextDeclaration().

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

◆ parsePseudo()

bool Parser::parsePseudo ( Pseudo pseudo)

Definition at line 2668 of file qcssparser.cpp.

References QString::chop(), QCss::COLON, QCss::EXCLAMATION_SYM, findKnownValue(), QCss::Pseudo::function, QCss::FUNCTION, QCss::IDENT, lexem(), QCss::Pseudo::name, QCss::Pseudo::negated, next(), QCss::NumPseudos, pseudos, QCss::RPAREN, skipSpace(), test(), QCss::Pseudo::type, and void.

Referenced by parseSimpleSelector().

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

◆ parsePseudoPage()

bool Parser::parsePseudoPage ( QString selector)

Definition at line 2467 of file qcssparser.cpp.

References QCss::IDENT, lexem(), next(), and selector.

Referenced by parsePage().

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

◆ parseRuleset()

bool Parser::parseRuleset ( StyleRule styleRule)

Definition at line 2514 of file qcssparser.cpp.

References QCss::COMMA, QCss::StyleRule::declarations, index, QCss::Declaration::isEmpty(), QCss::LBRACE, next(), parseNextDeclaration(), parseNextSelector(), parseSelector(), QCss::RBRACE, QCss::StyleRule::selectors, QCss::SEMICOLON, skipSpace(), test(), and until().

Referenced by parse(), and parseMedia().

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

◆ parseSelector()

bool Parser::parseSelector ( Selector sel)

Definition at line 2560 of file qcssparser.cpp.

References QCss::Selector::basicSelectors, parseCombinator(), parseSimpleSelector(), QCss::BasicSelector::relationToNext, testCombinator(), and testSimpleSelector().

Referenced by parseRuleset().

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

◆ parseSimpleSelector()

bool Parser::parseSimpleSelector ( BasicSelector basicSel)

Definition at line 2577 of file qcssparser.cpp.

References QCss::BasicSelector::attributeSelectors, QCss::BasicSelector::elementName, QCss::HASH, QCss::BasicSelector::ids, lexem(), lookupElementName(), QCss::AttributeSelector::MatchIncludes, parseAttrib(), parseClass(), parseElementName(), parsePseudo(), prev(), QCss::BasicSelector::pseudos, QString::remove(), test(), testAttrib(), testClass(), and testPseudo().

Referenced by parseSelector().

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

◆ parseTerm()

bool Parser::parseTerm ( Value value)

Definition at line 2758 of file qcssparser.cpp.

References args, QString::chop(), QCss::Value::Color, findKnownValue(), QCss::Value::Function, hasNext(), QCss::IDENT, QCss::Value::Identifier, QString::isEmpty(), isRelative(), QCss::Value::KnownIdentifier, QCss::Value::Length, QCss::LENGTH, lexem(), lookup(), QCss::MINUS, next(), QCss::Value::Number, QCss::NUMBER, QCss::NumKnownValues, parseFunction(), parseHexColor(), QCss::Value::Percentage, QCss::PERCENTAGE, QCss::PLUS, QList< T >::prepend(), prev(), recordError(), QString::remove(), removeOptionalQuotes(), skipSpace(), sourcePath, str, QCss::Value::String, QCss::STRING, testFunction(), testHexColor(), and QCss::Value::Uri.

Referenced by parseBrushValue(), and parseExpr().

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

◆ prev()

void QCss::Parser::prev ( )
inline

Definition at line 793 of file qcssparser_p.h.

Referenced by parseCombinator(), parseNextOperator(), parseSimpleSelector(), parseTerm(), and testTokenAndEndsWith().

+ Here is the caller graph for this function:

◆ recordError()

bool QCss::Parser::recordError ( )
inline

Definition at line 805 of file qcssparser_p.h.

Referenced by next(), and parseTerm().

+ Here is the caller graph for this function:

◆ skipSpace()

void QCss::Parser::skipSpace ( )
inline

Definition at line 787 of file qcssparser_p.h.

References QCss::S.

Referenced by parseAttrib(), parseBrushValue(), parseCombinator(), QSvgHandler::parseCSStoXMLAttrs(), parseFunction(), parseHexColor(), parseImport(), parseMedia(), parseMedium(), parseNextDeclaration(), parseNextOperator(), parsePage(), parsePrio(), parseProperty(), parsePseudo(), parseRuleset(), parseTerm(), and testPrio().

+ Here is the caller graph for this function:

◆ symbol()

const Symbol & QCss::Parser::symbol ( ) const
inline

Definition at line 794 of file qcssparser_p.h.

Referenced by lexemUntil(), and QSvgHandler::parseCSStoXMLAttrs().

+ Here is the caller graph for this function:

◆ test()

bool Parser::test ( QCss::TokenType  t)

Definition at line 2899 of file qcssparser.cpp.

References QList< T >::at(), index, QList< T >::size(), symbols, and QCss::Symbol::token.

Referenced by parse(), parseAttrib(), parseBrushValue(), parseCombinator(), QSvgHandler::parseCSStoXMLAttrs(), parseImport(), parseMedia(), parsePage(), parsePseudo(), parseRuleset(), parseSimpleSelector(), testPrio(), testSimpleSelector(), testTerm(), and testTokenAndEndsWith().

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

◆ testAndParseUri()

bool Parser::testAndParseUri ( QString uri)

Definition at line 2864 of file qcssparser.cpp.

References args, Qt::CaseInsensitive, index, parseFunction(), removeOptionalQuotes(), and testFunction().

Referenced by parseImport().

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

◆ testAttrib()

bool QCss::Parser::testAttrib ( )
inline

Definition at line 762 of file qcssparser_p.h.

References QCss::LBRACKET.

Referenced by parseSimpleSelector(), and testSimpleSelector().

+ Here is the caller graph for this function:

◆ testClass()

bool QCss::Parser::testClass ( )
inline

Definition at line 761 of file qcssparser_p.h.

References QCss::DOT.

Referenced by parseSimpleSelector(), and testSimpleSelector().

+ Here is the caller graph for this function:

◆ testCombinator()

bool QCss::Parser::testCombinator ( )
inline

Definition at line 770 of file qcssparser_p.h.

References QCss::GREATER, QCss::PLUS, QCss::S, and QCss::TILDE.

Referenced by parseSelector().

+ Here is the caller graph for this function:

◆ testElementName()

bool QCss::Parser::testElementName ( )
inline

Definition at line 760 of file qcssparser_p.h.

References QCss::IDENT, and QCss::STAR.

Referenced by testSimpleSelector().

+ Here is the caller graph for this function:

◆ testExpr()

bool QCss::Parser::testExpr ( )
inline

Definition at line 773 of file qcssparser_p.h.

◆ testFunction()

bool QCss::Parser::testFunction ( )
inline

Definition at line 782 of file qcssparser_p.h.

References QCss::FUNCTION.

Referenced by parseTerm(), testAndParseUri(), and testTerm().

+ Here is the caller graph for this function:

◆ testHexColor()

bool QCss::Parser::testHexColor ( )
inline

Definition at line 781 of file qcssparser_p.h.

References QCss::HASH.

Referenced by parseTerm(), and testTerm().

+ Here is the caller graph for this function:

◆ testImport()

bool QCss::Parser::testImport ( )
inline

Definition at line 767 of file qcssparser_p.h.

References QCss::ATKEYWORD_SYM.

Referenced by parse().

+ Here is the caller graph for this function:

◆ testMedia()

bool QCss::Parser::testMedia ( )
inline

Definition at line 768 of file qcssparser_p.h.

References QCss::ATKEYWORD_SYM.

Referenced by parse().

+ Here is the caller graph for this function:

◆ testMedium()

bool QCss::Parser::testMedium ( )
inline

Definition at line 764 of file qcssparser_p.h.

References QCss::IDENT.

Referenced by parseImport().

+ Here is the caller graph for this function:

◆ testPage()

bool QCss::Parser::testPage ( )
inline

Definition at line 769 of file qcssparser_p.h.

References QCss::ATKEYWORD_SYM.

Referenced by parse().

+ Here is the caller graph for this function:

◆ testPrio()

bool Parser::testPrio ( )

Definition at line 2701 of file qcssparser.cpp.

References Qt::CaseInsensitive, compare(), QCss::EXCLAMATION_SYM, QCss::IDENT, index, lexem(), skipSpace(), and test().

Referenced by parseNextDeclaration().

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

◆ testProperty()

bool QCss::Parser::testProperty ( )
inline

Definition at line 771 of file qcssparser_p.h.

References QCss::IDENT.

Referenced by parseNextDeclaration().

+ Here is the caller graph for this function:

◆ testPseudo()

bool QCss::Parser::testPseudo ( )
inline

Definition at line 763 of file qcssparser_p.h.

References QCss::COLON.

Referenced by parseSimpleSelector(), and testSimpleSelector().

+ Here is the caller graph for this function:

◆ testPseudoPage()

bool QCss::Parser::testPseudoPage ( )
inline

Definition at line 766 of file qcssparser_p.h.

References QCss::COLON.

Referenced by parsePage().

+ Here is the caller graph for this function:

◆ testRuleset()

bool QCss::Parser::testRuleset ( )
inline

Definition at line 755 of file qcssparser_p.h.

Referenced by parse(), and parseMedia().

+ Here is the caller graph for this function:

◆ testSelector()

bool QCss::Parser::testSelector ( )
inline

Definition at line 756 of file qcssparser_p.h.

◆ testSimpleSelector()

bool Parser::testSimpleSelector ( )

Definition at line 2883 of file qcssparser.cpp.

References QCss::HASH, test(), testAttrib(), testClass(), testElementName(), and testPseudo().

Referenced by parseSelector().

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

◆ testTerm()

bool Parser::testTerm ( )

Definition at line 2746 of file qcssparser.cpp.

References QCss::IDENT, QCss::LENGTH, QCss::MINUS, QCss::NUMBER, QCss::PERCENTAGE, QCss::PLUS, QCss::STRING, test(), testFunction(), and testHexColor().

Referenced by parseExpr().

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

◆ testTokenAndEndsWith()

bool Parser::testTokenAndEndsWith ( QCss::TokenType  t,
QLatin1StringView  str 
)

Definition at line 2968 of file qcssparser.cpp.

References Qt::CaseInsensitive, lexem(), prev(), str, and test().

Referenced by parse().

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

◆ unquotedLexem()

QString Parser::unquotedLexem ( ) const

Definition at line 2910 of file qcssparser.cpp.

References lexem(), lookup(), and QCss::STRING.

Referenced by parseAttrib().

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

◆ until()

bool Parser::until ( QCss::TokenType  target,
QCss::TokenType  target2 = NONE 
)

Definition at line 2928 of file qcssparser.cpp.

References QList< T >::at(), QCss::FUNCTION, index, QCss::LBRACE, QCss::LBRACKET, QCss::LPAREN, QCss::NONE, QCss::RBRACE, QCss::RBRACKET, QCss::RPAREN, QList< T >::size(), symbols, and QCss::Symbol::token.

Referenced by parse(), parseFunction(), and parseRuleset().

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

Member Data Documentation

◆ errorIndex

int QCss::Parser::errorIndex

Definition at line 809 of file qcssparser_p.h.

Referenced by Parser(), errorSymbol(), and init().

◆ hasEscapeSequences

bool QCss::Parser::hasEscapeSequences

Definition at line 810 of file qcssparser_p.h.

Referenced by Parser(), init(), and QSvgHandler::parseCSStoXMLAttrs().

◆ index

int QCss::Parser::index

◆ sourcePath

QString QCss::Parser::sourcePath

Definition at line 811 of file qcssparser_p.h.

Referenced by init(), and parseTerm().

◆ symbols

QList<Symbol> QCss::Parser::symbols

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