Get rid of unused macros
This commit is contained in:
parent
897f64283f
commit
88ed9cb4f2
19
de.rs
19
de.rs
@ -37,25 +37,6 @@ pub enum Token {
|
||||
End,
|
||||
}
|
||||
|
||||
macro_rules! expect_token {
|
||||
() => {
|
||||
match self.next() {
|
||||
Some(token) => token,
|
||||
None => { return Err(self.end_of_stream_error()); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! match_token {
|
||||
($( $variant:pat => $expr:expr ),+) => {
|
||||
match expect_token!() {
|
||||
$( Ok($variant) => $expr ),+,
|
||||
Ok(_) => { return Err(self.syntax_error()); }
|
||||
Err(err) => { return Err(err); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! to_result {
|
||||
($expr:expr, $err:expr) => {
|
||||
match $expr {
|
||||
|
Loading…
x
Reference in New Issue
Block a user