MagicStack / MagicStack/MagicPython

Syntax highlighting issue when @ appears as first character after line continuation when indexing is present

未关闭
#253 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
1.4k
派生
98
PR 合并指标
30 天内没有已合并 PR

描述

* **Editor name and version**: VS Code 1.71
* **Platform**: Any
* **Color scheme**: NA
* **MagicPython version**:
* **A sreenshot**:
I would expect syntax highlighting to be the same irrespective of whether the line is broken before or after the @ operator.
![image](https://user-images.githubusercontent.com/38270282/191928430-57478e2a-0077-4ef6-998e-c340ad2537af.png)

* **5-10 lines of surrounding code**:
```python
# Define variables so pylance doesn't complain.
long_variable_name = other_long_variable_name = 1

long_variable_name \
@ other_long_variable_name['some_index']

long_variable_name @ \
other_long_variable_name['some_index']
```

Originally from @tillahoffmann in https://github.com/microsoft/vscode/issues/161435

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在受支持的编辑器中重现报告的 Python 代码片段,比较行延续出现在 @ 之前和之后、且后面跟随索引表达式时的高亮效果。追踪行延续和 @ 表达式的语法高亮语法入口点;完成标准是两种等价形式都获得相同的高亮效果。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, python
领域
tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。