Skip to content

Commit

Permalink
feat(rust-sema): Allow obtaining size and alignment of types
Browse files Browse the repository at this point in the history
  • Loading branch information
chorman0773 committed Aug 2, 2023
1 parent 0850ea3 commit 8c83637
Show file tree
Hide file tree
Showing 5 changed files with 483 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl XLangFrontend for RustFrontend {
}

fn read_source(&mut self, file: DynMut<dyn Read>) -> io::Result<()> {
let props = self.props.unwrap();
let mut file = file.into_chars();
let filename = self
.filename
Expand All @@ -84,7 +85,7 @@ impl XLangFrontend for RustFrontend {
let mut lexed = lex(&mut file, &*filename).unwrap();
filter_comments(&mut lexed);
let parsed = do_mod(&mut lexed.into_iter().peekmore()).unwrap();
let mut defs = Definitions::new();
let mut defs = Definitions::new(props);
convert_crate(&mut defs, &parsed, CrateType::Bin).unwrap();

eprintln!("{}", defs);
Expand Down
Loading

0 comments on commit 8c83637

Please sign in to comment.