Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Expansion context analyzer

Aperta
#685 0 commenti 1 reazione 2 assegnatari Vedi su GitHub

@jackfirth ci sta già lavorando.

Dal 19/12/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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
Lingua principale
Racket
Stelle
70
Fork
11
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jackfirth/resyntax

Tutte le issue di jackfirth/resyntax

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.