| Crates.io | swamp-pretty-print |
| lib.rs | swamp-pretty-print |
| version | 0.2.26 |
| created_at | 2025-03-29 17:06:56.452234+00 |
| updated_at | 2025-08-18 11:25:51.314319+00 |
| description | Pretty-prints Swamp compiler internal representations (Semantic Graph nodes, Types, Symbol Tables) into human-readable, colorized strings for debugging. |
| homepage | |
| repository | https://github.com/swamp/swamp |
| max_upload_size | |
| id | 1611464 |
| size | 50,897 |
Provides functions to format and display internal data structures from the Swamp programming language compiler in a human-readable, colorized way.
This crate is a debugging and inspection tool for developers working on the Swamp compiler. It takes complex internal representations like the Abstract Semantic Graph (swamp_semantic::Expression), type structures (swamp_types::Type), symbol tables (swamp_modules::SymbolTable), etc., and formats them into indented, color-coded strings.
It utilizes swamp-source-map-lookup to include source text snippets and yansi for terminal colorization.
Expression, Type, SymbolTable, Modules, AssociatedImpls, and more.SourceMapLookup to display identifiers based on their source text.SourceMapDisplay: A wrapper around a SourceMapLookup implementation that provides the core formatting methods.SymbolTableDisplay, ExpressionDisplay, etc.: Wrapper structs that implement std::fmt::Display by using SourceMapDisplay to format the contained compiler structure.This crate is primarily intended for use within the Swamp compiler or related debugging tools.
[dependencies]
swamp-pretty-print = "0.2.26"