summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-12-05 13:53:06 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-12-05 13:53:06 +0100
commit04ee61f336cf9bd848c9d922619db2ee45faafe9 (patch)
treee596538215290abd3dc5eb8693e0170b5083bc9b /src/plugins
parent9cb01624a4efe2063d5870f41e033476d9368b6d (diff)
added an 'accepting' attribute to SelectorNodes to make them properly usable as finite state machine nodes without relying on rulesets.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/css/CSSParser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/css/CSSParser.cpp b/src/plugins/css/CSSParser.cpp
index d239359..00b5af5 100644
--- a/src/plugins/css/CSSParser.cpp
+++ b/src/plugins/css/CSSParser.cpp
@@ -99,6 +99,15 @@ void CSSParser::parseDocument(Rooted<SelectorNode> root,
std::vector<Rooted<SelectorNode>> leafList;
parseSelectors(root, tokenizer, leafList, ctx);
// TODO: Parse Ruleset
+ for (auto &leaf : leafList) {
+ /* every leaf is an accepting node, if one considers the SelectorTree
+ * to be a finite state machine. This is relevant, if users do not use
+ * the CSS Parser to parse actual Ruleset content but to construct a
+ * SelectorTree just to identify a part of the DocumentTree.
+ */
+ leaf->setAccepting(true);
+ //TODO: append RuleSets
+ }
parseDocument(root, tokenizer, ctx);
}