oxc-parser 0.75.0 → 0.76.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/README.md +11 -0
- package/bindings.js +0 -3
- package/generated/deserialize/js.js +287 -287
- package/generated/deserialize/ts.js +300 -300
- package/generated/{deserialize/lazy.js → lazy/constructors.js} +206 -416
- package/generated/{deserialize/lazy-visit.js → lazy/walk.js} +1 -1
- package/index.d.ts +0 -68
- package/index.js +0 -1
- package/package.json +20 -20
- package/raw-transfer/lazy.js +7 -7
- package/raw-transfer/visitor.js +4 -4
- /package/generated/{deserialize/lazy-types.js → lazy/types.js} +0 -0
package/README.md
CHANGED
|
@@ -112,3 +112,14 @@ console.log(result.program, result.comments);
|
|
|
112
112
|
// ESM information - imports, exports, `import.meta`s.
|
|
113
113
|
console.log(result.module);
|
|
114
114
|
```
|
|
115
|
+
|
|
116
|
+
### Options
|
|
117
|
+
|
|
118
|
+
All options are optional.
|
|
119
|
+
|
|
120
|
+
- `lang`: `'js'` | `'jsx'` | `'ts'` | `'tsx'`. Set language of source. If omitted, language is deduced from file extension.
|
|
121
|
+
- `sourceType`: `'script'` | `'module'` | `'unambiguous'`. Set source type. Defaults to `'module'`.
|
|
122
|
+
- `astType`: `'js'` | `'ts'`. Set to `'ts'` if you want ASTs of plain JS/JSX files to contain TypeScript-specific properties.
|
|
123
|
+
- `range`: `true` | `false`. If `true`, AST nodes contain a `range` field. Defaults to `false`.
|
|
124
|
+
- `preserveParens`: `true` | `false`. If `true`, parenthesized expressions are represented by (non-standard) `ParenthesizedExpression` and `TSParenthesizedType` AST nodes. Defaults to `true`.
|
|
125
|
+
- `showSemanticErrors`: `true` | `false`. If `true`, check file for semantic errors which parser does not otherwise emit e.g. `let x; let x;`. Has a small performance cost. Defaults to `false`.
|
package/bindings.js
CHANGED
|
@@ -388,10 +388,7 @@ module.exports.ParseResult = nativeBinding.ParseResult
|
|
|
388
388
|
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind
|
|
389
389
|
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind
|
|
390
390
|
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind
|
|
391
|
-
module.exports.getBufferOffset = nativeBinding.getBufferOffset
|
|
392
391
|
module.exports.ImportNameKind = nativeBinding.ImportNameKind
|
|
393
392
|
module.exports.parseAsync = nativeBinding.parseAsync
|
|
394
|
-
module.exports.parseAsyncRaw = nativeBinding.parseAsyncRaw
|
|
395
393
|
module.exports.parseSync = nativeBinding.parseSync
|
|
396
|
-
module.exports.parseSyncRaw = nativeBinding.parseSyncRaw
|
|
397
394
|
module.exports.rawTransferSupported = nativeBinding.rawTransferSupported
|