vue3-core/packages/compiler-core/src/parser/index.ts

17 lines
326 B
TypeScript
Raw Normal View History

2023-11-12 16:58:24 +08:00
import { RootNode, createRoot } from '../ast'
import { ParserOptions } from '../options'
import { Parser } from './Parser'
2023-11-12 21:42:27 +08:00
const parser = new Parser({
// TODO
})
2023-11-12 16:58:24 +08:00
export function baseParse(
content: string,
options: ParserOptions = {}
): RootNode {
const root = createRoot([])
2023-11-12 21:42:27 +08:00
parser.parse(content)
2023-11-12 16:58:24 +08:00
return root
}