TypeScript_Rust_Compiler/
lib.rs1pub mod ast;
8pub mod compiler;
9pub mod error;
10pub mod generator;
11pub mod lexer;
12pub mod lexer_utf8;
13pub mod parser;
14pub mod semantic;
15pub mod test_lexer;
16pub mod types;
17
18use error::Result;
19
20pub struct Compiler {
22 optimize: bool,
23 runtime: bool,
24}
25
26impl Compiler {
27 pub fn new() -> Self {
29 Self {
30 optimize: false,
31 runtime: false,
32 }
33 }
34
35 pub fn with_optimization(mut self, optimize: bool) -> Self {
37 self.optimize = optimize;
38 self
39 }
40
41 pub fn with_runtime(mut self, runtime: bool) -> Self {
43 self.runtime = runtime;
44 self
45 }
46
47 pub fn compile(&mut self, _input: &std::path::Path, _output: &std::path::Path) -> Result<()> {
49 todo!("Implement compilation pipeline")
51 }
52}
53
54impl Default for Compiler {
55 fn default() -> Self {
56 Self::new()
57 }
58}