Skip to content

Commit 8deaa8f

Browse files
committed
Clarify deparser idea
1 parent 4316bfa commit 8deaa8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

AST_TRANSLATION.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,7 @@ Sequential upgrades favor simplicity and reuse. The majority of changes between
6868
4. Optionally develop a proof-of-concept reparse approach for comparison, but keep the functional pipeline as the core strategy.
6969

7070
By building translation functions per version we keep the code maintainable and make it easy to add support for future releases.
71+
72+
## Should we implement a deparser?
73+
74+
The nested deparser approach would walk the old AST, generate SQL, and parse it with the newer parser. This mirrors the visitor pattern and can adapt automatically to certain changes, but it adds overhead and may drop information that doesn't round-trip cleanly. Maintaining explicit transform functions keeps upgrades deterministic and easy to test. A deparser prototype might help with tricky cases, yet the primary strategy should be these per-version transform functions.

0 commit comments

Comments
 (0)