Finish implementation of typescript generator.
The implementation is still untested and will have issues
This commit is contained in:
@ -10,31 +10,3 @@ pub use ir::IR;
|
||||
pub use parser::{Parser, RootNode};
|
||||
pub use process::FileProcessor;
|
||||
pub use tokenizer::{tokenize, Token, TokenError, TokenPosition, TokenType};
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::targets::{self, rust::RustCompiler};
|
||||
|
||||
#[cfg(test)]
|
||||
#[ctor::ctor]
|
||||
fn init() {
|
||||
env_logger::init();
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn parse_jrpc() {
|
||||
let mut fp = crate::process::FileProcessor::new();
|
||||
// let ir = fp.start_compile("./test.jrpc").unwrap();
|
||||
let ir = fp.start_compile("http://127.0.0.1:7878/test.jrpc").unwrap();
|
||||
|
||||
println!("{:?}", ir);
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn generate_rust() {
|
||||
let mut fp = crate::process::FileProcessor::new();
|
||||
let ir = fp.start_compile("./test.jrpc").unwrap();
|
||||
|
||||
targets::compile::<RustCompiler>(ir, "./output/rust").unwrap();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user