Add Comment token

This commit is contained in:
Eryn Wells 2016-12-25 13:50:34 -07:00
parent c925939faf
commit 0d89cfefc1
3 changed files with 19 additions and 1 deletions

View file

@ -14,6 +14,7 @@ pub trait Lexable {
fn is_boolean_true(&self) -> bool;
fn is_boolean_false(&self) -> bool;
fn is_newline(&self) -> bool;
fn is_comment_initial(&self) -> bool;
}
impl Lexable for char {
@ -52,5 +53,9 @@ impl Lexable for char {
fn is_newline(&self) -> bool {
*self == '\n'
}
fn is_comment_initial(&self) -> bool {
*self == ';'
}
}