fix the many-body-script and lex-singlet problems
Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
parent
bc09cb07b1
commit
914bf1303f
3 changed files with 20 additions and 27 deletions
|
|
@ -59,8 +59,14 @@ pub fn configure(filename: String, syms: &mut SymTable) -> Result<(), String> {
|
|||
},
|
||||
);
|
||||
|
||||
let config_document =
|
||||
fs::read_to_string(filename).unwrap_or_else(|err: io::Error| err.to_string());
|
||||
let mut config_document = fs::read_to_string(filename)
|
||||
.unwrap_or_else(|err: io::Error| {
|
||||
eprintln!("{}", err.to_string());
|
||||
"".to_string()
|
||||
}) + ")";
|
||||
|
||||
config_document = "(".to_string() + &config_document;
|
||||
|
||||
let config_tree = lex(&config_document)?;
|
||||
let config_result = eval(&config_tree, syms)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue