microsoft / microsoft/TypeScript-TmLanguage
Javascript highlighting fails when less than symbol ("<") is first char and followed by greater than (">")
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 471
- Fork
- 149
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
TS and JS Grammar Extension version: clicking previous link (in chrome 91.0.4472.114 on macos 10.13.6) gives 404 but searching vscode 1.59.1 extensions for @builtin typescript shows vscode.typescript-language-features 1.0.0 and vscode.typescript 1.0.0. Installing ms-vscode.vscode-typescript-next 4.5.20210902, found in this repo's readme, made no difference.
Code
vscode language mode: JavaScript
const x = 1;
0
< x
&& 1 > 0 // incorrect syntax highlight color coding

The issue seems to be that < x … > is interpreted as some type specification (like in array<int>)?
Compare with following where the last x is replaced with 1.
const x = 1;
0
< 1
&& 1 > 0 // correct syntax highlight color coding

I found #752 but decided to open a new issue.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Start with the JavaScript grammar behavior for the reproduced < x and && 1 > 0 expression, then compare it with the numeric variant in the issue. Review the related #752 issue and the grammar files in this repository to identify the relevant rule. Done means both examples receive correct JavaScript syntax highlighting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100