Boolean and Character are a little more filled out, and used by the Lexer

This commit is contained in:
Eryn Wells 2017-01-16 10:29:44 -08:00
parent 42d191d036
commit d6a9fc26cd
4 changed files with 29 additions and 19 deletions

View file

@ -12,9 +12,17 @@ pub mod number;
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Boolean(bool);
impl Boolean {
pub fn new(v: bool) -> Boolean { Boolean(v) }
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Character(char);
impl Character {
pub fn new(v: char) -> Character { Character(v) }
}
pub trait Value: Debug + ValueEq {
fn as_value(&self) -> &Value;
}