Expansion context analyzer
@jackfirth ya está trabajando en esto.
Desde el 19/12/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- Racket
- Estrellas
- 70
- Forks
- 11
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de jackfirth/resyntax
-
Grimoire docs need examples Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
documentation
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
testing
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
testing
Dificultad 3/5 1-2 días Aptitud para principiantes 75/100
-
testing
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100