0.9.0 • Published 21 days ago
oxc-parser v0.9.0
The JavaScript Oxidation Compiler
See index.d.ts for parseSync
and parseAsync
API.
TypeScript typings for the AST is currently work in progress.
cjs
const oxc = require("oxc-parser");
const assert = require('assert');
function test(ret) {
const program = JSON.parse(ret.program);
assert(program.body.length == 1);
assert(ret.errors.length == 0);
}
test(oxc.parseSync("foo"));
async function main() {
test(await oxc.parseAsync("foo"));
}
main()
ESM
import oxc from 'oxc-parser';
import assert from 'assert';
function test(ret) {
const program = JSON.parse(ret.program);
assert(program.body.length == 1);
assert(ret.errors.length == 0);
}
test(oxc.parseSync("foo"));
async function main() {
test(await oxc.parseAsync("foo"));
}
main()
0.9.0
21 days ago
0.8.0
2 months ago
0.7.0
2 months ago
0.6.0
3 months ago
0.5.0
3 months ago
0.4.0-alpha.0
3 months ago
0.4.0
3 months ago
0.3.0
3 months ago
0.3.0-alpha.0
3 months ago
0.2.0
6 months ago