scoping of operators is limited immediately following variable name

Abierto
#140 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
powershell
Área
tooling

Línea de trabajo

No file or test is named. Reproduce the scoping behavior with the PowerShell samples in a TextMate-compatible editor, then locate the syntax grammar rules for operators following variables. Done means valid operators such as -split receive the expected operator scope immediately after both $variable and ${variable}.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

  • Editor and Version: VS Code: 1.26.1
  • Your primary theme: Monokai Dimmed
Issue Description

Operators scoped immediately after a variable, without whitespace, are limited to just arithmetic "[+%*/-]?=|[+/*%-] and 'other' &|(?<!\w)\.(?= )|`|,|\|, but all operators are valid (from what I can tell). This happens due to all the other operators requiring a negative look behind of a word character. The ${} variable reference correctly scopes the immediate following of the operators, because the } doesn't match the \w.

BTW, is that valid regex in the 'other' to have (?= ) or should it have been (?=\s) ??

Expected Behavior

All operators should be valid after a variable has scoped, from what I can determine.

I'm not sure this will be fixed easily due to the limited possibilities of TextMate.

Code Samples
$variable-split "3" #but this is valid operator function
${variable}-split "3" #but this is valid operator function
Lenguaje dominante
PowerShell
Estrellas
151
Forks
55
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/EditorSyntax

Todos los issues de PowerShell/EditorSyntax

Issues similares

Más issues de DevTools

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.