;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require zenscript-common zenscript-parser] 2) #@111 Convert a Java type to a ZenType. SYMBOL should be a java class name to be looked up in dumpzs. (fn SYMBOL) (defalias 'zenscript--java-type-to-ztype #[257 "\300\301\302\"\303\304\305 A\"A\"@\207" [seq-find make-closure #[257 "\211A@\300\232\207" [V0] 3 "\n\n(fn ENTRY)"] assoc "Types" zenscript-get-dumpzs] 6 (#$ . 175)]) #@259 Get the ZenType from a stringified binding object SYMBOL. If SYMBOL is the string: "SymbolJavaStaticField: public static zenscript.Type ZenScriptGlobals.global" Then its ZenType will be resolved by looking up the zsPath of "zenscript.Type". (fn SYMBOL) (defalias 'zenscript--symbol-to-type #[257 "\300\301\"\205\302\303!\203\304\202\305\306\302\307\"!P\207" [string-match "SymbolJavaStatic\\(?:Field\\|\\(Method: JavaMethod\\)\\): public static \\(.+\\) .+$" match-string 1 "=>" "" zenscript--java-type-to-ztype 2] 6 (#$ . 507)]) #@243 Get a list of resolvable values in a buffer. Returns a list of values of the form: (name type) name: The name of the value by which it can be referenced. type: The ZenType of the value, its `zsPath` from dumpzs, or nil if unknown. (defalias 'zenscript--buffer-vals #[0 "\301\302\303\304\305\306 A\"A\"\302\307A@\"\"\207" [zenscript--parse-buffer-cache append mapcar #[257 "\211@\300A@!D\207" [zenscript--symbol-to-type] 4 "\n\n(fn EL)"] assoc "Globals" zenscript-get-dumpzs #[257 "\3008\206\n\301@!\207" [2 last] 3 "\n\n(fn IMPORT)"]] 6 (#$ . 1057)]) #@76 Get a list of types or static members below NODES in the tree. (fn NODES) (defalias 'zenscript--get-importables-1 #[257 "\300\301\302\303\"\"\207" [apply append mapcar #[257 "\211;\203\211C\207\211@\300\301!\302\"\303\230\203'\211\304\305\306\"\307\310\304\311A\"\"\"B\207\304\305\312\"\313A!\"\207" [get-char-code-property string-to-char general-category "Lu" mapcar make-closure #[257 "\300\301\302\303OQ\207" [V0 "." 9 nil] 6 "\n\n(fn MEMBER)"] seq-filter #[257 "\301\302\303\304#)\207" [inhibit-changing-match-data "\\[STATIC\\] .+" nil t string-match] 8 "\n\n(fn MEMBER)"] #[257 "\211;\203\207\211@\207" [] 2 "\n\n(fn NODE)"] #[257 "\300\301Q\207" [V0 "."] 4 "\n\n(fn IMPORTABLE)"] zenscript--get-importables-1] 10 "\n\n(fn NODE)"]] 6 (#$ . 1630)]) #@286 Get the known members of the ZenTypes TYPES, or just all known members. Returns a list of members of the following format: (name . extra-info) name: The name of the member. extra-info: A list (possibly nil) of extra information relating to the member. (fn &optional TYPES) (defalias 'zenscript--get-members #[256 "\211?\205\300\301\302\303\304\305 @\236A\"\"\207" [apply append mapcar #[257 "\300\236A\207" [members] 3 "\n\n(fn TYPE)"] zenTypeDumps zenscript-get-dumpzs] 7 (#$ . 2411)]) #@126 Get a list of all things that can be imported: static members and types. Returns a list of type names that can be imported. (defalias 'zenscript--get-importables #[0 "\300\301\302\303 A\"A!\207" [zenscript--get-importables-1 assoc "Root (Symbol Package)" zenscript-get-dumpzs] 4 (#$ . 2920)]) #@59 This is the cache maintained by `zenscript-parse-buffer'. (defvar zenscript--parse-buffer-cache nil (#$ . 3220)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable zenscript-buffer-parse-idle-period funcall function #[0 "\300\207" [0.5] 1] "How long after idling should the buffer be parsed.\n\nSee `zenscript-parse-buffer'." :group zenscript :type numberp] 8) #@53 The list of overlays from `zenscript-parse-buffer'. (defvar zenscript--language-overlays nil (#$ . 3623)) #@163 The default `zenscript-make-error-overlay-function'. Sets the face of OVERLAY to `font-lock-warning-face', and adds the help-echo MESSAGE. (fn OVERLAY MESSAGE) (defalias 'zenscript-default-error-overlay #[514 "\300\301\302#\210\300\303#\207" [overlay-put face font-lock-warning-face help-echo] 6 (#$ . 3736)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable zenscript-make-error-overlay-function funcall function #[0 "\300\207" [zenscript-default-error-overlay] 1] "The function to call to set overlay properties for syntax errors.\n\nThe function is called with two arguments, the overlay and the error message." :group zenscript :type functionp] 8) #@58 Show MESSAGE as the error for TOKEN. (fn MESSAGE TOKEN) (defalias 'zenscript--highlight-error #[514 "\211\203\n\3028\202\fdS\203\211A@G\\\202d\303\304\305$\211B \"\207" [zenscript--language-overlays zenscript-make-error-overlay-function 2 make-overlay nil t] 9 (#$ . 4437)]) (add-hook 'zenscript-parse-error-hook 'zenscript--highlight-error) #@48 Get an alist of variables in-scope at `point'. (defalias 'zenscript--get-bindings #[0 "\300\301\302\303\304m\203`S\202`!\"\"\207" [apply append mapcar #[257 "\300\301\"\207" [overlay-get zenscript-bindings] 4 "\n\n(fn OVERLAY)"] overlays-at] 6 (#$ . 4802)]) #@107 Make an overlay to inform code completion between START and END of any BINDINGS. (fn START END BINDINGS) (defalias 'zenscript--make-bindings-overlay #[771 "\301p\302\211%\211B\303\304#\207" [zenscript--language-overlays make-overlay t overlay-put zenscript-bindings] 9 (#$ . 5072)]) #@172 Make a binding overlay for ARGUMENTS from START to END. ARGUMENTS is the list of bindings as returned by `zenscript--parse-function-arguments'. (fn ARGUMENTS START END) (defalias 'zenscript--make-func-arguments-overlay #[771 "\300\301\302\"#\207" [zenscript--make-bindings-overlay mapcar #[257 "\211@\211A@\3008D\207" [2] 5 "\n\n(fn ARGUMENT)"]] 9 (#$ . 5369)]) #@104 Traverse the syntax tree from an EXPRESSION node. See `zenscript--parse-expression'. (fn EXPRESSION) (defalias 'zenscript--traverse-expression #[257 "\211@\211\300\267\202t\301\302A\"\207\302\3038!\210\302\3048!\207\302A@!\210\302\3038!\207\302A@!\207\302A@!\210\302\3048!\207\302A@!\210\301\302\3038\"\207A@\3048\3058\3068\307#\210\301\310\311\"\"\207\301\302A@\"\207\301\302A@\"\210\301\302\3038\"\207\312\207" [#s(hash-table size 20 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (E_AND 8 E_XOR 8 E_OR 8 E_AND2 8 E_OR2 8 E_CONDITIONAL 8 E_ASSIGN 8 E_OPASSIGN 14 E_BINARY 26 E_COMPARE 26 E_INSTANCEOF 38 E_CAST 38 E_INDEX 38 E_MEMBER 38 E_UNARY 38 E_INDEX_SET 44 E_CALL 56 E_FUNCTION 69 E_LIST 95 E_MAP 102)) mapc zenscript--traverse-expression 2 3 4 5 zenscript--make-func-arguments-overlay make-closure #[257 "\301\300\"\207" [V0 zenscript--traverse-statement] 4 "\n\n(fn STATEMENT)"] nil] 10 (#$ . 5745)]) #@196 Traverse the syntax tree from a STATEMENT node. Any local variables are to be in scope until SCOPE-END, or 1 + `point-max' See `zenscript--parse-statement'. (fn STATEMENT &optional SCOPE-END) (defalias 'zenscript--traverse-statement #[513 "\211\206dTA@\3008AAA@\211\301\267\202\302@!\207@A@\303\304\305\"\"\207\306@\211A@\3008DC\262#\210\3008\211\205F\302!\207\302@!\210\303\304\307\"A\"\207@A@\3008\306 \310\311\"#\210\302!\210\312\"\207\302@!\210\312A@\"\207\313\207" [2 #s(hash-table size 7 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (S_RETURN 24 S_EXPRESSION 24 S_BLOCK 29 S_VAR 42 S_IF 71 S_FOR 85 S_WHILE 115)) zenscript--traverse-expression mapc make-closure #[257 "\301\300\"\207" [V0 zenscript--traverse-statement] 4 "\n\n(fn STATEMENT)"] zenscript--make-bindings-overlay #[257 "\211\205\301\300\"\207" [V0 zenscript--traverse-statement] 4 "\n\n(fn STATEMENT)"] mapcar #[257 "\211A@\3008D\207" [2] 4 "\n\n(fn TOKEN)"] zenscript--traverse-statement nil] 16 (#$ . 6706)]) #@77 Traverse `zenscript--parse-buffer-cache', indexing local bindings and such. (defalias 'zenscript--traverse-tree #[0 "A\301\302\303@\"\302\304A@\"\302\305\3068\"\302\307\3108\"$\311ed#\210\312\313\3148\"\210\315\207" [zenscript--parse-buffer-cache append mapcar #[257 "\3008\206 \301@!@A@D\207" [2 last] 3 "\n\n(fn IMPORT)"] #[257 "\211@A@\3008\3018\3028\303#\210\304\305\306\"\"\210A@\3078D\207" [3 4 5 zenscript--make-func-arguments-overlay mapc make-closure #[257 "\301\300\"\207" [V0 zenscript--traverse-statement] 4 "\n\n(fn STATEMENT)"] 2] 10 "\n\n(fn FUNC)"] #[257 "\211@A@\3008\3018\3028\3038\304\305\306\"\305\307\"\"\310#\266\311\312\"\210A@\3008D\207" [2 3 4 5 append mapcar #[257 "\211@A@\3008\3018\3028\303#\210\304\305\306\"\"\210A@\3078D\207" [3 4 5 zenscript--make-func-arguments-overlay mapc make-closure #[257 "\301\300\"\207" [V0 zenscript--traverse-statement] 4 "\n\n(fn STATEMENT)"] 2] 10 "\n\n(fn METHOD)"] #[257 "\211@\3008\211\203 \301!\210A@\3008D\207" [2 zenscript--parse-expression] 6 "\n\n(fn FIELD)"] zenscript--make-bindings-overlay mapc #[257 "\300@\210A@\3018\3028\3038\304#\210\305\306\307\"\"\207" [nil 3 4 5 zenscript--make-func-arguments-overlay mapc make-closure #[257 "\301\300\"\207" [V0 zenscript--traverse-statement] 4 "\n\n(fn STATEMENT)"]] 10 "\n\n(fn CONSTRUCTOR)"]] 12 "\n\n(fn CLASS)"] 2 #[257 "\211@\3008\301!\210A@\3008D\207" [2 zenscript--traverse-expression] 6 "\n\n(fn GLOBAL)"] 4 zenscript--make-bindings-overlay mapc zenscript--traverse-statement 3 nil] 9 (#$ . 7760)]) #@232 Parse the buffer BUFFER, refreshing the cache. This is run periodically while in `zenscript-mode', on the idle TIMER. Internally, this uses `zenscript--parse-tokens' and `zenscript--tokenize-buffer'. (fn BUFFER &optional TIMER) (defalias 'zenscript-parse-buffer #[513 "\303!\204\211\205l\304!\207rq\210\305=\204\"\211\205k\304!\202k\306\307\"\211 @\230?\205i\n\203=\310\n\211A\242!\210\202.\211\311\212\3122G\313 0\211<\203P\211\202a\3142_\315\316\317\320\321f!`E\"0\210\321\262)!B\322 \262)\207" [major-mode zenscript--parse-buffer-cache zenscript--language-overlays buffer-live-p cancel-timer zenscript-mode secure-hash md5 delete-overlay zenscript--parse-tokens zenscript-unrecognized-token zenscript--tokenize-buffer zenscript-parse-error zenscript--throw-parse-error "Unrecognized token" T_UNKNOWN char-to-string nil zenscript--traverse-tree] 11 (#$ . 9365)]) #@188 Return whether C is a valid character in an identifier. Returns t if C is valid even at the start, 'not-start if C is not valid at the start, and nil if C is not valid anywhere. (fn C) (defalias 'zenscript--identifier-p #[257 "\300X\203\f\211\301X\206+\302X\203\211\303X\206+\211\304U\206+\305X\205+\211\306X\205+\307\207" [97 122 65 90 95 48 57 not-start] 3 (#$ . 10263)]) #@193 Move forward until encountering the end of a ZenScript identifier. With argument ARG, do this that many times. If ARG is omitted or nil, move point forward one identifier. (fn &optional ARG) (defalias 'forward-zenscript-identifier #[256 "\211\206\300\301W\203\302[!\207\301U\206Lm?\205L\211\301V\205Lm\2044\303\304f!\305=\2044\304u\210\202!m\204E\303\304f!\203E\304u\210\2024\211S\262\202\207" [1 0 backward-zenscript-identifier zenscript--identifier-p nil t] 4 (#$ . 10657) "^p"]) #@201 Move backward until encountering the beginning of a ZenScript identifier. With argument ARG, do this that many times. If ARG is omitted or nil, move point backward one identifier. (fn &optional ARG) (defalias 'backward-zenscript-identifier #[256 "\211\206\300\211\301X\203\302[!\207o?\205`\211\301V\205`o\204-\303`Sf!\204-\304u\210\202\305o\204Q\303`Sf!\211\306=\203E`S\211\262\202F\211\262\203Q\304u\210\202.\211\203\\\211b\210S\262\210\202\207" [1 0 forward-zenscript-identifier zenscript--identifier-p -1 nil t] 6 (#$ . 11166) "^p"]) #@73 Navigate to where SYMBOL is defined in the current buffer. (fn SYMBOL) (defalias 'zenscript-goto-definition #[257 "\300\301 \"\211\203\211A@b\207\302\303\"\207" [assoc zenscript--get-bindings error "Couldn't find definition of %s"] 5 (#$ . 11733) (byte-code "\300 \212\301 \210\302\303!\211\205\"\304@A\"\305\"\205\305\300 \"@\262\262)\306\2031\307\310\"\2022\311\312\313\"\314\315\"\316\317\211\205E&C\207" [zenscript--get-bindings backward-zenscript-identifier bounds-of-thing-at-point zenscript-identifier buffer-substring-no-properties assoc completing-read format "Find symbol (default %s): " "Find symbol: " mapcar car make-closure #[257 "\301\300\"\207" [V0 assoc] 4 "\n\n(fn S)"] t nil] 10)]) #@70 Navigate to the definition of the ZenScript identifier around point. (defalias 'zenscript-goto-definition-at-point #[0 "\300\301\302!\211\203\303@A\"\202\304\300!\262!\207" [zenscript-goto-definition bounds-of-thing-at-point zenscript-identifier buffer-substring-no-properties call-interactively] 5 (#$ . 12469) nil]) #@33 Initialize the language module. (defalias 'zenscript--init-language #[0 "\301\302!\210\301\303!\210\301\304!\210\305\306\307\211\211\211\211\211\211\211& \310\311pD#\210\312\306#\210\313\306\"\207" [zenscript-buffer-parse-idle-period make-local-variable zenscript--parse-buffer-cache zenscript--warnings zenscript-buffer-parse-timer vector t nil timer-set-function zenscript-parse-buffer timer-set-idle-time timer-activate-when-idle] 10 (#$ . 12800)]) (provide 'zenscript-language)