Compartir a través de


SyntaxFactory.ParseTokens(String, Int32, Int32, CSharpParseOptions) Método

Definición

Analizar una secuencia de tokens de lenguaje C#. Dado que esta API no crea un SyntaxNode que posee todos los tokens generados, la GetLocation() API puede producir resultados sorprendentes para los tokens generados y su comportamiento generalmente no se especifica.

[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)

Parámetros

text
String

Texto de todos los tokens.

offset
Int32

Desplazamiento opcional en texto.

initialTokenPosition
Int32

Entero que se va a usar como posición inicial del primer token.

options
CSharpParseOptions

Opciones de análisis.

Devoluciones

Atributos

Se aplica a