Compare commits
	
		
			3 Commits
		
	
	
		
			36955295bc
			...
			1d3a1593ee
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 1d3a1593ee | ||
|   | 3906374866 | ||
|   | 5c75b7ab82 | 
							
								
								
									
										1
									
								
								dm_std_lib/std/core/core.dm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								dm_std_lib/std/core/core.dm
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| decl pub ns core | ||||
| @ -1,4 +0,0 @@ | ||||
| ns | ||||
|   name: core | ||||
|   patch: false | ||||
|   vis: pub | ||||
| @ -1,4 +1,3 @@ | ||||
| use deimos::ast::build_ast; | ||||
| use deimos::vm::dm_type::DmType; | ||||
| use deimos::vm::lib::{DmConstant, DmLib}; | ||||
| use deimos::vm::object_type::{DmField, DmFn, DmImplementation, DmInterface, DmMethod}; | ||||
|  | ||||
| @ -1,8 +1,7 @@ | ||||
| use crate::ast::CompilationUnit; | ||||
| use crate::parser::{DeimosParser, Rule}; | ||||
| use crate::vm::lib::DmLib; | ||||
| use pest::Parser; | ||||
| use crate::module::DmModule; | ||||
| 
 | ||||
| pub fn compile(src_unit: &str) -> DmLib { | ||||
|     let p = DeimosParser::parse(Rule::compilation_unit, src_unit).unwrap(); | ||||
| pub fn compile(module: &mut DmModule, compilation_unit: CompilationUnit) { | ||||
|     todo!() | ||||
| } | ||||
|  | ||||
| @ -4,3 +4,4 @@ pub mod parser; | ||||
| mod util; | ||||
| pub mod vm; | ||||
| pub mod ast; | ||||
| pub mod module; | ||||
|  | ||||
							
								
								
									
										17
									
								
								src/module/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								src/module/mod.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| pub struct DmModule { | ||||
|     pub namespace: DmNamespace, | ||||
| } | ||||
| 
 | ||||
| pub enum NamespaceVisibility { | ||||
|     Public, | ||||
|     Partial { | ||||
|         visible_to_fqns: Vec<String> | ||||
|     }, | ||||
|     Private | ||||
| } | ||||
| 
 | ||||
| pub struct DmNamespace { | ||||
|     pub name: String, | ||||
|     pub dependencies: Vec<String>, | ||||
|     pub visibility: NamespaceVisibility | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user