public CssParser(CssTokenizer tokenizer, CssGrammar grammar) { ArgChecker.AssertArgNotNull(tokenizer, nameof(tokenizer)); _tokenizer = tokenizer; _rootScope = new RootScope(this, tokenizer.Tokenize().GetEnumerator(), grammar ?? DefaultGrammar); _namespaceManager = new XmlNamespaceManager(new NameTable()); var parseErrorNotifier = new ParseErrorNotifier(this); _parseErrorNotifier = parseErrorNotifier; _tokenizer.ParseError += (sender, e) => parseErrorNotifier.NotifyParseError(e); }
public CssParser(CssTokenizer tokenizer) : this(tokenizer, null) { }