public void GetArtifacts(ITextProvider text, ArtifactCollection artifactCollection) { var reader = new TextProviderReader(text); var tokenizer = new TemplateTokenizer(reader); foreach (var token in tokenizer.GetTokens()) { if (token.Kind != TemplateTokenKind.Text) { var range = TextRange.FromBounds(token.Start, token.End + 1); var artifact = TemplateArtifact.Create(token.Kind, range, token.IsClosed); artifactCollection.Add(artifact); } } }
public void GetArtifacts(ITextProvider text, ArtifactCollection artifactCollection) { var reader = new TextProviderReader(text); var tokenizer = new TemplateTokenizer(reader); foreach (var token in tokenizer.GetTokens()) { if (token.Kind != TemplateTokenKind.Text) { var range = TextRange.FromBounds(token.Start, token.End + 1); var artifact = TemplateArtifact.Create(token.Kind, range, token.IsClosed); artifactCollection.Add(artifact); } } }