Remove some no-longer-necessary indirection
This commit is contained in:
parent
61972410ea
commit
c767402865
@ -86,11 +86,6 @@ impl Schala {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_source<'a>(input: &'a str, handle: &mut Schala) -> Result<&'a str, String> {
|
|
||||||
handle.source_reference.load_new_source(input);
|
|
||||||
Ok(input)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn tokenizing(input: &str, _handle: &mut Schala, comp: Option<&mut PassDebugArtifact>) -> Result<Vec<tokenizing::Token>, String> {
|
fn tokenizing(input: &str, _handle: &mut Schala, comp: Option<&mut PassDebugArtifact>) -> Result<Vec<tokenizing::Token>, String> {
|
||||||
let tokens = tokenizing::tokenize(input);
|
let tokens = tokenizing::tokenize(input);
|
||||||
comp.map(|comp| {
|
comp.map(|comp| {
|
||||||
@ -236,8 +231,8 @@ impl ProgrammingLanguageInterface for Schala {
|
|||||||
let mut reducing_debug_artifact = None;
|
let mut reducing_debug_artifact = None;
|
||||||
let mut eval_debug_artifact = None;
|
let mut eval_debug_artifact = None;
|
||||||
|
|
||||||
load_source(&source, self);
|
self.source_reference.load_new_source(source);
|
||||||
let main_output: Result<String, String> = tokenizing(&source, self, token_debug_artifact)
|
let main_output: Result<String, String> = tokenizing(source, self, token_debug_artifact)
|
||||||
.and_then(|tokens| parsing(tokens, self, parsing_debug_artifact))
|
.and_then(|tokens| parsing(tokens, self, parsing_debug_artifact))
|
||||||
.and_then(|ast| symbol_table(ast, self, symbol_debug_artifact))
|
.and_then(|ast| symbol_table(ast, self, symbol_debug_artifact))
|
||||||
.and_then(|ast| typechecking(ast, self, typechecking_debug_artifact))
|
.and_then(|ast| typechecking(ast, self, typechecking_debug_artifact))
|
||||||
|
Loading…
Reference in New Issue
Block a user