apache / apache/cordova-node-xcode
Allow asterisks in comments
- Ngôn ngữ chính
- JavaScript
- Star
- 217
- Fork
- 102
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 6
Mô tả
Once the parser passes a `/*` token, it proceeds to search for a `*/` token, throwing a SyntaxError as soon as it encounter an asterisk not immediately followed by a slash. Comments can contain asterisks though. Many of these comments in project files are autogenerated, for example based on a file name which could have an asterisk in it.
Could the parser ignore `*` characters between `/*` and `*/`, continuing its search without issue until it finds the closing `*/`?
To reproduce the below, call the parser on any (file containing a) line such as `/* Upload *.dSYM to Firebase */`:
```
Thrown:
{ [SyntaxError: Expected "*/" or [^*] but "*" found.
]
message: 'Expected "*/" or [^*] but "*" found.',
expected:
[ { type: 'class',
parts: [Array],
inverted: true,
ignoreCase: false },
{ type: 'literal', text: '*/', ignoreCase: false },
{ type: 'class',
parts: [Array],
inverted: true,
ignoreCase: false },
{ type: 'literal', text: '*/', ignoreCase: false } ],
found: '*',
location:
{ start: { offset: 697, line: 13, column: 35 },
end: { offset: 698, line: 13, column: 36 } },
name: 'SyntaxError' }
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Xác định điểm vào của parser xử lý các comment /* và tái hiện lỗi với `/* Upload *.dSYM to Firebase */`. Theo dõi cách phần nội dung của comment được quét, sau đó xác minh rằng một dấu hoa thị bên trong được chấp nhận, trong khi */ đóng vẫn kết thúc comment mà không có SyntaxError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, nodejs
- 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
- 45/100