Negative literals are borked
オープン
初心者向け
- 主要言語
- Rust
- スター
- 21
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
`print -5;` says:
```
LHS missing for `-` at 0:6
Expected expression, found: `)` at 0:8
Parsing failed, see errors above.
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
The issue is in the parser's handling of unary minus. Look at the parser module, likely in src/parser.rs, for the expression parsing logic. The error messages indicate it expects a left-hand side for the '-' operator. Check how the parser distinguishes between binary subtraction and unary negation. Run the existing tests to see if there are any for negative literals, and add a test case for `print -5;` to verify the fix.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 70/100