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>.
|
#include <qcssparser_p.h>
Public Attributes | |
QList< Symbol > | symbols |
int | index |
int | errorIndex |
bool | hasEscapeSequences |
QString | sourcePath |
Definition at line 725 of file qcssparser_p.h.
Parser::Parser | ( | ) |
Definition at line 2311 of file qcssparser.cpp.
References errorIndex, and hasEscapeSequences.
Definition at line 2306 of file qcssparser.cpp.
References init().
Symbol Parser::errorSymbol | ( | ) |
Definition at line 2384 of file qcssparser.cpp.
References QList< T >::at(), errorIndex, and symbols.
|
inline |
Definition at line 792 of file qcssparser_p.h.
Referenced by lexemUntil(), next(), parse(), parseBrushValue(), QSvgHandler::parseCSStoXMLAttrs(), parseNextOperator(), and parseTerm().
Definition at line 2318 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().
|
inline |
Definition at line 798 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().
QString Parser::lexemUntil | ( | QCss::TokenType | t | ) |
Definition at line 2930 of file qcssparser.cpp.
References hasNext(), QCss::Symbol::lexem(), lexem(), next(), and symbol().
|
inline |
Definition at line 802 of file qcssparser_p.h.
References QCss::NONE.
Referenced by parseCombinator(), parseElementName(), parseTerm(), and unquotedLexem().
|
inline |
Definition at line 788 of file qcssparser_p.h.
References QCss::IDENT, and QCss::STAR.
Referenced by parseSimpleSelector().
|
inline |
Definition at line 793 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().
bool Parser::next | ( | QCss::TokenType | t | ) |
Definition at line 2902 of file qcssparser.cpp.
References hasNext(), next(), and recordError().
bool Parser::parse | ( | StyleSheet * | styleSheet, |
Qt::CaseSensitivity | nameCaseSensitivity = Qt::CaseSensitive ) |
Definition at line 2343 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().
bool Parser::parseAttrib | ( | AttributeSelector * | attr | ) |
Definition at line 2646 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().
bool Parser::parseClass | ( | QString * | name | ) |
Definition at line 2629 of file qcssparser.cpp.
References QCss::IDENT, lexem(), and next().
Referenced by parseSimpleSelector().
bool Parser::parseCombinator | ( | BasicSelector::Relation * | relation | ) |
Definition at line 2495 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().
bool Parser::parseElementName | ( | QString * | name | ) |
Definition at line 2636 of file qcssparser.cpp.
References QCss::IDENT, lexem(), lookup(), and QCss::STAR.
Referenced by parseSimpleSelector().
Definition at line 2734 of file qcssparser.cpp.
References parseNextOperator(), parseTerm(), testTerm(), and QCss::Value::Unknown.
Definition at line 2844 of file qcssparser.cpp.
References QList< T >::append(), args, QList< T >::at(), i, index, lexem(), Symbol::lexem(), QCss::RPAREN, skipSpace(), symbols, and until().
Referenced by parseTerm(), and testAndParseUri().
bool Parser::parseHexColor | ( | QColor * | col | ) |
Definition at line 2863 of file qcssparser.cpp.
References QColor::fromString(), QColor::isValid(), lexem(), qWarning, and skipSpace().
Referenced by parseTerm().
bool Parser::parseImport | ( | ImportRule * | importRule | ) |
Definition at line 2398 of file qcssparser.cpp.
References QCss::COMMA, lexem(), next(), parseMedium(), parseNextMedium(), removeOptionalQuotes(), QCss::SEMICOLON, skipSpace(), QCss::STRING, test(), testAndParseUri(), and testMedium().
Referenced by parse().
bool Parser::parseMedia | ( | MediaRule * | mediaRule | ) |
Definition at line 2426 of file qcssparser.cpp.
References QCss::COMMA, QCss::LBRACE, next(), parseNextMedium(), parseRuleset(), QCss::RBRACE, rule, skipSpace(), test(), and testRuleset().
Referenced by parse().
bool Parser::parseMedium | ( | QStringList * | media | ) |
Definition at line 2447 of file qcssparser.cpp.
References lexem(), and skipSpace().
Referenced by parseImport().
bool Parser::parseNextDeclaration | ( | Declaration * | declaration | ) |
Definition at line 2698 of file qcssparser.cpp.
References QCss::COLON, QCss::Declaration::d, next(), parseNextExpr(), parsePrio(), parseProperty(), skipSpace(), testPrio(), and testProperty().
Referenced by parsePage(), and parseRuleset().
Definition at line 777 of file qcssparser_p.h.
Referenced by parseNextDeclaration().
Definition at line 786 of file qcssparser_p.h.
References args.
|
inline |
Definition at line 768 of file qcssparser_p.h.
Referenced by parseImport(), and parseMedia().
bool Parser::parseNextOperator | ( | Value * | value | ) |
Definition at line 2484 of file qcssparser.cpp.
References QCss::COMMA, hasNext(), next(), prev(), skipSpace(), QCss::SLASH, QCss::Value::TermOperatorComma, and QCss::Value::TermOperatorSlash.
Referenced by parseExpr().
|
inline |
Definition at line 760 of file qcssparser_p.h.
Referenced by parseRuleset().
|
inline |
Definition at line 762 of file qcssparser_p.h.
bool Parser::parsePage | ( | PageRule * | pageRule | ) |
Definition at line 2454 of file qcssparser.cpp.
References QCss::Declaration::isEmpty(), QCss::LBRACE, next(), parseNextDeclaration(), parsePseudoPage(), QCss::RBRACE, QCss::SEMICOLON, skipSpace(), test(), and testPseudoPage().
Referenced by parse().
bool Parser::parsePrio | ( | Declaration * | declaration | ) |
Definition at line 2727 of file qcssparser.cpp.
References QCss::Declaration::d, and skipSpace().
Referenced by parseNextDeclaration().
bool Parser::parseProperty | ( | Declaration * | decl | ) |
Definition at line 2515 of file qcssparser.cpp.
References QCss::Declaration::d, findKnownValue(), isInheritable(), lexem(), QCss::NumProperties, properties, and skipSpace().
Referenced by parseNextDeclaration().
bool Parser::parsePseudo | ( | Pseudo * | pseudo | ) |
Definition at line 2678 of file qcssparser.cpp.
References QCss::COLON, QCss::EXCLAMATION_SYM, findKnownValue(), QCss::FUNCTION, QCss::IDENT, lexem(), next(), QCss::NumPseudos, pseudos, QCss::RPAREN, skipSpace(), test(), and void.
Referenced by parseSimpleSelector().
bool Parser::parsePseudoPage | ( | QString * | selector | ) |
Definition at line 2477 of file qcssparser.cpp.
References QCss::IDENT, lexem(), next(), and selector.
Referenced by parsePage().
bool Parser::parseRuleset | ( | StyleRule * | styleRule | ) |
Definition at line 2524 of file qcssparser.cpp.
References QCss::COMMA, index, QCss::Declaration::isEmpty(), QCss::LBRACE, next(), parseNextDeclaration(), parseNextSelector(), parseSelector(), QCss::RBRACE, QCss::SEMICOLON, skipSpace(), test(), and until().
Referenced by parse(), and parseMedia().
bool Parser::parseSelector | ( | Selector * | sel | ) |
Definition at line 2570 of file qcssparser.cpp.
References parseCombinator(), parseSimpleSelector(), testCombinator(), and testSimpleSelector().
Referenced by parseRuleset().
bool Parser::parseSimpleSelector | ( | BasicSelector * | basicSel | ) |
Definition at line 2587 of file qcssparser.cpp.
References QString::append(), QCss::HASH, lexem(), lookupElementName(), QCss::AttributeSelector::MatchIncludes, QCss::AttributeSelector::name, parseAttrib(), parseClass(), parseElementName(), parsePseudo(), prev(), QString::remove(), test(), testAttrib(), testClass(), and testPseudo().
Referenced by parseSelector().
bool Parser::parseTerm | ( | Value * | value | ) |
Definition at line 2768 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().
|
inline |
Definition at line 796 of file qcssparser_p.h.
Referenced by parseCombinator(), parseNextOperator(), parseSimpleSelector(), parseTerm(), and testTokenAndEndsWith().
|
inline |
Definition at line 808 of file qcssparser_p.h.
Referenced by next(), and parseTerm().
|
inline |
Definition at line 790 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().
|
inline |
Definition at line 797 of file qcssparser_p.h.
Referenced by lexemUntil(), and QSvgHandler::parseCSStoXMLAttrs().
bool Parser::test | ( | QCss::TokenType | t | ) |
Definition at line 2909 of file qcssparser.cpp.
References QList< T >::at(), index, QList< T >::size(), symbols, and Symbol::token.
Referenced by parse(), parseAttrib(), parseBrushValue(), parseCombinator(), QSvgHandler::parseCSStoXMLAttrs(), parseImport(), parseMedia(), parsePage(), parsePseudo(), parseRuleset(), parseSimpleSelector(), testPrio(), testSimpleSelector(), testTerm(), and testTokenAndEndsWith().
bool Parser::testAndParseUri | ( | QString * | uri | ) |
Definition at line 2874 of file qcssparser.cpp.
References args, Qt::CaseInsensitive, index, parseFunction(), removeOptionalQuotes(), and testFunction().
Referenced by parseImport().
|
inline |
Definition at line 765 of file qcssparser_p.h.
References QCss::LBRACKET.
Referenced by parseSimpleSelector(), and testSimpleSelector().
|
inline |
Definition at line 764 of file qcssparser_p.h.
References QCss::DOT.
Referenced by parseSimpleSelector(), and testSimpleSelector().
|
inline |
Definition at line 773 of file qcssparser_p.h.
References QCss::GREATER, QCss::PLUS, QCss::S, and QCss::TILDE.
Referenced by parseSelector().
|
inline |
Definition at line 763 of file qcssparser_p.h.
References QCss::IDENT, and QCss::STAR.
Referenced by testSimpleSelector().
|
inline |
Definition at line 776 of file qcssparser_p.h.
|
inline |
Definition at line 785 of file qcssparser_p.h.
References QCss::FUNCTION.
Referenced by parseTerm(), testAndParseUri(), and testTerm().
|
inline |
Definition at line 784 of file qcssparser_p.h.
References QCss::HASH.
Referenced by parseTerm(), and testTerm().
|
inline |
Definition at line 770 of file qcssparser_p.h.
References QCss::ATKEYWORD_SYM.
Referenced by parse().
|
inline |
Definition at line 771 of file qcssparser_p.h.
References QCss::ATKEYWORD_SYM.
Referenced by parse().
|
inline |
Definition at line 767 of file qcssparser_p.h.
References QCss::IDENT.
Referenced by parseImport().
|
inline |
Definition at line 772 of file qcssparser_p.h.
References QCss::ATKEYWORD_SYM.
Referenced by parse().
bool Parser::testPrio | ( | ) |
Definition at line 2711 of file qcssparser.cpp.
References Qt::CaseInsensitive, compare(), QCss::EXCLAMATION_SYM, QCss::IDENT, index, lexem(), skipSpace(), and test().
Referenced by parseNextDeclaration().
|
inline |
Definition at line 774 of file qcssparser_p.h.
References QCss::IDENT.
Referenced by parseNextDeclaration().
|
inline |
Definition at line 766 of file qcssparser_p.h.
References QCss::COLON.
Referenced by parseSimpleSelector(), and testSimpleSelector().
|
inline |
Definition at line 769 of file qcssparser_p.h.
References QCss::COLON.
Referenced by parsePage().
|
inline |
Definition at line 758 of file qcssparser_p.h.
Referenced by parse(), and parseMedia().
|
inline |
Definition at line 759 of file qcssparser_p.h.
bool Parser::testSimpleSelector | ( | ) |
Definition at line 2893 of file qcssparser.cpp.
References QCss::HASH, test(), testAttrib(), testClass(), testElementName(), and testPseudo().
Referenced by parseSelector().
bool Parser::testTerm | ( | ) |
Definition at line 2756 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().
bool Parser::testTokenAndEndsWith | ( | QCss::TokenType | t, |
QLatin1StringView | str ) |
Definition at line 2978 of file qcssparser.cpp.
References Qt::CaseInsensitive, lexem(), prev(), str, and test().
Referenced by parse().
QString Parser::unquotedLexem | ( | ) | const |
Definition at line 2920 of file qcssparser.cpp.
References lexem(), lookup(), and QCss::STRING.
Referenced by parseAttrib().
bool Parser::until | ( | QCss::TokenType | target, |
QCss::TokenType | target2 = NONE ) |
Definition at line 2938 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 Symbol::token.
Referenced by parse(), parseFunction(), and parseRuleset().
int QCss::Parser::errorIndex |
Definition at line 812 of file qcssparser_p.h.
Referenced by Parser(), errorSymbol(), and init().
bool QCss::Parser::hasEscapeSequences |
Definition at line 813 of file qcssparser_p.h.
Referenced by Parser(), init(), and QSvgHandler::parseCSStoXMLAttrs().
int QCss::Parser::index |
Definition at line 811 of file qcssparser_p.h.
Referenced by QSvgHandler::parseCSStoXMLAttrs(), parseFunction(), parseRuleset(), test(), testAndParseUri(), testPrio(), and until().
QString QCss::Parser::sourcePath |
Definition at line 814 of file qcssparser_p.h.
Referenced by init(), and parseTerm().
Definition at line 810 of file qcssparser_p.h.
Referenced by errorSymbol(), init(), QSvgHandler::parseCSStoXMLAttrs(), parseFunction(), test(), and until().