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

☂️ hrw4u: split visitor.py into three passes (AST → sema → emitter)

Aperta
#13,680 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@masaori335 ci sta già lavorando.

Dal 15/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

hrw4u

tools/hrw4u/src/visitor.py — 1,208 LoC, 20 visit* methods — does all of this in one pass:

  • resolves symbols
  • checks hook validity and arguments
  • applies sandbox policy
  • allocates variable slots
  • expands procedures by splicing source text
  • and renders .conf

I'd break it into three: an AST, a semantic-analysis pass (sema), and a .conf emitter. It is a refactor — no C++ changes, no grammar changes, no .conf output changes.

Image

What the split buys

Today After
Where a new check lives a visit* method inside a 1,208-line file whose other job is text rendering a function over the resolved tree
When a check can run only while .conf is being produced whenever the tree exists
What the language server runs the whole compiler, .conf emission included, on every keystroke — and reads visitor._proc_registry, a private field sema, and stops there
Diagnostics built from CST contexts inside the emitter built from AST spans in sema — one wording for CLI and editor
The typed AST from #13126 test-only and lossy; nothing consumes it the production tree
.conf emission the tail of the compiler one consumer of the tree

What it makes possible later

Because .conf emission becomes a consumer of the resolved tree rather than the compiler's tail,
another consumer can attach at the same point without touching the first — and any check added to
sema lands for both. That is the reason no .conf text appears in any sema_nodes node: the fork
point has to be format-neutral or it is not a fork point.

Tracking

  • #13126
  • #13699
  • #13665
  • semantic-analysis & hrw(.conf) emitter
  • switch to new path

Related but independent

  • #13656
Lingua principale
C++
Stelle
2k
Fork
878
Merge medio
3g 16h
PR unite (30g)
91

Preparare l'ambiente

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 apache/trafficserver

Tutte le issue di apache/trafficserver

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.