Skip to content

fix(parser): ?? + && mixing detection + docs update#167

Merged
ohah merged 3 commits intomainfrom
feature/semantic-misc-errors
Mar 20, 2026
Merged

fix(parser): ?? + && mixing detection + docs update#167
ohah merged 3 commits intomainfrom
feature/semantic-misc-errors

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Mar 20, 2026

Summary

  • ?? 오른쪽 피연산자에서 괄호 없는 &&/|| 혼용 검출 수정
    • 기존: 같은 재귀 프레임에서만 감지 → 0 ?? 0 && true 미감지
    • 수정: right가 logical_expression이면 operator 확인 후 에러 보고
  • CLAUDE.md: semantic analysis 진행 상황 업데이트

Test262 결과

  • Before: 98.0% (22,913 / 23,384) — 471건 실패
  • After: 98.0% (22,914 / 23,384) — 470건 실패 (+1건)

전체 Semantic Early Error Checker 성과 (PR #163-167)

  • 시작: 97.7% (22,856 / 23,384) — 528건 실패
  • 완료: 98.0% (22,914 / 23,384) — 470건 실패 (+58건)

Test plan

  • zig build test — 유닛 테스트 통과
  • zig fmt --check src/ — 포맷팅 통과
  • zig build test262-run — 통과율 확인 (98.0%)

🤖 Generated with Claude Code

ohah and others added 2 commits March 20, 2026 14:55
The existing check only caught ?? and &&/|| in the same recursive
frame. When && had higher precedence and was parsed as the right
operand of ??, the mix was undetected.

Now checks if the right-hand side of ?? is a logical_expression
with && or || operator, reporting the error.

Example: 0 ?? 0 && true  → SyntaxError (ECMAScript)

Test262: 471 → 470 failures (98.0%, +1 test)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update semantic analysis checklist to reflect completed work:
- PR #163-167: visitor coverage, checker.zig, strict octal,
  duplicate params, ?? mixing

Test262: 528 → 470 failures (97.7% → 98.0%)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah added the enhancement New feature or request label Mar 20, 2026
@ohah ohah self-assigned this Mar 20, 2026
@ohah ohah added the enhancement New feature or request label Mar 20, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah merged commit 160a53c into main Mar 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant