Parser does not detect invalid cast expressions
还没有人认领这个 Issue。
评估
调研方向
该 issue 没有指明文件或测试;首先重现 PHP 示例,并定位 cast 表达式的 parser 入口点。添加一个覆盖括号之间注释的回归测试,并确认 parser 报告意外的变量,而不是创建 CastExpression。
由索引模型根据 Issue 内容生成。
描述
Cast expressions may not contain anything except spaces and tabs between the parentheses.
In the following example, the parser generates a CastExpression while PHP sees it as a constant named 'int' followed by a variable.
Example:
<?php (/* hello */int)$a;
Actual result:
No error.
Expected result:
syntax error, unexpected $a (T_VARIABLE)
- 主要语言
- PHP
- 星标
- 895
- 派生
- 85
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/tolerant-php-parser 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
microsoft/tolerant-php-parser#423 ·
-
难度 4/5 3-5 天 新手友好度 35/100
microsoft/tolerant-php-parser#420 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
microsoft/tolerant-php-parser#417 ·
-
难度 2/5 1-3 小时 新手友好度 50/100
microsoft/tolerant-php-parser#413 ·
-
难度 3/5 1-2 天 新手友好度 35/100
microsoft/tolerant-php-parser#407 · 2 条评论 ·
查看 microsoft/tolerant-php-parser 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
PHP-CS-Fixer/PHP-CS-Fixer#9899 ·
维护者通常 1 天内回复
-
needs-triage Platform(Default)
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[Sync EN] Document Error thrown by shm_* functions on a detached segment (#5975)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭sync-en
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
Перевод устарел
难度 2/5 1-3 小时 新手友好度 72/100