TODO about using Results
This commit is contained in:
parent
3d369daa66
commit
c34064f51a
1 changed files with 3 additions and 0 deletions
|
@ -78,6 +78,9 @@ impl Lexer {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Lexer {
|
impl Lexer {
|
||||||
|
// TODO: Use std::result::Result for these state_* methods.
|
||||||
|
// https://doc.rust-lang.org/1.14.0/core/result/enum.Result.html
|
||||||
|
|
||||||
/// Handle self.state == State::Initial
|
/// Handle self.state == State::Initial
|
||||||
fn state_initial(&mut self, c: char, token: &mut Option<Token>) {
|
fn state_initial(&mut self, c: char, token: &mut Option<Token>) {
|
||||||
if c.is_left_paren() {
|
if c.is_left_paren() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue