Add Comment token
This commit is contained in:
parent
c925939faf
commit
0d89cfefc1
3 changed files with 19 additions and 1 deletions
|
@ -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 == ';'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue