16 releases
Uses new Rust 2024
new 0.2.7 | Jul 9, 2025 |
---|---|
0.2.6 | Jul 8, 2025 |
0.1.16 | Apr 7, 2025 |
0.1.13 | Mar 30, 2025 |
0.0.14 | Apr 1, 2025 |
#291 in Value formatting
945 downloads per month
Used in 8 crates
(2 directly)
260KB
6K
SLoC
Swamp Error Reporter
Provides user-friendly formatting and display for errors generated during the compilation of Swamp programming language code.
Overview
This crate takes structured error information, primarily from the swamp-analyzer
crate, and transforms it into human-readable diagnostic messages. It leverages swamp-source-map
to pinpoint the error location within the original source code and uses the eira
library to build and format the final report, often including the relevant source line and highlighting.
Key Features
- Formats Compiler Errors: Translates
swamp_analyzer::Error
(and potentially other error types) into structured reports. - Source Code Context: Uses
swamp_source_map::SourceMap
to fetch and display the source code line where the error occurred. - Location Highlighting: Points out the specific span within the source line related to the error.
- User-Friendly Output: Aims to present compiler errors clearly to the developer.
Installation
This crate is typically used by the main Swamp compiler executable or related tooling.
[dependencies]
swamp-error-report = "0.2.7"
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright
Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/swamp
Dependencies
~3–15MB
~131K SLoC