(&self, _config: GlobalConfig)
| 15 | |
| 16 | impl DbgParse { |
| 17 | pub fn run(&self, _config: GlobalConfig) -> CliResult { |
| 18 | let DbgParse { content } = self; |
| 19 | let bump = Bump::default(); |
| 20 | for (file_name, mut source) in content.sources()? { |
| 21 | let mut source_string = String::new(); |
| 22 | source.read_to_string(&mut source_string)?; |
| 23 | let source_text = source_string.as_str(); |
| 24 | let lexer = Lexer::new(&CssAtomSet::ATOMS, source_text); |
| 25 | let mut parser = Parser::new(&bump, source_text, lexer); |
| 26 | let result = parser.parse_entirely::<StyleSheet>(); |
| 27 | if let Some(stylesheet) = &result.output { |
| 28 | println!("{stylesheet:#?}"); |
| 29 | } else { |
| 30 | for compact_err in result.errors { |
| 31 | let report = crate::commands::format_diagnostic_error(&compact_err, &source_string, file_name); |
| 32 | println!("{report}"); |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | Ok(()) |
| 37 | } |
| 38 | } |
nothing calls this directly
no test coverage detected