Exemplo n.º 1
0
        public CssScanner(TextReader reader)
        {
            m_context = new CssContext();

            m_reader = reader;
            //m_readAhead = null;

            // get the first character
            NextChar();
        }
Exemplo n.º 2
0
        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);
            CssParserException exc = new CssParserException(
                (int)errorNumber,
                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);
        }
Exemplo n.º 3
0
 public CssToken(TokenType tokenType, char ch, CssContext context)
     : this(tokenType, new string(ch, 1), context)
 {
 }
Exemplo n.º 4
0
 public CssToken(TokenType tokenType, [Localizable(false)] string text, CssContext context)
 {
     m_tokenType = tokenType;
     m_text = text;
     m_context = context.Clone();
 }
Exemplo n.º 5
0
 public CssToken(TokenType tokenType, char ch, CssContext context)
     : this(tokenType, new string(ch, 1), context)
 {
 }
Exemplo n.º 6
0
 public CssToken(TokenType tokenType, [Localizable(false)] string text, CssContext context)
 {
     m_tokenType = tokenType;
     m_text      = text;
     m_context   = context.Clone();
 }