apache / apache/cordova-node-xcode
Allow asterisks in comments
- 主要言語
- JavaScript
- スター
- 217
- フォーク
- 102
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 6
説明
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' }
```
コントリビューションガイド
調査の方向性
/* コメントを処理する parser のエントリポイントを特定し、`/* Upload *.dSYM to Firebase */` で失敗を再現します。コメント本体がどのようにスキャンされるかを追跡し、そのうえで内部のアスタリスクが受け入れられる一方、閉じる */ によって SyntaxError なしでコメントが引き続き終了することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, nodejs
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100