MagicPython icon indicating copy to clipboard operation
MagicPython copied to clipboard

Grammar could support the walrus operator

Open alexr00 opened this issue 5 years ago • 0 comments
trafficstars

From @BornForFever in https://github.com/microsoft/vscode/issues/94999

The walrus operator :=(an operator to allow you to make assignments in an expression, see PEP 572) is highlighted as 2 different colors. And I tried inspecting tokens and scopes, and found that : and = were treated as 2 tokens.

  • Editor name and version: VS Code 1.44
  • Platform: any
  • Color scheme: Well illustrated with Atom One Darker
  • MagicPython version: commit 0b09c1fca238d22e15ac5712d03f9bf6da626f9c
  • A sreenshot: 批注 2020-04-11 222317 批注 2020-04-11 222406
  • 5-10 lines of surrounding code:
if m := x 

alexr00 avatar Apr 14 '20 09:04 alexr00