;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require map seq tsc tree-sitter-cli] 2) #@97 An alist of mappings from language name symbols to language objects. See `tree-sitter-require'. (defvar tree-sitter-languages nil (#$ . 194)) #@75 List of directories to search for shared libraries that define languages. (defvar tree-sitter-load-path (byte-code "\300 C\207" [tree-sitter-cli-bin-directory] 1) (#$ . 342)) #@74 List of suffixes for shared libraries that define tree-sitter languages. (defvar tree-sitter-load-suffixes (byte-code "\301\267\202\302\303D\207\303C\207\304C\207\305\306\"\207" [system-type #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (darwin 6 gnu/linux 10 windows-nt 13)) ".dylib" ".so" ".dll" error "Unsupported system-type %s"] 3) (#$ . 523)) #@610 Load a language grammar from FILE and register it under the name LANG-SYMBOL. If another language was already registered under the same name, override it. This function returns the loaded language object. FILE should be the base name (without extension) of the native shared library that exports the language as the native symbol NATIVE-SYMBOL-NAME. If FILE is nil, the base name is assumed to be LANG-SYMBOL's name. If NATIVE-SYMBOL-NAME is nil, the name of the exported native symbol is assumed to be LANG-SYMBOL's name, prefixed with "tree_sitter_". (fn LANG-SYMBOL &optional FILE NATIVE-SYMBOL-NAME) (defalias 'tree-sitter-load #[769 "\301!\302\303\304#\206\305\306\"\203C\202$\211\230?\205#CB\307\310\"\211\2042\311\312 \"\210\313\n#\3141H\315\316$0\266\207\210\317#\210\207" [tree-sitter-languages symbol-name replace-regexp-in-string "-" "_" format "tree_sitter_%s" seq-some #[257 "\302 #\207" [tree-sitter-load-path tree-sitter-load-suffixes locate-file] 5 "\n\n(fn BASE-NAME)"] error "Cannot find shared library for language: %S" tsc--load-language (map-not-inplace) map-put! nil map-insert] 15 (#$ . 922)]) #@555 Return the language object loaded and registered under the name LANG-SYMBOL. If the language has not been loaded yet, load it with `tree-sitter-load'. FILE should be the base name (without extension) of the native shared library that exports the language as the native symbol NATIVE-SYMBOL-NAME. If FILE is nil, the base name is assumed to be LANG-SYMBOL's name. If NATIVE-SYMBOL-NAME is nil, the name of the exported native symbol is assumed to be LANG-SYMBOL's name, prefixed with "tree_sitter_". (fn LANG-SYMBOL &optional FILE NATIVE-SYMBOL-NAME) (defalias 'tree-sitter-require #[769 "\301\"\206\f\302#\207" [tree-sitter-languages alist-get tree-sitter-load] 7 (#$ . 2085)]) (provide 'tree-sitter-load)