MCPcopy Create free account
hub / github.com/csskit/csskit / parse_escape_sequence

Method parse_escape_sequence

crates/css_lexer/src/private.rs:371–382  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

369 }
370
371 fn parse_escape_sequence(&mut self) -> (char, u8) {
372 if let Some(c) = self.next_char() {
373 if !c.is_ascii_hexdigit() {
374 return (c, c.len_utf8() as u8);
375 }
376 let (value, hex_len) = self.consume_hex_escape(c);
377 let ws_len = self.consume_escape_whitespace();
378 (codepoint_to_char(value), hex_len + ws_len)
379 } else {
380 (REPLACEMENT_CHARACTER, 0)
381 }
382 }
383
384 fn consume_url_sequence(&mut self, leading_len: u32, ident_escaped: bool) -> Token {
385 let mut len = leading_len;

Callers 7

fmt_compacted_identMethod · 0.45
fmt_compacted_stringMethod · 0.45
fmt_expanded_identMethod · 0.45
eq_ignore_ascii_caseMethod · 0.45
parseMethod · 0.45
parse_ascii_lowerMethod · 0.45

Calls 4

codepoint_to_charFunction · 0.85
next_charMethod · 0.80
consume_hex_escapeMethod · 0.45

Tested by

no test coverage detected