Fix ObjC++ module generator output

Summary:
* Removed extraneous closing brace.
* Fixed static method signature, replacing double colon with an underscore (`static facebook::jsi::Value __hostFunction_Native${moduleName}SpecJSI::${methodName}()` -> `static facebook::jsi::Value __hostFunction_Native${moduleName}SpecJSI_${methodName}()`).
* Wrap `getConstants` selector name with `selector()`.
* Pass through `getConstants` and `constantsToExport` to allow de-duping of `getConstants` method in generator output.

Note that the FBReactNativeSpec that is output by the generator still has some issues that need to be addressed before it can be used.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D23910505

fbshipit-source-id: 37d884885b8878f38d40637377c2a74a728c3a13
This commit is contained in:
Ramanpreet Nara authored and Facebook GitHub Bot committed 2020-09-29 14:39:41 -07:00
1 parent 1b3dc1d9e3
commit 97d3e85c29
5 files changed
+131 -229

No files matched your search

@@ -398,10 +398,10 @@ function serializeConstantsProtocolMethods(
});
return {
methodName: 'getConstants',
methodName,
protocolMethod,
returnJSType: 'ObjectKind',
selector: 'getConstants',
selector: `@selector(${methodName})`,
structParamRecords: [],
};
},