dotnet / dotnet/csharp-tmLanguage
Syntax highlighting breaks when opening bracket of a method is placed in a new line
- Lenguaje dominante
- TypeScript
- Estrellas
- 78
- Forks
- 43
- Merge medio
- 34 min
- PR fusionados (30 d)
- 1
Descripción
_From @zeroskyx on May 17, 2017 18:46_
The following code placed in a class breaks syntax highlighting:
public void Routine
(
IInterface Interface0,
IInterface Interface1,
IInterface Interface2
)
{
string One = "";
string Two = "";
string Three = "";
}
interface IInterface
{
}
Beginning with the second instance of IInterface and after the method body, everything is white -- in more complex projects, somewhere it works again later in the file.
Screenshot:

Removing the newline after public void Routine does not cause the issue:

I am aware that this appears to be a "strange" coding style; it makes reading constructors with loads of dependency injections much cleaner though (issue happens with both methods and constructors).
_Copied from original issue: OmniSharp/omnisharp-vscode#1489_
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza reproduciendo el fallo de resaltado informado con el ejemplo de C#, comparándolo con la versión en la que el paréntesis de apertura permanece en la línea de declaración. Después, inspecciona cómo la gramática de sintaxis gestiona las declaraciones de métodos y constructores a través de ese salto de línea; el trabajo estará terminado cuando los parámetros restantes, el cuerpo del método y la interfaz siguiente se resalten correctamente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100