custom_importer_bridge.h 753 B

12345678910111213141516171819202122
  1. #ifndef CUSTOM_IMPORTER_BRIDGE_H
  2. #define CUSTOM_IMPORTER_BRIDGE_H
  3. #include <nan.h>
  4. #include <sass/functions.h>
  5. #include <sass/values.h>
  6. #include "callback_bridge.h"
  7. typedef Sass_Import_List SassImportList;
  8. class CustomImporterBridge : public CallbackBridge<SassImportList> {
  9. public:
  10. CustomImporterBridge(v8::Local<v8::Function> cb, bool is_sync) : CallbackBridge<SassImportList>(cb, is_sync) {}
  11. private:
  12. SassImportList post_process_return_value(v8::Local<v8::Value>) const;
  13. Sass_Import* check_returned_string(Nan::MaybeLocal<v8::Value> value, const char *msg) const;
  14. Sass_Import* get_importer_entry(const v8::Local<v8::Object>&) const;
  15. std::vector<v8::Local<v8::Value>> pre_process_args(std::vector<void*>) const;
  16. };
  17. #endif