Expansion context analyzer
@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ả
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jackfirth/resyntax
-
Grimoire docs need examples Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
documentation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
-
testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100