-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LSP crash when editing. Future proof a little
- Loading branch information
Showing
9 changed files
with
96 additions
and
14 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,32 @@ | ||
use crate::errors::ErrorCollector; | ||
|
||
use super::{LinkInfo, ResolvedGlobals}; | ||
|
||
#[derive(Debug,Clone,Copy)] | ||
pub struct ErrorCheckpoint(pub usize, pub bool); | ||
|
||
#[derive(Debug,Clone,Copy)] | ||
pub struct ResolvedGlobalsCheckpoint(pub usize, pub bool); | ||
|
||
|
||
#[derive(Debug,Clone,Copy)] | ||
pub struct CheckPoint { | ||
errors_cp : ErrorCheckpoint, | ||
resolved_globals_cp : ResolvedGlobalsCheckpoint | ||
} | ||
|
||
impl CheckPoint { | ||
pub fn checkpoint(errors : &ErrorCollector, resolved_globals : &ResolvedGlobals) -> CheckPoint { | ||
CheckPoint { | ||
errors_cp : errors.checkpoint(), | ||
resolved_globals_cp : resolved_globals.checkpoint() | ||
} | ||
} | ||
} | ||
|
||
impl LinkInfo { | ||
pub fn reset_to(&mut self, cp : CheckPoint) { | ||
self.errors.reset_to(cp.errors_cp); | ||
self.resolved_globals.reset_to(cp.resolved_globals_cp); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
module named_ports : int in_port -> int out_port, int out_port_two { | ||
out_port = in_port | ||
out_port_two = in_port | ||
|