bug: namespace_definition and attributes issue
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp, javascript
- 領域
- compilers
調査の方向性
The namespace_definition rule lives in grammar.js, so start there and check where attribute_specifier is already allowed in neighbouring rules. Add optional attribute specifiers before and after the name, regenerate the parser, and confirm both repro snippets in the issue parse without ERROR nodes. Done means a corpus test in test/corpus covering both placements passes with tree-sitter test.
索引モデルが issue の本文から書いたものです。
説明
Did you check existing issues?
- I have read all the tree-sitter docs if it relates to using the parser
- I have searched the existing issues of tree-sitter-cpp
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
0.27.0
Describe the bug
namespace_definition symbol should be completed with optional($.attribute_specifier) before and after name field.
Steps To Reproduce/Bad Parse Tree
try to put legal c++ namespace definition to namespace __attribute__ (( __visibility__ ( default ))) ns {} to standard playground and you will get syntax error. The attribute specifier should be optionally accepted before and after name. This code copy-pasted from linux std include dir.
Expected Behavior/Parse Tree
no error
Repro
namespace __attribute__ (( __visibility__ ( default ))) ns {} // Code that causes a parse error
namespace ns __attribute__ (( __visibility__ ( default ))) {} // Code that causes a parse error too
}
- 主要言語
- JavaScript
- スター
- 463
- フォーク
- 194
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tree-sitter/tree-sitter-cpp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tree-sitter/tree-sitter-cpp#374 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
tree-sitter/tree-sitter-cpp#371 · コメント 1 件 ·
-
`tree_sitter_cpp_external_scanner_deserialize` doesn't bound `length` against the size of the delimiter buffer対応中かも @dekobon が 93 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
tree-sitter/tree-sitter-cpp#368 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
tree-sitter/tree-sitter-cpp#378 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
tree-sitter/tree-sitter-cpp#377 · コメント 1 件 ·
tree-sitter/tree-sitter-cpp の issue をすべて見る
似ている issue
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
serienstream.toオープンN: AdGuard for Windows P2: High T: Annoyance
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
AdguardTeam/AdguardFilters#246310 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
liberation-data/drivine#615 ·
メンテナーはふだん 1 日以内に返信
-
bug dependencies known-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
unreleased dependencies
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
cloudfour/eslint-config#760 ·
メンテナーはふだん 1 日以内に返信