-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: split files in diagnostics module
- Loading branch information
1 parent
fc02d43
commit 0d81d01
Showing
8 changed files
with
466 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Crate sdlm_error | ||
|
||
Rust Library containing the error and diagnostic types for the Simple Domain Modeling Language (SDML). | ||
|
||
[![crates.io](https://img.shields.io/crates/v/sdml_generate.svg)](https://crates.io/crates/sdml_generate) | ||
[![docs.rs](https://docs.rs/sdml_generate/badge.svg)](https://docs.rs/sdml_generate) | ||
|
||
This package is part of the Rust SDML project and specifically defines the error and diagnostic types for the project. | ||
The project's intent is to provide an idiomatic implementation of the in-memory model, parser, generators, and the CLI tool. | ||
|
||
The following figure demonstrates this package in the broader project context. | ||
|
||
``` | ||
╭───────╮ | ||
│ CLI │ | ||
╔══ │ crate │ ══╗ | ||
║ ╰───────╯ ║ | ||
┌╌╌╌╌╌╌╌╌┐ V V | ||
┆ ┆ ╭──────────╮ ╭──────────╮ Formatted Source | ||
┆ source ┆ ══> │ parse │ ══> │ generate │ ══> RDF Representation | ||
┆ file ┆ ╭──│ crate │───────│ crate │──╮ Documentation | ||
┆ ┆ │ ╰──────────╯ ╰──────────╯ │ Diagrams | ||
└╌╌╌╌╌╌╌╌┘ │ core crate │──╮ | ||
╰───────────────────────────────────╯ │ | ||
┌───────┐ ⋀ error crate │ | ||
│ other │ ║ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌─────────────╯ | ||
│ tools │ ═══════════╝ | ||
└───────┘ | ||
``` | ||
|
||
## Changes | ||
|
||
**Version 0.1.0** | ||
|
||
Initial Release. | ||
|
||
- Error Handling: | ||
- Copy `error` module from `sdml_core`, rename as `errors`. | ||
- Remove diagnostics from the existing `Error` type. | ||
- Diagnostics: | ||
- Copy `diagnostics` module. | ||
- Create new `diagnostics::codes` module and `ErrorCode` enum. | ||
- Create new `diagnostics::functions` module and functions for each `ErrorCode`. | ||
- Diagnostic Reporting: | ||
- Create new `diagnostics::reporter` module. | ||
- Create new `Reporter` trait. | ||
- Create a `StandardStreamReporter` to emit colored and structured errors to the console. | ||
- Create a `BailoutReporter` that will turn the first diagnostic it is given into an error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.