Skip to content

Commit

Permalink
Split off parsing into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum committed May 12, 2024
1 parent 900d891 commit f7539b0
Show file tree
Hide file tree
Showing 7 changed files with 842 additions and 834 deletions.
2 changes: 1 addition & 1 deletion src/compiler_top.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::rc::Rc;
use tree_sitter::Parser;

use crate::{
debug::SpanDebugger, errors::ErrorStore, file_position::FileText, flattening::{flatten_all_modules, initialization::gather_initial_file_data, typechecking::typecheck_all_modules, Module}, instantiation::InstantiatedModule, linker::{FileData, FileUUID, Linker, ModuleUUID}
debug::SpanDebugger, errors::ErrorStore, file_position::FileText, flattening::{flatten_all_modules, gather_initial_file_data, typecheck_all_modules, Module}, instantiation::InstantiatedModule, linker::{FileData, FileUUID, Linker, ModuleUUID}
};

pub fn add_file(text : String, linker : &mut Linker) -> FileUUID {
Expand Down
17 changes: 2 additions & 15 deletions src/flattening/initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,10 @@ use sus_proc_macro::{field, kind};


use crate::{
arena_alloc::{FlatAlloc, UUIDMarker, UUIDRange, UUID}, errors::ErrorCollector, file_position::{FileText, Span}, flattening::Module, instantiation::InstantiationList, linker::{checkpoint::CheckPoint, FileBuilder, LinkInfo, ResolvedGlobals}, parser::Cursor
arena_alloc::{FlatAlloc, UUID}, errors::ErrorCollector, file_position::{FileText, Span}, flattening::Module, instantiation::InstantiationList, linker::{checkpoint::CheckPoint, FileBuilder, LinkInfo, ResolvedGlobals}, parser::Cursor
};

use super::{FlatID, IdentifierType};



pub struct PortIDMarker;
impl UUIDMarker for PortIDMarker {const DISPLAY_NAME : &'static str = "port_";}
pub type PortID = UUID<PortIDMarker>;

pub type PortIDRange = UUIDRange<PortIDMarker>;

pub struct InterfaceIDMarker;
impl UUIDMarker for InterfaceIDMarker {const DISPLAY_NAME : &'static str = "port_";}
pub type InterfaceID = UUID<InterfaceIDMarker>;

use super::*;

#[derive(Debug)]
pub struct Port {
Expand Down
Loading

0 comments on commit f7539b0

Please sign in to comment.