diff --git a/hbasm/src/lib.rs b/hbasm/src/lib.rs index 67f6d2af..681fd765 100644 --- a/hbasm/src/lib.rs +++ b/hbasm/src/lib.rs @@ -14,6 +14,7 @@ macro_rules! tokendef { #[derive(Clone, Copy, Debug, PartialEq, Eq, Logos)] #[logos(extras = Rodeo)] #[logos(skip r"[ \t\f]+")] + #[logos(skip r"-- .*")] pub enum Token { $(#[token($opcode, |_| hbbytecode::opcode::[<$opcode:upper>])])* OpCode(u8), @@ -130,6 +131,7 @@ pub fn assembly(code: &str, buf: &mut Vec) -> Result<(), Error> { Some(Ok(Token::Label(lbl))) => { self.lblmap.insert(lbl, self.buf.len() as u64 + 1); } + Some(Ok(Token::ISep)) => (), Some(Ok(_)) => return Err(ErrorKind::UnexpectedToken), Some(Err(())) => return Err(ErrorKind::InvalidToken), None => return Ok(()),