Add ->* pointer-to-member operator to BNF grammar - #128
Conversation
|
@copilot 搞错了, 应该和 .* 在同一行。 |
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
|
不要添加测试或者文档, 只需要修改语法定义文件 @copilot |
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Fixed in commit 7488f90. Removed all test additions - only the grammar definition file (Dsp.g4) is modified now.
Fixed in commit 7488f90. The Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for the ->* pointer-to-member operator to the BNF grammar file, addressing issue #127. The change combines the .* and ->* operators on the same grammar line, allowing the parser to recognize both pointer-to-member access operators.
- Added
->*operator to the grammar alongside the existing.*operator - Maintained correct operator precedence (between unary and multiplicative operators)
- Reverted test file additions per PR description
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds the
->*(pointer-to-member dereference) operator to the Dsp grammar, grouped with the.*operator per C++ operator precedence.Changes
Dsp.g4line 20 to group.*and->*operators:term ('.*' | '->*') term # binaryExample
Both
.*and->*operators integrate with existing binary operator handling and maintain correct precedence in complex expressions.Original prompt
->*这个operator #127💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.