2 Repos
Modifications made specifically to concrete syntax trees to preserve exact source fidelity during code rewriting.
Distinct from Syntax Tree Transformers: Distinct from general Syntax Tree Transformers by focusing on the preservation of exact source syntax (concrete trees) rather than simplified abstract structures.
Explore 2 awesome GitHub repositories matching software engineering & architecture · Concrete Syntax Tree Transformations. Refine with filters or upvote what's useful.
YAPF ist ein Python-Code-Formatierer und Tool zur Einhaltung von Stilvorgaben. Es arbeitet als AST-basierter Reformattierer, der konkrete Syntaxbäume verwendet, um strukturelle Konsistenz und eine einheitliche visuelle Darstellung über Quelldateien hinweg sicherzustellen. Die Engine nutzt einen strafbasierten Layout-Optimierer, um die besten Zeilenumbrüche durch die Berechnung numerischer Kosten für verschiedene Formatierungsentscheidungen zu bestimmen. Sie verwendet einen Multiprozess-Code-Prozessor, um die Formatierung mehrerer Dateien auf mehrere CPU-Kerne zu verteilen. Das Tool deckt die Neuformatierung von Quellcode durch In-Place-Dateimodifikationen, Differenzanalysen und die Verarbeitung partieller Codefragmente ab. Es enthält ein regelbasiertes Konfigurationssystem zur Verwaltung von Stil-Presets, Layout-Regeln und Projekteinstellungen. Integrationsfähigkeiten umfassen die Überprüfung der Stileinhaltung für Continuous-Integration-Pipelines, Git-Hook-Automatisierung und editorbasierte Format-on-Save-Funktionalität.
Reconstructs source code by modifying concrete syntax tree representations while preserving the original structural integrity.
pyupgrade is a static code modernizer and syntax upgrader for Python. It automatically rewrites source code to implement modern language features and syntax based on a specified target version. The tool focuses on removing technical debt by deleting deprecated imports, compatibility shims, and obsolete version-specific conditional blocks. It also refactors type annotations to use current standards, such as simplified generic aliases and union operators. Its capability surface includes updating standard library usage, optimizing built-in function calls, and converting verbose collection const
Implements transformations on concrete syntax trees to ensure that original source formatting and comments are preserved during rewriting.