public async Task <List <SourceSet> > GetCatalog(List <string> urls, bool includeComments = false) { var result = new List <SourceSet>(); foreach (var url in urls) { var source = await Web.Get(url); var js = new JSDocParser(); js.LoadText(source); var parsed = js.Parse(includeComments: includeComments); var set = new SourceSet() { Source = new Source { Url = url, Parsed = parsed, Id = url.GetHashCode().ToString() }, Code = source }; result.Add(set); } return(result); }
public void Init() { js = new JSDocParser(); }