Skip to content

feat(parser): support decorators on class expressions#183

Merged
ohah merged 2 commits intomainfrom
feature/decorator-class-expression
Mar 20, 2026
Merged

feat(parser): support decorators on class expressions#183
ohah merged 2 commits intomainfrom
feature/decorator-class-expression

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Mar 20, 2026

Summary

  • expression 위치에서 @decorator class {} 파싱 지원
  • parsePrimaryExpression에서 @ 토큰 처리 추가
  • 기존 parseClassWithDecorators 재사용

Test plan

  • zig build test 통과
  • zig fmt --check src/ 통과
  • Test262 decorator 8건 통과 확인

🤖 Generated with Claude Code

Handle decorators on class expressions in expression position.
Previously, `@decorator class {}` only worked as a statement but
failed when used as an expression (e.g., `var C = @foo class {}`).
Add `.at` handling in parsePrimaryExpression to collect decorators
and parse decorated class expressions. Fixes 8 Test262 failures.

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
…pression

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah merged commit a55e590 into main Mar 20, 2026
9 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