remove unwrap from next_is_hyphen()
This commit is contained in:
parent
91b000ac0d
commit
f2cd74528b
@ -333,8 +333,11 @@ impl<'a> Parser<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn next_is_hypen(&mut self) -> bool {
|
fn next_is_hypen(&mut self) -> bool {
|
||||||
self.toks.peek_forward(1).is_some()
|
if let Some(Token { kind, .. }) = self.toks.peek_forward(1) {
|
||||||
&& matches!(self.toks.peek().unwrap().kind, '-' | '_' | 'a'..='z' | 'A'..='Z')
|
matches!(kind, '-' | '_' | 'a'..='z' | 'A'..='Z')
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_intermediate_value(&mut self) -> Option<SassResult<Spanned<IntermediateValue>>> {
|
fn parse_intermediate_value(&mut self) -> Option<SassResult<Spanned<IntermediateValue>>> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user