EditorSyntax icon indicating copy to clipboard operation
EditorSyntax copied to clipboard

scoping of operators is limited immediately following variable name

Open msftrncs opened this issue 7 years ago • 0 comments

  • 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

msftrncs avatar Aug 23 '18 20:08 msftrncs