Поделиться через


SyntaxFactory.ParseTokens(String, Int32, Int32, CSharpParseOptions) Метод

Определение

Анализ последовательности маркеров языка C#. Так как этот API не создает тот SyntaxNode , который владеет всеми созданными маркерами, GetLocation() API может дать удивительные результаты для созданных маркеров, и его поведение обычно не указано.

[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__699))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__701))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__212))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__220))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__698))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__739))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__762))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__778))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__224))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__228))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__229))]
public static System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> ParseTokens (string text, int offset = 0, int initialTokenPosition = 0, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions? options = default);
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__699))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__701))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__212))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__220))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__698))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__739))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__762))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__778))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__224))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__228))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.CodeAnalysis.CSharp.SyntaxFactory+<ParseTokens>d__229))>]
static member ParseTokens : string * int * int * Microsoft.CodeAnalysis.CSharp.CSharpParseOptions -> seq<Microsoft.CodeAnalysis.SyntaxToken>
Public Shared Iterator Function ParseTokens (text As String, Optional offset As Integer = 0, Optional initialTokenPosition As Integer = 0, Optional options As CSharpParseOptions = Nothing) As IEnumerable(Of SyntaxToken)

Параметры

text
String

Текст всех маркеров.

offset
Int32

Необязательное смещение в текст.

initialTokenPosition
Int32

Целое число, используемое в качестве начальной позиции первого маркера.

options
CSharpParseOptions

Параметры синтаксического анализа.

Возвращаемое значение

Атрибуты

Применяется к