Anonymous user
Parsing/Shunting-yard algorithm: Difference between revisions
m
→{{header|Rust}}
Line 4,384:
return None;
}
self.
}
}
fn lex_token(input: char) -> Result<Token, char> {
let ret = match input {
'0'...'9' =>
'+' =>
'-' =>
'*' =>
'/' =>
'^' =>
'(' =>
')' =>
_ => return Err(input),
};
Ok(ret)
}
|