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