hermes-parser 0.6.0 → 0.9.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/dist/HermesASTAdapter.js +0 -4
- package/dist/HermesASTAdapter.js.flow +0 -6
- package/dist/HermesParser.js.flow +1 -1
- package/dist/HermesParserWASM.js +1 -1
- package/dist/HermesToBabelAdapter.js +83 -4
- package/dist/HermesToBabelAdapter.js.flow +92 -3
- package/dist/HermesToESTreeAdapter.js +217 -1
- package/dist/HermesToESTreeAdapter.js.flow +218 -1
- package/dist/generated/visitor-keys.js +36 -28
- package/dist/getModuleDocblock.js +111 -0
- package/dist/getModuleDocblock.js.flow +116 -0
- package/package.json +8 -4
package/dist/HermesASTAdapter.js
CHANGED
|
@@ -173,10 +173,6 @@ class HermesASTAdapter {
|
|
|
173
173
|
return this.mapNodeDefault(node);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
mapPrivateProperty(node) {
|
|
177
|
-
throw new SyntaxError(this.formatError(node, 'Private properties are not supported'));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
176
|
formatError(node, message) {
|
|
181
177
|
return `${message} (${node.loc.start.line}:${node.loc.start.column})`;
|
|
182
178
|
}
|
|
@@ -166,12 +166,6 @@ export default class HermesASTAdapter {
|
|
|
166
166
|
return this.mapNodeDefault(node);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
mapPrivateProperty(node: HermesNode): HermesNode {
|
|
170
|
-
throw new SyntaxError(
|
|
171
|
-
this.formatError(node, 'Private properties are not supported'),
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
169
|
formatError(node: HermesNode, message: string): string {
|
|
176
170
|
return `${message} (${node.loc.start.line}:${node.loc.start.column})`;
|
|
177
171
|
}
|
|
@@ -67,7 +67,7 @@ const hermesParseResult_getPositionBufferSize = HermesParserWASM.cwrap(
|
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
// Copy a string into the WASM heap and null-terminate
|
|
70
|
-
function copyToHeap(buffer, addr) {
|
|
70
|
+
function copyToHeap(buffer: Buffer, addr: number) {
|
|
71
71
|
HermesParserWASM.HEAP8.set(buffer, addr);
|
|
72
72
|
HermesParserWASM.HEAP8[addr + buffer.length] = 0;
|
|
73
73
|
}
|