public override CssRule Create(CssToken current)
        {
            var token = _tokenizer.Get();
            var rule = new CssCharsetRule(_parser);

            if (token.Type == CssTokenType.String)
                rule.CharacterSet = token.Data;

            _tokenizer.JumpToNextSemicolon();
            return rule;
        }
Beispiel #2
0
        public CssRule CreateCharset(CssToken current)
        {
            var rule = new CssCharsetRule(_parser);
            var start = current.Position;
            var token = NextToken();
            _nodes.Push(rule);
            CollectTrivia(ref token);

            if (token.Type == CssTokenType.String)
            {
                rule.CharacterSet = token.Data;
            }

            JumpToEnd(ref token);
            rule.SourceCode = CreateView(start, token.Position);
            _nodes.Pop();
            return rule;
        }