void FillFunctions(List <CssDocumentFunction> functions, ref CssToken token) { do { CreateNewNode(); var function = token.ToDocumentFunction(); if (function == null) { break; } token = NextToken(); CollectTrivia(ref token); functions.Add(CloseNode(function)); if (token.Type != CssTokenType.Comma) { break; } token = NextToken(); CollectTrivia(ref token); }while (token.Type == CssTokenType.Eof); }
/// <summary> /// Called when the document functions have to been found. /// </summary> public List <IDocumentFunction> CreateFunctions(ref CssToken token) { var list = new List <IDocumentFunction>(); do { var function = token.ToDocumentFunction(); if (function == null) { break; } list.Add(function); token = _tokenizer.Get(); }while (token.Type == CssTokenType.Comma); return(list); }
void FillFunctions(Action <DocumentFunction> add, ref CssToken token) { do { var function = token.ToDocumentFunction(); if (function == null) { break; } token = NextToken(); CollectTrivia(ref token); add(function); if (token.Type != CssTokenType.Comma) { break; } token = NextToken(); CollectTrivia(ref token); }while (token.Type != CssTokenType.EndOfFile); }