oxc-parser 0.86.0 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{bindings.js → bindings.mjs} +15 -12
- package/generated/constants.mjs +9 -0
- package/generated/deserialize/{js.js → js.mjs} +1 -5
- package/generated/deserialize/{ts.js → ts.mjs} +1 -5
- package/generated/lazy/{constructors.js → constructors.mjs} +206 -415
- package/generated/lazy/{types.js → types.mjs} +3 -11
- package/generated/lazy/{walk.js → walk.mjs} +148 -150
- package/{index.js → index.mjs} +18 -22
- package/package.json +35 -36
- package/raw-transfer/{common.js → common.mjs} +8 -16
- package/raw-transfer/{eager.js → eager.mjs} +7 -8
- package/raw-transfer/{lazy-common.js → lazy-common.mjs} +2 -6
- package/raw-transfer/{lazy.js → lazy.mjs} +9 -12
- package/raw-transfer/{node-array.js → node-array.mjs} +2 -6
- package/raw-transfer/{supported.js → supported.mjs} +2 -6
- package/raw-transfer/{visitor.js → visitor.mjs} +5 -11
- package/generated/constants.js +0 -18
- package/wrap.cjs +0 -58
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
require = createRequire(
|
|
6
|
+
import { createRequire } from 'node:module'
|
|
7
|
+
const require = createRequire(import.meta.url)
|
|
8
|
+
const __dirname = new URL('.', import.meta.url).pathname
|
|
8
9
|
|
|
9
10
|
const { readFileSync } = require('node:fs')
|
|
10
11
|
let nativeBinding = null
|
|
@@ -400,13 +401,15 @@ if (!nativeBinding) {
|
|
|
400
401
|
throw new Error(`Failed to load native binding`)
|
|
401
402
|
}
|
|
402
403
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
404
|
+
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported } = nativeBinding
|
|
405
|
+
export { Severity }
|
|
406
|
+
export { ParseResult }
|
|
407
|
+
export { ExportExportNameKind }
|
|
408
|
+
export { ExportImportNameKind }
|
|
409
|
+
export { ExportLocalNameKind }
|
|
410
|
+
export { ImportNameKind }
|
|
411
|
+
export { parseAsync }
|
|
412
|
+
export { parseSync }
|
|
413
|
+
export { rawTransferSupported }
|
|
414
|
+
const { getBufferOffset, parseAsyncRaw, parseSyncRaw } = nativeBinding
|
|
415
|
+
export { getBufferOffset, parseAsyncRaw, parseSyncRaw }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
2
|
+
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
|
|
3
|
+
|
|
4
|
+
export const BUFFER_SIZE = 2147483616;
|
|
5
|
+
export const BUFFER_ALIGN = 4294967296;
|
|
6
|
+
export const DATA_POINTER_POS_32 = 536870902;
|
|
7
|
+
export const IS_TS_FLAG_POS = 2147483612;
|
|
8
|
+
export const PROGRAM_OFFSET = 0;
|
|
9
|
+
export const SOURCE_LEN_OFFSET = 16;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
|
|
3
3
|
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
module.exports = deserialize;
|
|
7
|
-
|
|
8
4
|
let uint8, uint32, float64, sourceText, sourceIsAscii, sourceByteLen;
|
|
9
5
|
|
|
10
6
|
const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
|
|
11
7
|
decodeStr = textDecoder.decode.bind(textDecoder),
|
|
12
8
|
{ fromCodePoint } = String;
|
|
13
9
|
|
|
14
|
-
function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
|
|
10
|
+
export function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
|
|
15
11
|
uint8 = buffer;
|
|
16
12
|
uint32 = buffer.uint32;
|
|
17
13
|
float64 = buffer.float64;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
|
|
3
3
|
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
module.exports = deserialize;
|
|
7
|
-
|
|
8
4
|
let uint8, uint32, float64, sourceText, sourceIsAscii, sourceByteLen;
|
|
9
5
|
|
|
10
6
|
const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
|
|
11
7
|
decodeStr = textDecoder.decode.bind(textDecoder),
|
|
12
8
|
{ fromCodePoint } = String;
|
|
13
9
|
|
|
14
|
-
function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
|
|
10
|
+
export function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
|
|
15
11
|
uint8 = buffer;
|
|
16
12
|
uint32 = buffer.uint32;
|
|
17
13
|
float64 = buffer.float64;
|