Boolean and Character are a little more filled out, and used by the Lexer
This commit is contained in:
parent
42d191d036
commit
d6a9fc26cd
4 changed files with 29 additions and 19 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue