;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\313\314\315\316\317\320\321\320\322\320\323&\210\324\325\326\327\330DD\331\312\332\333\334\316\307& \210\324\335\326\327\336DD\337\333\340\316\307\341\342& \210\324\343\326\327\344DD\345\333\346\316\307\341\347& \207" [require subr-x zephir-face font-lock imenu pkg-info custom-declare-group zephir nil "Major mode for editing Zephir code." :tag "Zephir" :prefix "zephir-" :group languages :link (url-link :tag "GitHub Page" "https://github.com/zephir-lang/zephir-mode") (url-link :tag "Zephir Site" "https://zephir-lang.com") (emacs-commentary-link :tag "Commentary" "zephir-mode") custom-declare-variable zephir-mode-hook funcall function #[0 "\300\207" [nil] 1] "List of functions to call when entering Zephir Mode." "Hook" :type hook zephir-indent-tabs-mode #[0 "\300\207" [nil] 1] "Indentation can insert tabs in Zephir Mode if this is non-nil." boolean :safe booleanp zephir-indent-level #[0 "\300\207" [4] 1] "Indentation of Zephir statements." integer integerp] 16) #@469 Display string describing the version of Zephir Mode. If called interactively or if SHOW-VERSION is non-nil, show the version in the echo area and the messages buffer. The returned string includes both, the version from package.el and the library version, if both a present and different. If the version number could not be determined, signal an error, if called interactively, or if SHOW-VERSION is non-nil, otherwise just return nil. (fn &optional SHOW-VERSION) (defalias 'zephir-mode-version #[256 "\300\301!\203\f\302\303\"\210\207" [pkg-info-version-info zephir-mode message "Zephir Mode version: %s"] 5 (#$ . 1161) (list t)]) #@295 Determine the syntax context at POS, defaulting to point. Return nil, if there is no special context at POS, or one of `comment' POS is inside a comment `single-quoted' POS is inside a single-quoted string `double-quoted' POS is inside a double-quoted string (fn &optional POS) (defalias 'zephir-syntax-context #[256 "\212\300!)\3018\203 \302\207\3038\211\304\267\202\305\207\306\207\307\207" [syntax-ppss 4 comment 3 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (39 22 34 24)) single-quoted double-quoted nil] 5 (#$ . 1807)]) #@76 Determine whether POS is inside a string or a comment. (fn &optional POS) (defalias 'zephir-in-string-or-comment-p #[256 "\300!??\207" [zephir-syntax-context] 3 (#$ . 2402)]) #@136 Determine whether POS is inside a string. This function determines single-quoted as well as double-quoted strings. (fn &optional POS) (defalias 'zephir-in-string-p #[256 "\300!\211\301=\206\f\211\302=\207" [zephir-syntax-context single-quoted double-quoted] 4 (#$ . 2586)]) #@64 Determine whether POS is inside a comment. (fn &optional POS) (defalias 'zephir-in-comment-p #[256 "\300!\205\n\301!?\207" [zephir-in-string-or-comment-p zephir-in-string-p] 3 (#$ . 2869)]) #@145 Return the position of comment containing current point. If point is not inside a comment, return nil. Uses CTX as a syntax context. (fn CTX) (defalias 'zephir-comment-start-pos #[257 "\211\205 \3008\205 \3018\207" [4 8] 3 (#$ . 3070)]) #@245 Return the position of RE-OPEN when `point' is inside an “IPG”. This function is intended to use when `point' is inside a parenthetical group (IPG) eg. in an array, argument list, etc. Return nil, if point is not in an IPG. (fn RE-OPEN) (defalias 'zephir-in-ipg #[257 "\212\301 A@\211\205\211b\210\302\303!)\262\205\211\262)\207" [inhibit-changing-match-data syntax-ppss t looking-at] 5 (#$ . 3320)]) #@60 Determine whether `point' is in a function parameter list. (defalias 'zephir-in-param-list-p #[0 "\30111\212\302\303!\211\205,\211b\210\304\305!\210\306\307\310!)\262\206,\304\305!\210\306\307\310!)\262\262)0\207\210\311\207" [inhibit-changing-match-data (error) zephir-in-ipg "(" forward-symbol -1 "\\_" t looking-at nil] 4 (#$ . 3743)]) #@74 Zephir keywords not accounted for by any other `zephir-rx' constituents. (defconst zephir--language-keywords '("array" "as" "break" "try" "catch" "throw" "clone" "reverse" "empty" "fetch" "let" "if" "else" "elseif" "while" "break" "continue" "typeof" "instanceof" "loop" "for" "in" "do" "switch" "case" "default" "eval" "isset" "likely" "unlikely" "static" "unset" "new" "fn" "function" "use" "implements" "extends" "namespace" "return" "class" "interface" "echo" "final" "abstract") (#$ . 4120)) #@60 Possible values for visibility declaration in Zephir code. (defconst zephir-possible-visiblities '("public" "protected" "private" "internal" "inline" "scoped") (#$ . 4623)) #@475 Make a regular expression for a ‘classlike’ with the given TYPE. Optional TYPE must be a string that specifies the type of a object, such as ‘interface’ or ‘namespace’. The regular expression this function returns will check for other keywords that can appear in ‘classlike’ signatures, e.g. ‘abstract’ or ‘final’. The regular expression will have two capture groups which will be TYPE and the name of an object respectively. (fn &optional TYPE) (defalias 'zephir-create-regexp-for-classlike #[256 "\211\206\300\301\211\211\300\230\203\302\262\303\262\2028\304\230\203#\302\262\2028\305\230\203/\302\262\2028\306\230\2038\307\262\310\311\312\313\260\207" ["class" "" "^" "\\(?:\\(?:abstract\\|final\\)?\\s-+\\)?" "interface" "namespace" "extends" "\\\\?" "\\s-*" "\\(" "\\)\\s-+\\(" "\\_<\\$?[A-Z_a-z][0-9A-Z_a-z]*\\(?:\\\\[A-Z_a-z][0-9A-Z_a-z]+\\)*\\_>\\)"] 13 (#$ . 4803)]) #@183 Make a regular expression for a constant definition. The regular expression will have two capture groups which will be the word ‘const’ and the name of a constant respectively. (defalias 'zephir-create-regexp-for-constant #[0 "\300\207" ["\\<\\(const\\)\\s-+&?\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)"] 1 (#$ . 5740)]) #@600 Make a regular expression for a function with the given VISIBILITY. Optional VISIBILITY, when passed, must be a string that specifies the visibility for a Zephir function, e.g. ‘scoped’ or ‘public’. The parameter VISIBILITY can itself also be a regular expression. The regular expression this function returns will check for other keywords that can appear in method signatures, e.g. ‘final’ or ‘deprecated’. The regular expression will have two capture groups which will be the word ‘function’ (or ‘fn’) and the name of a function respectively. (fn &optional VISIBILITY) (defalias 'zephir-create-regexp-for-function #[256 "\211\206\211;\203\211C\262\301\302\303\304\305\306\307B\310BBBBBB!\207" [zephir-possible-visiblities rx-to-string : line-start (* (syntax whitespace)) (32 "deprecated" (+ (syntax whitespace))) (* (or "abstract" "final") (+ (syntax whitespace))) or ((+ (syntax whitespace)) (32 "static" (+ (syntax whitespace))) (group (or "fn" "function")) (+ (syntax whitespace)) (group symbol-start (32 36) (any "A-Z" "a-z" 95) (0+ (any "A-Z" "a-z" "0-9" 95)) symbol-end) (* (syntax whitespace)) "(")] 10 (#$ . 6069)]) #@141 Move the beginning of the ARGth Zephir function from point. Implements Zephir version of `beginning-of-defun-function'. (fn &optional ARG) (defalias 'zephir-beginning-of-defun #[256 "\211\206\301\302\211\303V\203\304\305 \306\307#\210\310 \210\211S\262\202\211\303W\205J\301\210`\311\301!\210\312\313!\210\301y\210\211`=\203C\314\305 \306\307#\210\310 \210T\266\202\202)\207" [case-fold-search 1 t 0 re-search-backward zephir-create-regexp-for-function nil noerror back-to-indentation beginning-of-defun forward-list 2 re-search-forward] 7 (#$ . 7239) "p"]) #@173 Move the end of the ARG'th Zephir function from point. Implements Zephir version of `end-of-defun-function'. For more see `zephir-beginning-of-defun'. (fn &optional ARG) (defalias 'zephir-end-of-defun #[256 "\300\206\301[!\207" [zephir-beginning-of-defun 1] 3 (#$ . 7819) "p"]) #@125 Return the proper indentation for the block. BLOCK-START must contain open bracket position of the block. (fn BLOCK-START) (defalias 'zephir-indent-block #[257 "\212\302\303\304\305!)\262\204 \262\205(b\210\306\304\305!)\262\205(\307 \\\262)\207" [inhibit-changing-match-data zephir-indent-level 0 "}" t looking-at "{" current-indentation] 5 (#$ . 8109)]) #@258 Return the proper indentation for the ‘listlike’. PT-START must contain open bracket position of the ‘listlike’. RE-CLOSE must contain the regular expression that uniquely identifies the close bracket of the ‘listlike’. (fn PT-START RE-CLOSE) (defalias 'zephir-indent-listlike #[514 "\212\211\302\303!)\262\203\"b\210\212\304u\210l)\203\305 \202;i\202;b\210\306u\210l\2033\305 \\\202;\307\310!\210\311u\210i)\207" [inhibit-changing-match-data zephir-indent-level t looking-at nil current-indentation 1 re-search-forward "\\S-" -1] 5 (#$ . 8488)]) #@103 Return the proper indentation for the current line. This uses CTX as a current parse state. (fn CTX) (defalias 'zephir--proper-indentation #[257 "\212\301 \210\302 \203\303 \202f\304 \2035\305\306\307!)\262\212\310!b\210\303 \203,\311\202-\312\\T)\262\202f\313\314!\313\315!\313\316!\203K\317\320\"\266\203\202a\203X\317\321\"\266\203\202a\211\205_\322!\266\203\206f\323 )\207" [inhibit-changing-match-data back-to-indentation zephir-in-string-p current-indentation zephir-in-comment-p "\\*+" t looking-at zephir-comment-start-pos 0 1 zephir-in-ipg "\\[" "(" "{" zephir-indent-listlike "]" ")" zephir-indent-block prog-first-column] 7 (#$ . 9069)]) #@37 Indent current line as Zephir code. (defalias 'zephir-indent-line #[0 "o\203\300\301!\207\212\302\303 !)`\212\304 \210`)Z\300\305!!\210\211\301V\205$\211u\207" [indent-line-to 0 syntax-ppss point-at-bol back-to-indentation zephir--proper-indentation] 5 (#$ . 9749) nil]) #@100 Specify font lock faces based on syntax table entries. Uses STATE as a syntax context. (fn STATE) (defalias 'zephir-font-lock-syntactic-face #[257 "\3038\203\207\212\304!b\210\305\306!)\203 \207\n\207" [font-lock-string-face font-lock-doc-face font-lock-comment-face 3 zephir-comment-start-pos looking-at "/\\*\\*"] 3 (#$ . 10031)]) #@37 Font lock keywords for Zephir Mode. (defvar zephir-font-lock-keywords (byte-code "\302\303!\304B\305\302\306!\307B\310\311!\312B\302 \313B\302\314!\315B\316\317B\310\320\321\322\323\324\325\326\327\330\"B\331BB\332BBBBBB!\333B\334\335B\336 \337B\340\341B\342\343B\344\345B\346\347B\350\351B\352\353B\354\355B\356\357\360BD\361\362B\302\363!\364B\365\327 \"\366\"\367B\370 \371B\372BBBBBBBBBBBBBBBBBBBBBB\207" [zephir-possible-visiblities zephir--language-keywords zephir-create-regexp-for-classlike "extends" ((1 'zephir-class-declaration-spec-face) (2 font-lock-type-face)) ("\\_<\\(implements\\)\\_>\\s-+" (1 'zephir-class-declaration-spec-face) ("\\(\\(?:\\sw\\|\\s_\\|\\\\\\)+\\)\\_>" (save-excursion (re-search-forward "{\\|;\\|extends" nil 'noerror) (forward-char -1) (point)) (progn (re-search-backward "\\_<\\(implements\\)\\_>\\s-+") (forward-symbol 1)) (1 font-lock-type-face))) "namespace" ((1 'zephir-namespace-declaration-face) (2 font-lock-type-face)) rx-to-string (: (* (syntax whitespace)) symbol-start (group "use") symbol-end (+ (syntax whitespace)) (group (+ (or (syntax word) (syntax symbol) 92)))) ((1 'zephir-import-declaration-face) (2 font-lock-type-face)) ((1 'zephir-class-declaration-face) (2 font-lock-type-face)) "interface" ((1 'zephir-class-declaration-face) (2 font-lock-type-face)) "\\_<\\(\\(?:abstract\\|final\\)\\)\\_>\\s-+\\_" (1 'zephir-class-modifier-face) : symbol-start (group (or "abstract" "final")) symbol-end (+ (syntax whitespace)) + or append ("static") ((+ (syntax whitespace))) (symbol-start "function" symbol-end) (1 'zephir-method-modifier-face) "\\(->\\)\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)\\s-*(" ((1 'zephir-object-operator-face) (2 'zephir-method-call-face)) zephir-create-regexp-for-constant ((1 'zephir-keyword-face) (2 'zephir-constant-assign-face)) "\\(\\_<\\(?:__\\(?:\\(?:CLASS\\|F\\(?:ILE\\|UNCTION\\)\\|LINE\\|METHOD\\|NAMESPACE\\)__\\)\\)\\_>\\)" (1 'zephir-magical-constant-face) "\\(\\_<[A-Z_][0-9A-Z_]+\\_>\\|\\_<\\(?:false\\|null\\|true\\)\\_>\\)" (1 'zephir-constant-face) "\\<\\(this\\)\\>" (1 'zephir-this-face) "\\(->\\)\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)\\s-*" ((1 'zephir-object-operator-face) (2 'zephir-property-name-face)) "\\<\\(\\_<\\(?:f\\(?:\\(?:unctio\\)?n\\)\\)\\_>\\)\\s-+\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)\\s-*(" ((1 'zephir-keyword-face) (2 'zephir-function-name-face)) "\\(?:const\\s-+\\)?\\b\\(u?int\\|bool\\(?:ean\\)?\\|u?long\\|u?char\\|i?string\\|\\(?:calla\\|dou\\)ble\\|float\\|resource\\|object\\|var\\|void\\|array\\)!?\\s-+&?\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)" ((1 'zephir-type-face) (2 'zephir-variable-name-face)) "\\(?:const\\s-+\\)?<\\(\\(?:\\sw\\|\\s_\\|\\\\\\)+\\)>\\s-+&?\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)" ((1 'zephir-type-face) (2 'zephir-variable-name-face)) "\\s-*&?\\(?:\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)\\s-*[),=]" "\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>" ((if (save-excursion (backward-char) (zephir-in-param-list-p)) (forward-symbol -1) (end-of-line)) (end-of-line) (0 'zephir-variable-name-face)) "\\(?:)\\s-*->\\||\\)\\s-*?\\s-*" (1 'zephir-type-face) "as" ((1 font-lock-keyword-face) (2 font-lock-type-face)) regexp-opt symbols (1 'zephir-keyword-face) zephir-create-regexp-for-function ((1 'zephir-keyword-face) (2 'zephir-function-name-face)) (("\\_<\\(p\\(?:r\\(?:ivate\\|otected\\)\\|ublic\\)\\)\\_>\\s-+" (1 'zephir-keyword-face) ("\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)" (save-excursion (re-search-forward "\\(?:[;={]\\)" nil 'noerror) (forward-char -1) (point)) (progn (re-search-backward "\\_<\\(p\\(?:r\\(?:ivate\\|otected\\)\\|ublic\\)\\)\\_>\\s-+") (forward-symbol 1)) (1 'zephir-property-name-face)) ("static" (save-excursion (re-search-forward "\\s-" nil 'noerror) (forward-char -1) (point)) (progn (re-search-backward "\\_<\\(p\\(?:r\\(?:ivate\\|otected\\)\\|ublic\\)\\)\\_>\\s-+") (forward-symbol 1)) (0 'zephir-keyword-face t)) ("\\<\\(?:get\\|set\\|toString\\)\\>" (save-excursion (re-search-forward "}" nil 'noerror) (forward-char -1) (point)) nil (0 'zephir-keyword-face t))))] 24) (#$ . 10378)) #@86 Imenu generic expression for `zephir-mode'. For more see `imenu-generic-expression'. (defvar zephir-imenu-generic-expression (byte-code "\300\301\302!\303BB\304\301 \305BB\306\301\307!\310BB\311\312 \313BB\314\312\315!\316BB\317\312\320!\321BB\322\312\323!\324BB\325\326\327BB\330\331 \332BB\257 \207" ["Namespaces" zephir-create-regexp-for-classlike "namespace" (2) "Classes" (2) "Interfaces" "interface" (2) "All Methods" zephir-create-regexp-for-function (2) "Public Methods" ("public") (2) "Protected Methods" ("protected") (2) "Private Methods" ("private") (2) "Properties" "^\\s-*\\(?:p\\(?:r\\(?:ivate\\|otected\\)\\|ublic\\)\\)\\s-+\\(\\$?\\<[A-Z_a-z][0-9A-Z_a-z]*\\>\\)\\s-*[;={]" (1) "Constants" zephir-create-regexp-for-constant (2)] 11) (#$ . 14473)) #@205 Syntax table in use in `zephir-mode' buffers. This includes setting ' and " as string delimiters, and setting up the comment syntax tokens handle both line style "//" and block style "/*" "*/" comments. (defvar zephir-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\303#\210\301\305\306#\210\301\307\306#\210\301\310\306#\210\301\311\306#\210\301\312\306#\210\301\313\306#\210\301\314\306#\210\301\315\306#\210\301\316\317#\210\301\320\317#\210\301\321\322#\210\301\323\324#\210\301\325\326#\210\301\327\330#\210\301\331\332#\210\301\333\334#\210\301\335\336#\210\301\337\340#\210\301\341\342#\210\207" [make-syntax-table modify-syntax-entry 95 "_" 36 43 "." 45 61 37 60 62 38 124 34 "\"" 39 10 "> b" 47 ". 124b" 42 ". 23" 40 "()" 41 ")(" 123 "(}" 125 "){" 91 "(]" 93 ")["] 5) (#$ . 15243)) (defvar zephir-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [zephir-mode-hook variable-documentation put "Hook run after entering Zephir mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp zephir-mode-map definition-name zephir-mode] 4) (defvar zephir-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [zephir-mode-abbrev-table zephir-mode-map variable-documentation put purecopy "Keymap for `zephir-mode'." boundp zephir-mode-syntax-table definition-name zephir-mode (lambda (def-tmp-var) (defvar zephir-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `zephir-mode'." (lambda (def-tmp-var) (defvar zephir-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `zephir-mode'." derived-mode-parent prog-mode] 5) #@481 Major mode derived from `prog-mode' by `define-derived-mode'. It inherits all of the parent's attributes, but has its own keymap, abbrev table and syntax table: `zephir-mode-map', `zephir-mode-abbrev-table' and `zephir-mode-syntax-table' which more-or-less shadow prog-mode's corresponding tables. In addition to any hooks its parent mode might have run, this mode runs the hook `zephir-mode-hook', as the final or penultimate step during initialization. \{zephir-mode-map} (defalias 'zephir-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R 0=\204R\326 \3250C#\210\327 !\210\330\f!\210 0\306\331!\210\307\306\332!\210\307\306\333!\210\307\306\334!\210\335\306\336!\210\337\306\340!\210\341 \306\342!\210\343\"\306\344!\210\345$\306\346!\2101&\306\347!\210\350'\306\351!\210\352)\306\353!\210\354+\306\355!\2102-)\356\357!\207" [delay-mode-hooks major-mode mode-name zephir-mode-map zephir-mode-syntax-table zephir-mode-abbrev-table make-local-variable t prog-mode zephir-mode "Zephir" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table comment-use-syntax comment-auto-fill-only-comments comment-multi-line comment-start "// " comment-start-skip "\\(/[*/]+\\)\\s-*" comment-end "" font-lock-syntactic-face-function zephir-font-lock-syntactic-face font-lock-defaults ((zephir-font-lock-keywords) nil nil) imenu-generic-expression beginning-of-defun-function zephir-beginning-of-defun end-of-defun-function zephir-end-of-defun indent-line-function zephir-indent-line indent-tabs-mode run-mode-hooks zephir-mode-hook local-abbrev-table zephir-imenu-generic-expression zephir-indent-tabs-mode] 5 (#$ . 17233) nil]) (byte-code "\300\301\302\"\210\303\304!\207" [add-to-list auto-mode-alist ("\\.zep\\'" . zephir-mode) provide zephir-mode] 3)