1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

JSSpecCompiler: Push ParseError out of SpecFunction

This commit is contained in:
Dan Klishch 2024-01-16 21:24:55 -05:00 committed by Andrew Kaster
parent 32f601f9a4
commit d339ad01bb
5 changed files with 76 additions and 70 deletions

View file

@ -110,7 +110,7 @@ ParseErrorOr<TokenizeTreeResult> tokenize_tree(XML::Node const* node, bool allow
}
if (element.name == tag_span) {
auto element_class = TRY(get_attribute_by_name(child, attribute_class));
auto element_class = TRY(deprecated_get_attribute_by_name(child, attribute_class));
if (element_class != class_secnum)
return ParseError::create(String::formatted("Expected 'secnum' as a class name of <span>, but found '{}'", element_class), child);
tokens.append({ TokenType::SectionNumber, TRY(get_text_contents(child)), child });