The Draconian compiler can now read a file.
A file can be read and placed into a Reader buffer for lexicographical analysis. This buffer can be consumed on a character by character basis.
This commit is contained in:
@ -4,6 +4,8 @@ extern crate draconic;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use draconic::Compiler;
|
||||
|
||||
|
||||
|
||||
///
|
||||
@ -13,7 +15,7 @@ pub const RESOURCE_DIR: &'static str = "resources";
|
||||
pub const EXAMPLES_DIR: &'static str = "examples";
|
||||
|
||||
///
|
||||
pub const TEST_INPUT_FILENAME: &'static str = "test.tpl";
|
||||
pub const TEST_INPUT_FILENAME: &'static str = "test.drs";
|
||||
|
||||
///
|
||||
pub const TEST_OUTPUT_FILENAME: &'static str = "test.rs";
|
||||
@ -39,4 +41,5 @@ pub fn main()
|
||||
output.push(TEST_OUTPUT_FILENAME);
|
||||
|
||||
println!("Compiling {:?} to {:?}", input, output);
|
||||
Compiler::compile(input, output);
|
||||
}
|
Reference in New Issue
Block a user