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:
parent
32f601f9a4
commit
d339ad01bb
5 changed files with 76 additions and 70 deletions
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue