1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

JSSpecCompiler+LibXML: Store location for tokens

This commit is contained in:
Dan Klishch 2024-01-16 20:47:08 -05:00 committed by Andrew Kaster
parent d219c91ca9
commit dee4978d67
7 changed files with 78 additions and 50 deletions

View file

@ -31,13 +31,13 @@ inline constexpr StringView attribute_id = "id"sv;
inline constexpr StringView class_secnum = "secnum"sv;
ParseErrorOr<void> tokenize_string(XML::Node const* node, StringView view, Vector<Token>& tokens);
ParseErrorOr<void> tokenize_string(SpecificationParsingContext& ctx, XML::Node const* node, StringView view, Vector<Token>& tokens);
struct TokenizeTreeResult {
Vector<Token> tokens;
XML::Node const* substeps = nullptr;
};
ParseErrorOr<TokenizeTreeResult> tokenize_tree(XML::Node const* node, bool allow_substeps = false);
ParseErrorOr<TokenizeTreeResult> tokenize_tree(SpecificationParsingContext& ctx, XML::Node const* node, bool allow_substeps = false);
}