|
@@ -19,7 +19,6 @@
|
|
#include "v8.h"
|
|
#include "v8.h"
|
|
#include "jexcept.hpp"
|
|
#include "jexcept.hpp"
|
|
#include "jthread.hpp"
|
|
#include "jthread.hpp"
|
|
-#include "hqlplugins.hpp"
|
|
|
|
#include "deftype.hpp"
|
|
#include "deftype.hpp"
|
|
#include "eclrtl.hpp"
|
|
#include "eclrtl.hpp"
|
|
#include "eclrtl_imp.hpp"
|
|
#include "eclrtl_imp.hpp"
|
|
@@ -30,39 +29,6 @@
|
|
#define EXPORT
|
|
#define EXPORT
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-static const char * compatibleVersions[] = {
|
|
|
|
- "V8 JavaScript Embed Helper 1.0.0",
|
|
|
|
- NULL };
|
|
|
|
-
|
|
|
|
-static const char *version = "V8 JavaScript Embed Helper 1.0.0";
|
|
|
|
-static const char * EclDefinition =
|
|
|
|
- "EXPORT Language := SERVICE\n"
|
|
|
|
- " boolean getEmbedContext():cpp,pure,namespace='javascriptLanguageHelper',entrypoint='getEmbedContext',prototype='IEmbedContext* getEmbedContext()';\n"
|
|
|
|
- " boolean syntaxCheck(const varstring src):cpp,pure,namespace='javascriptLanguageHelper',entrypoint='syntaxCheck';\n"
|
|
|
|
- "END;"
|
|
|
|
- "export getEmbedContext := Language.getEmbedContext;"
|
|
|
|
- "export syntaxCheck := Language.syntaxCheck;"
|
|
|
|
- "EXPORT boolean supportsImport := false;"
|
|
|
|
- "EXPORT boolean supportsScript := true;";
|
|
|
|
-
|
|
|
|
-extern "C" EXPORT bool getECLPluginDefinition(ECLPluginDefinitionBlock *pb)
|
|
|
|
-{
|
|
|
|
- if (pb->size == sizeof(ECLPluginDefinitionBlockEx))
|
|
|
|
- {
|
|
|
|
- ECLPluginDefinitionBlockEx * pbx = (ECLPluginDefinitionBlockEx *) pb;
|
|
|
|
- pbx->compatibleVersions = compatibleVersions;
|
|
|
|
- }
|
|
|
|
- else if (pb->size != sizeof(ECLPluginDefinitionBlock))
|
|
|
|
- return false;
|
|
|
|
- pb->magicVersion = PLUGIN_VERSION;
|
|
|
|
- pb->version = version;
|
|
|
|
- pb->moduleName = "javascript";
|
|
|
|
- pb->ECL = EclDefinition;
|
|
|
|
- pb->flags = PLUGIN_DLL_MODULE | PLUGIN_MULTIPLE_VERSIONS;
|
|
|
|
- pb->description = "V8 JavaScript Embed Helper";
|
|
|
|
- return true;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
namespace javascriptLanguageHelper {
|
|
namespace javascriptLanguageHelper {
|
|
|
|
|
|
class V8JavascriptEmbedFunctionContext : public CInterfaceOf<IEmbedFunctionContext>
|
|
class V8JavascriptEmbedFunctionContext : public CInterfaceOf<IEmbedFunctionContext>
|