public CssScanner(TextReader reader)
        {
            m_context = new CssContext();

            m_reader = reader;
            //m_readAhead = null;

            // get the first character
            NextChar();
        }
Beispiel #2
0
 public CssToken(TokenType tokenType, char ch, CssContext context)
     : this(tokenType, new string(ch, 1), context)
 {
 }
Beispiel #3
0
 public CssToken(TokenType tokenType, [Localizable(false)] string text, CssContext context)
 {
     m_tokenType = tokenType;
     m_text      = text;
     m_context   = context.Clone();
 }
        private void ReportError(int severity, CssErrorCode errorNumber, CssContext context, params object[] arguments)
        {
            // guide: 0 == syntax error
            //        1 == the programmer probably did not intend to do this
            //        2 == this can lead to problems in the future.
            //        3 == this can lead to performance problems
            //        4 == this is just not right

            string message = CssStrings.ResourceManager.GetString(errorNumber.ToString(), CssStrings.Culture).FormatInvariant(arguments);
            var exc = new CssException(
                (int)errorNumber,
                CssStrings.ParserSubsystem,
                severity,
                (context != null) ? context.Start.Line : 0,
                (context != null) ? context.Start.Char : 0,
                message);

            // but warnings we want to just report and carry on
            OnCssError(exc);
        }
 public CssToken(TokenType tokenType, char ch, CssContext context)
     : this(tokenType, new string(ch, 1), context)
 {
 }
 public CssToken(TokenType tokenType, [Localizable(false)] string text, CssContext context)
 {
     m_tokenType = tokenType;
     m_text = text;
     m_context = context.Clone();
 }