-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some setup for working on labels that do not lie within the code segm…
…ent.
- Loading branch information
1 parent
ca23d53
commit 87982cf
Showing
5 changed files
with
21 additions
and
5 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,16 @@ | ||
#[derive(Debug, Eq, PartialEq)] | ||
pub enum LabelType { | ||
Code, | ||
Data, | ||
Global, | ||
} | ||
|
||
#[derive(Debug, Eq, PartialEq)] | ||
pub struct LabelEntry { | ||
/// The [`LabelType`] of the label. | ||
pub label_type: LabelType, | ||
/// The name of the label. | ||
pub label_name: String, | ||
/// The position of the destination. This may be relative to the block or absolute, depending on the label type. | ||
pub position: usize, | ||
} |
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 @@ | ||
pub mod compiler; | ||
pub mod decompiler; | ||
pub mod executable; | ||
mod labels; |
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,3 @@ | ||
pub mod asm_parser; | ||
mod data_declaration; | ||
pub mod data_declaration; | ||
mod type_hints; |
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