OR-1 dataflow CPU sketch
at main 35 lines 1.1 kB view raw
1#ifndef NODE_TREE_SITTER_PARSER_H_ 2#define NODE_TREE_SITTER_PARSER_H_ 3 4#include "tree_sitter/api.h" 5 6#include <napi.h> 7#include <node_object_wrap.h> 8 9namespace node_tree_sitter { 10 11class Parser final : public Napi::ObjectWrap<Parser> { 12 public: 13 static void Init(Napi::Env env, Napi::Object exports); 14 15 explicit Parser(const Napi::CallbackInfo &info); 16 ~Parser() final; 17 18private: 19 TSParser *parser_; 20 21 Napi::Value SetLanguage(const Napi::CallbackInfo &); 22 Napi::Value Parse(const Napi::CallbackInfo &); 23 Napi::Value IncludedRanges(const Napi::CallbackInfo &info); 24 Napi::Value SetIncludedRanges(const Napi::CallbackInfo &info); 25 Napi::Value TimeoutMicros(const Napi::CallbackInfo &info); 26 Napi::Value SetTimeoutMicros(const Napi::CallbackInfo &info); 27 Napi::Value GetLogger(const Napi::CallbackInfo &); 28 Napi::Value SetLogger(const Napi::CallbackInfo &); 29 Napi::Value PrintDotGraphs(const Napi::CallbackInfo &); 30 Napi::Value Reset(const Napi::CallbackInfo &info); 31}; 32 33} // namespace node_tree_sitter 34 35#endif // NODE_TREE_SITTER_PARSER_H_