Kill some compiler warnings
This commit is contained in:
parent
8ef5a28aff
commit
0423017125
@ -121,7 +121,7 @@ impl<'a> State<'a> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Binding { name, constant, expr } => {
|
Binding { name, expr, ..} => {
|
||||||
let val = self.eval_expr(expr)?;
|
let val = self.eval_expr(expr)?;
|
||||||
self.insert(name.clone(), ValueEntry::Binding { val });
|
self.insert(name.clone(), ValueEntry::Binding { val });
|
||||||
},
|
},
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::iter::{Iterator, Enumerate, Peekable, FlatMap};
|
use std::iter::{Iterator, Peekable};
|
||||||
use std::str::{Lines, Chars};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fmt::Write;
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub enum TokenType {
|
pub enum TokenType {
|
||||||
@ -96,9 +94,6 @@ impl Token {
|
|||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn to_string(&self) -> String {
|
|
||||||
format!("{}", self.token_type)
|
|
||||||
}
|
|
||||||
pub fn to_string_with_metadata(&self) -> String {
|
pub fn to_string_with_metadata(&self) -> String {
|
||||||
format!("{}(L:{},c:{})", self.token_type, self.offset.0, self.offset.1)
|
format!("{}(L:{},c:{})", self.token_type, self.offset.0, self.offset.1)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user