vue_oxc_toolkit

Crates.iovue_oxc_toolkit
lib.rsvue_oxc_toolkit
version0.1.0
created_at2026-01-22 14:17:44.705621+00
updated_at2026-01-24 02:15:36.90067+00
descriptionA parser to generate semantically correct AST from .vue file. Good for linting integration
homepage
repositoryhttps://github.com/liangmiQwQ/vue-oxc-toolkit
max_upload_size
id2061735
size249,415
Liang Mi (liangmiQwQ)

documentation

README

vue_oxc_toolkit

Include a fork from vue-oxc-parser originally created by zhiyuanzmj.

A toolkit to parse .vue file into semantically correct oxc jsx/tsx ast. Include generate module_record, irregular_whitespaces which are required by oxc_linter.

Usage

use vue_oxc_toolkit::VueOxcParser;
use oxc_allocator::Allocator;
use oxc_parser::ParserReturn;


fn main() {
  let allocator = Allocator::new();
  let source = include_str!("example.vue");

  // get the result there
  let ret: ParserReturn = VueOxcParser::new(source, &allocator);

  let SemanticBuilderReturn { semantic, .. } = SemanticBuilder::new()
    .with_cfg(true)
    .with_scope_tree_child_ids(true)
    .with_check_syntax_error(true)
    .build(allocator.alloc(ret.program));

  semantic.set_irregular_whitespaces(ret.irregular_whitespaces);

  /* Omit the future code */
}

This project includes a fork from vue-oxc-parser. But with local latest dependencies of oxc, and remove unused stringify ast functions.

Commit count: 40

cargo fmt