Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Temporal: for/if/loop/return nodes stamped with the next statement's line (what is i at N answers for a line that never assigns i)

未关闭
#1,382 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c
领域
compilers

调研方向

Start in the parser and temporal tracing code, then run the existing temporal tests around line-based lookup and trace tape generation. Add coverage for for/if/loop/return nodes, indexed/field/destructuring stores, and the end-of-file stamp; use the Done when checklist and docs/TRACE.md to verify the resulting behavior.

由索引模型根据 Issue 内容生成。

描述

area:observer kind:silent-wrong

Found by the builder on #1377. This predates it and exists on base too.

The parser stamps if/loop/for/return nodes with the line of the token that FOLLOWS them, not their own line. For a for loop variable this is silent-wrong: what is i at 4 returns 2 when line 4 never assigns i.

Related, from the same survey:

  • Every trace tape starts with a spurious L stamp for the line after the end of the file.
  • Stores other than a plain assignment (d[k] is v, d.k is v, destructuring) are stamped differently from plain assignment.
  • A call assignment is recorded under the callee's last line.

The filing rule for multi-line statements is #1381's decision. This issue is about nodes stamped with a line that is not theirs at all.

Done when

  • for/if/loop/return nodes carry their own keyword's line. A temporal test shows what is i at N returns null (or the prior value) for a line that does not assign i.
  • The spurious end-of-file L stamp is gone, or explained in docs/TRACE.md.
  • Indexed, field and destructuring stores are stamped by the same rule as plain assignment. Covered by a test.
主要语言
C
星标
3
派生
7
平均合并
4 小时 1 分钟
30 天内合并 PR
121

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。