// Copyright 2024 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. import { parse } from '../parse.js'; import type { LynxStyleNode } from '../types/LynxStyleNode.js'; import type { ParserError, Plugin } from '../types/Plugin.js'; export function cssToAst( content: string, plugins: Plugin[], ): [LynxStyleNode[], ParserError[]] { const parsedCSS = parse(content, { plugins, }); return [parsedCSS.root, parsedCSS.errors] as const; }