fix macro hygien

This commit is contained in:
Skgland
2021-02-06 19:39:02 +01:00
parent bc6159c538
commit 64433bd8dd
6 changed files with 176 additions and 107 deletions

View File

@@ -14,7 +14,7 @@ macro_rules! is_not_eof {
($c:expr) => {
match $c {
Ok(c) => c,
Err(ParserError::UnexpectedEOF) => return Ok(true),
Err($crate::ast::ParserError::UnexpectedEOF) => return Ok(true),
Err(e) => return Err(e),
}
};
@@ -26,7 +26,7 @@ macro_rules! consume_chars_with {
match $e {
Ok(Some(c)) => $token.push(c),
Ok(None) => continue,
Err(ParserError::UnexpectedChar(..)) => break,
Err($crate::ast::ParserError::UnexpectedChar(..)) => break,
Err(e) => return Err(e),
}
}