tamer: ir::xir::tree: Explicitly list unhandled tokens for exhaustiveness
This allows Rust to carry out its exhaustiveness check for when we add new tokens. It further ensure that we understand what we missed, or chose not to handle. DEV-10863main
parent
edf9a75575
commit
6eed728756
|
@ -718,7 +718,9 @@ impl ParserState {
|
|||
Token::AttrValue(value, span) => stack.close_attr(value, span),
|
||||
Token::Text(value, span) => stack.text(value, span),
|
||||
|
||||
todo => Err(ParseError::Todo(todo, stack)),
|
||||
Token::Comment(..) | Token::CData(..) | Token::Whitespace(..) => {
|
||||
Err(ParseError::Todo(tok, stack))
|
||||
}
|
||||
}
|
||||
.map(|new_stack| self.store_or_emit(new_stack))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue