internal TokenItem AddCurrentAndAdvance(TokenStream tokens, IClassifierContext context) { TokenItem item = new TokenItem(tokens.AdvanceToken(), context); Add(item); return(item); }
public void GetClassificationNameTest() { // For every single classifier context, make sure that the name returned by // IClassifierContext.GetClassificationName is correct. int length = (int)CssClassifierContextType.CssClassifierContextTypeCount; for (int i = 0; i < length; i++) { CssClassifierContextType contextType = (CssClassifierContextType)i; IClassifierContext context = CssClassifierContextCache.FromTypeEnum(contextType); // Make sure I got the right thing from the cache Assert.IsNotNull(context); Assert.AreEqual((int)contextType, context.ContextValue); Assert.IsTrue(context.ClassificationName == "Default" || context.ClassificationName == "Css" + contextType.ToString()); } }
internal TokenItem(CssToken token, IClassifierContext context) { Token = token; Context = context; }