Compare commits
No commits in common. "fd3a641c718e45f9dc13dc0b90c0bd2541966bca" and "ec55e2e8f0d880eaefffbc6705107775092ce831" have entirely different histories.
fd3a641c71
...
ec55e2e8f0
@ -46,13 +46,14 @@ impl<'a, T, V> ScopeStack<'a, T, V> where T: Hash + Eq {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Quickly create an AST from a string, with no error checking. For test use only
|
/// this is intended for use in tests, and does no error-handling whatsoever
|
||||||
#[cfg(test)]
|
#[allow(dead_code)]
|
||||||
pub fn quick_ast(input: &str) -> crate::ast::AST {
|
pub fn quick_ast(input: &str) -> crate::ast::AST {
|
||||||
let tokens = crate::tokenizing::tokenize(input);
|
let tokens = crate::tokenizing::tokenize(input);
|
||||||
let mut parser = crate::parsing::Parser::new();
|
let mut parser = crate::parsing::Parser::new();
|
||||||
parser.add_new_tokens(tokens);
|
parser.add_new_tokens(tokens);
|
||||||
let output = parser.parse();
|
let output = parser.parse();
|
||||||
|
std::mem::drop(parser);
|
||||||
output.unwrap()
|
output.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user