Implemented functions and aliases
This commit is contained in:
@@ -22,16 +22,21 @@ pub fn main() {
|
||||
|
||||
loop {
|
||||
log!(TRACE, "Entered loop");
|
||||
let line = match prompt::read_line(&mut shenv) {
|
||||
let mut line = match prompt::read_line(&mut shenv) {
|
||||
Ok(line) => line,
|
||||
Err(e) => {
|
||||
eprintln!("{}",e);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
if let Some(line_exp) = expand_aliases(&line, &mut shenv) {
|
||||
line = line_exp;
|
||||
}
|
||||
let input = Rc::new(line);
|
||||
log!(INFO, "New input: {:?}", input);
|
||||
let token_stream = Lexer::new(input).lex();
|
||||
log!(DEBUG, token_stream);
|
||||
log!(DEBUG, token_stream);
|
||||
log!(TRACE, "Token stream: {:?}", token_stream);
|
||||
match Parser::new(token_stream).parse() {
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user