Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Expansion context analyzer

Đang mở
#685 0 bình luận 1 reaction 2 người được giao Xem trên GitHub

@jackfirth đang làm issue này rồi.

Từ ngày 19/12/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

autopilot-candidate enhancement

Whenever a form is being expanded, the result of syntax-local-context has one of five values: 'expression, 'top-level, 'module, 'module-begin, or a value representing a specific definition context. This is useful information to know when inside refactoring rules, as it can affect what sort of transformations might be possible or reasonable. There should be a custom expansion analyzer that labels the expansion context of all forms in the fully expanded syntax. Here's some test cases:

#lang resyntax/test
header: - #lang racket/base

analysis-test: "code in a module is in a module context"
- (+ 1 2 3)
@inspect - (+ 1 2 3)
@property expansion-context
@assert module

analysis-test "function arguments are in an expression context"
- (+ 1 2 3)
@inspect - 2
@property expansion-context
@assert expression

analysis-test "code in a function body is in an internal definition context"
--------------------
(define (f)
  (+ 1 2 3))
--------------------
@inspect - (+ 1 2 3)
@property expansion-context
@assert internal-definition
Ngôn ngữ chính
Racket
Star
70
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jackfirth/resyntax

Tất cả issue của jackfirth/resyntax

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.