-
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.
semver: chore
- Loading branch information
Showing
7 changed files
with
67 additions
and
20 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
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
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,13 @@ | ||
use crate::parser::ast::Symbol; | ||
use miette::{Report, Result}; | ||
|
||
pub mod typing; | ||
|
||
pub trait Passer { | ||
fn pass(ast: &Symbol<'_>) -> Result<PasserResult>; | ||
} | ||
|
||
pub struct PasserResult { | ||
pub non_critical: Vec<Report>, | ||
pub critical: Vec<Report>, | ||
} |
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,23 @@ | ||
use super::{Passer, PasserResult}; | ||
use crate::parser::ast::Symbol; | ||
use miette::{Result, Severity}; | ||
|
||
pub struct TypingPasser; | ||
|
||
impl Passer for TypingPasser { | ||
fn pass(ast: &Symbol<'_>) -> Result<PasserResult> { | ||
let mut critical = vec![]; | ||
let mut non_critical = vec![]; | ||
|
||
non_critical.push(miette::miette! { | ||
severity = Severity::Warning, | ||
labels = vec![miette::LabeledSpan::at(100, "uwu")], | ||
"Typing is not yet implemented" | ||
}); | ||
|
||
Ok(PasserResult { | ||
critical, | ||
non_critical, | ||
}) | ||
} | ||
} |