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:
2016-07-16 17:07:47 -04:00
parent 14bd90d88e
commit 5103ed2971
10 changed files with 351 additions and 41 deletions

View File

@ -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);
}