예제 #1
0
 public static ValuesNode Parse(ScssParserContext context)
 {
     var res = new ValuesNode { Value = Expression.Parse(context.Tokens) };
     context.Tokens.SkipWhiteAndComments();
     var preview = context.Tokens.Peek();
     if (preview.Type == TokenType.ExclamationPoint) {
         context.Tokens.Read();
         var important = context.Tokens.Read(TokenType.Literal);
         if (important.StringValue != "important") throw new TokenException("!important expected", important);
         res.Important = true;
     }
     return res;
 }
예제 #2
0
 public static void AreEqual(ValuesNode expected, ValuesNode actual, string message = "")
 {
     AreEqual(expected.Value, actual.Value, message + "/Value");
     Assert.AreEqual(expected.Important, actual.Important, message + "/Important");
 }