SyntaxFactory.CreateTokenParser(SourceText, CSharpParseOptions) Method

Definition

Creates a token parser that can be used to parse tokens from a given source text.

public static Microsoft.CodeAnalysis.CSharp.SyntaxTokenParser CreateTokenParser (Microsoft.CodeAnalysis.Text.SourceText sourceText, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
static member CreateTokenParser : Microsoft.CodeAnalysis.Text.SourceText * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> Microsoft.CodeAnalysis.CSharp.SyntaxTokenParser
Public Shared Function CreateTokenParser (sourceText As SourceText, Optional options As CSharpParseOptions = Nothing) As SyntaxTokenParser

Parameters

sourceText
SourceText

The source to parse tokens from.

options
CSharpParseOptions

Parse options for the source.

Returns

Applies to