MagicPython
MagicPython copied to clipboard
Grammar could support the walrus operator
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:

- 5-10 lines of surrounding code:
if m := x