ladybird/Libraries/LibWeb/CSS/Parser/SyntaxParsing.h
Callum Law 401b0fb734 LibWeb: Expose parse_syntax_component
This will be used when parsing `@function` rules
2026-03-27 11:19:28 +00:00

26 lines
828 B
C++

/*
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#include <LibWeb/DOM/AbstractElement.h>
#include <LibWeb/Export.h>
#include <LibWeb/Forward.h>
namespace Web::CSS::Parser {
enum class LimitSingleComponentIdentToCustomIdent : u8 {
No,
Yes,
};
WEB_API OwnPtr<SyntaxNode> parse_as_syntax(Vector<ComponentValue> const&, LimitSingleComponentIdentToCustomIdent = LimitSingleComponentIdentToCustomIdent::No);
OwnPtr<SyntaxNode> parse_syntax_component(TokenStream<ComponentValue>&, LimitSingleComponentIdentToCustomIdent = LimitSingleComponentIdentToCustomIdent::No);
NonnullRefPtr<StyleValue const> parse_with_a_syntax(ParsingParams const&, Vector<ComponentValue> const& input, SyntaxNode const& syntax);
}