mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 05:11:09 +00:00
feat: introduce bidirectional type checking
This commit is contained in:
parent
5f8d744e47
commit
75b5b68831
13 changed files with 501 additions and 135 deletions
|
@ -1022,6 +1022,12 @@ impl Locational for () {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Locational, const N: usize> Locational for [T; N] {
|
||||
fn loc(&self) -> Location {
|
||||
Location::stream(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! impl_locational_for_enum {
|
||||
($Enum: ident; $($Variant: ident $(,)?)*) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue