;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@64 Construct a regular expression for the word INNER. (fn INNER) (defalias 'zen-re-word #[257 "\300\301Q\207" ["\\<" "\\>"] 4 (#$ . 87)]) #@61 Construct a group regular expression for INNER. (fn INNER) (defalias 'zen-re-grab #[257 "\300\301Q\207" ["\\(" "\\)"] 4 (#$ . 230)]) #@73 Construct a non-capture group regular expression for INNER. (fn INNER) (defalias 'zen-re-group #[257 "\300\301Q\207" ["\\(?:" "\\)"] 4 (#$ . 371)]) (defconst zen-re-identifier "[[:word:]_][[:word:]_[:digit:]]*") (defconst zen-re-id-path (byte-code "\301\302P!\303Q\207" [zen-re-identifier zen-re-group "[[:space:]]*\\.[[:space:]]*" "*"] 4)) (defconst zen-builtin-types "@\\(?:Frame\\|Vector\\|Type\\(Of\\)?\\)") (defconst zen-re-align-mut-volatile-syntax (byte-code "\301\211\302\303Q!\304P!\260\207" [zen-re-identifier zen-re-group "volatile[[:space:]]\\|mut[[:space:]]\\|allowzero[[:space:]]align(\\(?:[[:space:]]*[[:digit:]]+[[:space:]]*\\|[[:space:]]*@alignOf(" "[[:space:]]*)\\))" "[[:space:]]*"] 5)) (defconst zen-re-array-type-syntax (byte-code "\302\303\304!\305\303\306P!\307\303 !\310\260\207" [zen-re-id-path zen-re-align-mut-volatile-syntax "\\[" zen-re-group "\\*c?\\|[[:digit:]]+" "?" ":[[:digit:]]+\\|:" "?\\][[:space:]]*" "*"] 7)) (defconst zen-re-pointer-type-syntax (byte-code "\301\302\303!\304\305\302\306!\304\260\207" [zen-re-align-mut-volatile-syntax "[*]" zen-re-group ":vtable[[:space:]]+" "?" "*" "vtable"] 7)) (defconst zen-re-const-error-syntax "[]*][[:space:]]*\\(\\\\)") (defconst zen-re-types-syntax (byte-code "\304\305\304!\306\304 !\307\260!\310\304\n\311 Q!Q\207" [zen-re-pointer-type-syntax zen-re-array-type-syntax zen-builtin-types zen-re-id-path zen-re-group "\\??" "?" "?[[:space:]]*" "*" "\\|"] 6)) (defconst zen-re-type-annotation (byte-code "\302!\303\302 !Q\207" [zen-re-identifier zen-re-types-syntax zen-re-grab "[[:space:]]*:[[:space:]]*"] 4)) #@75 Construct a regular expression for definitions of type DTYPE. (fn DTYPE) (defalias 'zen-re-definition #[257 "\301!\302\303!Q\207" [zen-re-identifier zen-re-word "[[:space:]]+" zen-re-grab] 5 (#$ . 1990)]) (defconst zen-re-catch-value (byte-code "\301\302!\303\304\305!\306\304!\304\301\307P!\310P!\304\305!\260\207" [zen-re-identifier zen-re-group "catch\\|else\\|=>\\|)" "[[:space:]]*" zen-re-grab "|" "\\*?" "[[:space:]]*,[[:space:]]*" "?"] 9)) (defconst zen-re-break-syntax (byte-code "\301\302!\301\303\304P!\305P!P\207" [zen-re-identifier zen-re-grab "break" zen-re-group "[[:space:]]+:" "?"] 5)) (defconst zen-re-label-syntax (byte-code "\301\302P!\303P\207" [zen-re-identifier zen-re-grab ":" "[[:space:]]*{"] 3)) (defconst zen-mode-syntax-table (byte-code "\300 \301\211\203\211@\302\303#\210A\266\202\202\210\302\304\305#\210\302\306\305#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\207" [make-syntax-table (43 45 42 47 37 38 124 61 33 60 62) modify-syntax-entry "." 39 "\"" 34 92 "\\" 47 ". 12" 10 ">"] 7)) (defconst zen-keywords '("const" "var" "extern" "packed" "export" "pub" "noalias" "inline" "mut" "comptime" "callconv" "volatile" "align" "linksection" "threadlocal" "allowzero" "struct" "enum" "union" "interface" "error" "return" "continue" "asm" "defer" "errdefer" "unreachable" "try" "catch" "async" "await" "suspend" "resume" "cancel" "if" "else" "switch" "and" "or" "orelse" "while" "for" "fn" "test" "usingnamespace" "nosuspend" "noinline" "deprecated")) (defconst zen-slice-range "\\.\\.") (defconst zen-int-range "\\.\\.\\.") (defconst zen-types '("i1" "u1" "i2" "u2" "i3" "u3" "i4" "u4" "i5" "u5" "i6" "u6" "i7" "u7" "i8" "u8" "i16" "u16" "i29" "u29" "i32" "u32" "i64" "u64" "i128" "u128" "isize" "usize" "f16" "f32" "f64" "f128" "c_short" "c_ushort" "c_int" "c_uint" "c_long" "c_ulong" "c_longlong" "c_ulonglong" "c_longdouble" "c_void" "comptime_int" "comptime_float" "bool" "void" "noreturn" "type" "anyerror" "anytype" "anyframe")) (defconst zen-constants '("true" "false" "null" "undefined" "this")) (defconst zen-electric-indent-chars '(59 44 41 93 125)) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317\306\301\320\321& \210\322\323\324\325\306\301%\210\322\326\327\330\306\301%\210\322\331\332\333\306\301%\210\322\334\335\336\306\301%\210\322\337\340\341\306\301%\210\322\342\343\344\306\301%\207" [custom-declare-group zen nil "Support for Zen." :link (url-link "https://www.zen-lang.org/") :group languages custom-declare-variable zen-indent-offset funcall function #[0 "\300\207" [4] 1] "Indent Zen code by this number of spaces." :type integer :safe integerp custom-declare-face zen-multiline-string-face ((t :inherit font-lock-string-face)) "Face for multiline string literals." zen-label-face ((t :inherit font-lock-builtin-face)) "Face for label." zen-catch-vertical-bar-face ((t :inherit font-lock-negation-char-face)) "Face for catch |x|." zen-slice-range-face ((t :inherit font-lock-keyword-face)) "Face for .." zen-int-range-face ((t :inherit font-lock-negation-char-face)) "Face for ..." zen-error-face ((t :inherit font-lock-warning-face :underline t)) "Face for *const, ]const, deprecated"] 10) (defvar zen-font-lock-keywords (byte-code "\306B\307\310B\311\312!\313B\311\314!\315B\311\316!\317B \320B\321\nP\322B\323 \324\"\325B\f\326B \327B\330B\331B\323 \324\"\332B\323!\324\"\320B\"\333B#\334B\335BBBBBBBBBBBBBBBB\207" [zen-re-const-error-syntax zen-builtin-types zen-re-identifier zen-keywords zen-re-break-syntax zen-re-label-syntax (1 'zen-error-face) "deprecated" 'zen-error-face zen-re-definition "fn" (1 font-lock-function-name-face) "var" (1 font-lock-variable-name-face) "const" (1 font-lock-variable-name-face) font-lock-type-face "@" font-lock-builtin-face regexp-opt symbols font-lock-keyword-face ((1 font-lock-keyword-face) (2 'zen-label-face)) (1 'zen-label-face) ((1 font-lock-variable-name-face) (2 font-lock-type-face)) ((1 'zen-catch-vertical-bar-face) (2 font-lock-variable-name-face) (3 font-lock-variable-name-face) (4 'zen-catch-vertical-bar-face)) font-lock-constant-face 'zen-int-range-face 'zen-slice-range-face (("[!.]+" . font-lock-negation-char-face)) zen-re-type-annotation zen-re-catch-value zen-constants zen-types zen-int-range zen-slice-range] 17)) #@29 Return paren nesting level. (defalias 'zen-paren-nesting-level #[0 "\300 @\207" [syntax-ppss] 1 (#$ . 6306)]) #@35 Are we currently inside a string? (defalias 'zen-currently-in-str #[0 "\300\301 8\207" [3 syntax-ppss] 2 (#$ . 6422)]) #@51 Are we at the start of current string or comment? (defalias 'zen-start-of-current-str-or-comment #[0 "\300\301 8\207" [8 syntax-ppss] 2 (#$ . 6547)]) #@59 Used for skipping backwards past whitespace and comments. (defalias 'zen-skip-backwards-past-whitespace-and-comments #[0 "\300 \211\205\301 ?\205\211b\262\204\302\303!\304U?\205\202\207" [zen-start-of-current-str-or-comment zen-currently-in-str skip-syntax-backward " >" 0] 2 (#$ . 6703)]) #@38 Indent line function for `zen-mode'. (defalias 'zen-mode-indent-line #[0 "\212\301 \210\212\302\303!\203\304u\210\202\305 )\211\306X\203\306\2021\212\305 Y\203/\307 \210\301 \210\202i)\306X\203;\211\202Q\212\307 \210\304u\210\302\310!?\205Ji)\206Q\211\\\302\311!?\205j\212\312 \210`\313V\205i\314u\210\302\315!?)\211\203v\\\266\204\202y\266\204)i\316 X\203\205\317!\207\212\317!)\207" [zen-indent-offset back-to-indentation looking-at "[]})]" nil zen-paren-nesting-level 0 backward-up-list " *\\(//[^\n]*\\)?\n" "[]});]" zen-skip-backwards-past-whitespace-and-comments 1 -1 "[,;([{}]" current-indentation indent-line-to] 6 (#$ . 7010) nil]) #@120 Check if we're in a multiline string literal; if we're not, do nothing. Return at EOF or when END is found. (fn END) (defalias 'zen-syntax-propertize-to-newline-if-in-multiline-str #[257 "\300 \205G\301 \212\211b\210\302\303!)\205E\212\211b\210\304\305\306#)\203@\307\225T\307\224\307\224W\2034\310\311\312$\210\310\211T\311\313$\266\202A\211b\262\262\207" [zen-currently-in-str zen-start-of-current-str-or-comment looking-at "\\\\\\\\" re-search-forward "\n" t 0 put-text-property syntax-table (1) (15)] 11 (#$ . 7685)]) #@12 (fn A B) (defalias 'zen-equal-nonnull #[514 "\205 \211\205 U\207" [] 4 (#$ . 8231)]) #@119 Function for applying `syntax-table' properties to a specified stretch of text between START and END. (fn START END) (defalias 'zen-syntax-propertize #[514 "b\210\300!\210`b\210`W\205I\301\302\303#\205I\304\224\203\f\305\304\224\304\225\306\307$\210\310\311\224\312 \"\203<\311\225b\210\300!\210\202\f\305\311\224\311\224T\306\313$\210\202\f\207" [zen-syntax-propertize-to-newline-if-in-multiline-str re-search-forward "\\(\\\\\\)\\\\" t 1 put-text-property syntax-table (15) zen-equal-nonnull 0 zen-start-of-current-str-or-comment (9)] 9 (#$ . 8330)]) #@103 Determines which face to use for a given STATE syntactic element (a string or a comment). (fn STATE) (defalias 'zen-mode-syntactic-face-function #[257 "\3008\203\212\3018b\210\302\303!\203\304\202\305)\207\212\3018b\210\302\306!\203)\307\202*\310)\207" [3 8 looking-at "\\\\\\\\" zen-multiline-string-face font-lock-string-face "///[^/]" font-lock-doc-face font-lock-comment-face] 3 (#$ . 8904)]) #@86 Construct a regular expression for strucutres definitions of type STYPE. (fn STYPE) (defalias 'zen-re-structure-def-imenu #[257 "\301\302!\303\304!\305\301!\260\207" [zen-re-identifier zen-re-word "const" "[[:space:]]+" zen-re-grab ".*"] 7 (#$ . 9319)]) (defvar zen-imenu-generic-expression (byte-code "\300\301\302\303\"\304\305\306!\307BBC\"\207" [append mapcar #[257 "\300!\301!\302E\207" [capitalize zen-re-structure-def-imenu 1] 4 "\n\n(fn X)"] ("enum" "struct" "union" "interface") "Fn" zen-re-definition "fn" (1)] 5)) (defvar zen-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [zen-mode-hook variable-documentation put "Hook run after entering Zen mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp zen-mode-map definition-name zen-mode] 4) (defvar zen-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" [zen-mode-abbrev-table zen-mode-map variable-documentation put purecopy "Keymap for `zen-mode'." boundp zen-mode-syntax-table definition-name zen-mode (lambda (def-tmp-var) (defvar zen-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `zen-mode'." (lambda (def-tmp-var) (defvar zen-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `zen-mode'." derived-mode-parent prog-mode] 5) #@232 A major mode for the Zen programming language. In addition to any hooks its parent mode `prog-mode' might have run, this mode runs the hook `zen-mode-hook', as the final or penultimate step during initialization. \{zen-mode-map} (defalias 'zen-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 *=\204R\326 \325*C#\210\327 !\210\330\f!\210 *\306\331!\210\332\306\333!\210\334\306\335!\210\336+\337\335!\205z\"\306\340!\210\341 \306\342!\210\343\"\306\344!\210\345$\306\346!\210,&\347-)\350\351!\207" [delay-mode-hooks major-mode mode-name zen-mode-map zen-mode-syntax-table zen-mode-abbrev-table make-local-variable t prog-mode zen-mode "Zen" 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-start "// " comment-end "" electric-indent-chars append boundp indent-line-function zen-mode-indent-line indent-tabs-mode nil syntax-propertize-function zen-syntax-propertize imenu-generic-expression (zen-font-lock-keywords nil nil nil nil (font-lock-syntactic-face-function . zen-mode-syntactic-face-function)) run-mode-hooks zen-mode-hook local-abbrev-table zen-electric-indent-chars zen-imenu-generic-expression font-lock-defaults] 5 (#$ . 10969) nil]) (byte-code "\300\301\302\"\210\303\304!\207" [add-to-list auto-mode-alist ("\\.zen\\'" . zen-mode) provide zen-mode] 3)