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

Function parse

crates/css_parse/src/traits/semantic_eq.rs:93–98  ·  view source on GitHub ↗
(bump: &'a Bump, source: &'a str)

Source from the content-addressed store, hash-verified

91 use css_lexer::EmptyAtomSet;
92
93 fn parse<'a, T: Parse<'a> + ToCursors>(bump: &'a Bump, source: &'a str) -> T {
94 let lexer = css_lexer::Lexer::new(&EmptyAtomSet::ATOMS, source);
95 let mut parser = Parser::new(bump, source, lexer);
96 let result = parser.parse_entirely::<T>();
97 result.output.unwrap()
98 }
99
100 #[test]
101 fn test_cursor_semantic_eq_ignores_offset() {

Callers 12

try_parseMethod · 0.70
parse_entirelyMethod · 0.50
parseMethod · 0.50
parse_if_peekMethod · 0.50
parseMethod · 0.50
parseMethod · 0.50
parseMethod · 0.50

Calls

no outgoing calls

Tested by 2