| Crates.io | vue_oxc_toolkit |
| lib.rs | vue_oxc_toolkit |
| version | 0.1.0 |
| created_at | 2026-01-22 14:17:44.705621+00 |
| updated_at | 2026-01-24 02:15:36.90067+00 |
| description | A parser to generate semantically correct AST from .vue file. Good for linting integration |
| homepage | |
| repository | https://github.com/liangmiQwQ/vue-oxc-toolkit |
| max_upload_size | |
| id | 2061735 |
| size | 249,415 |
Include a fork from
vue-oxc-parseroriginally 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.
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.