-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.elc
More file actions
executable file
·142 lines (136 loc) · 17.2 KB
/
Copy pathjavascript.elc
File metadata and controls
executable file
·142 lines (136 loc) · 17.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
;ELC
;;; Compiled by Administrator@ALTU on Mon May 19 20:17:07 2008
;;; from file c:/emacs/javascript.el
;;; in Emacs version 23.0.0.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
(< (aref emacs-version (1- (length emacs-version))) ?A)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19.29")))
(error "`javascript.el' was compiled for Emacs 19.29 or later"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313&\207" [require cc-mode font-lock newcomment custom-declare-group javascript nil "Customization variables for `javascript-mode'." :tag "JavaScript" :group languages] 8)
#@45 Number of spaces for each indentation step.
(custom-declare-variable 'javascript-indent-level '4 '(#$ . 821) :type 'integer :group 'javascript)
#@133 Automatic indentation with punctuation characters. If non-nil, the
current line is indented when certain punctuations are inserted.
(custom-declare-variable 'javascript-auto-indent-flag 't '(#$ . 972) :type 'boolean :group 'javascript)
#@33 Keymap used in JavaScript mode.
(defvar javascript-mode-map nil (#$ . 1214))
(byte-code "\204 \302 \203 \303\304\305\"\210\302\207" [javascript-mode-map javascript-auto-indent-flag make-sparse-keymap mapc #[(key) "\302 \303#\207" [javascript-mode-map key define-key javascript-insert-and-indent] 4] ("{" "}" "(" ")" ":" ";" ",")] 3)
#@132 Run command bound to key and indent current line. Runs the command
bound to KEY in the global keymap and indents the current line.
(defalias 'javascript-insert-and-indent #[(key) "\301\302\303 \"!\210\304 \207" [key call-interactively lookup-key current-global-map indent-according-to-mode] 4 (#$ . 1560) (list (this-command-keys))])
#@39 Syntax table used in JavaScript mode.
(defvar javascript-mode-syntax-table (byte-code "\301 \302!\210\303\304\305#\210)\207" [table make-syntax-table c-populate-syntax-table modify-syntax-entry 95 "w"] 4) (#$ . 1901))
#@48 Auxiliary function for `js-re-search-forward'.
(defalias 'js-re-search-forward-inner #[(regexp &optional bound count) "\305e\n\306V\203^ \307\f\"\210\310`\"\311 8\203. \307\312\313\311 8!P\212\305\210`)\314#\210\202Y \315 8\203: \305y\210\202Y \316 8\204O `Sf\317=\203V \305f\320=\203V \307\321!\210\202Y \nS`\202 *`\207" [saved-point parse count regexp bound nil 0 re-search-forward parse-partial-sexp 3 "\\([^\\]\\|^\\)" string t 7 4 47 42 "\\*/"] 5 (#$ . 2129)])
#@145 Search forward but ignore strings and comments. Invokes
`re-search-forward' but treats the buffer as if strings and
comments have been removed.
(defalias 'js-re-search-forward #[(regexp &optional bound noerror count) "`\204 \303\202 \304W\203 \305\202 \304V\205 \306\307\310\311\217*\207" [count search-expr saved-point (js-re-search-forward-inner regexp bound 1) 0 (js-re-search-backward-inner regexp bound (- count)) (js-re-search-forward-inner regexp bound count) err (eval search-expr) ((search-failed (byte-code "b\210 ?\205 \303\304\n!!\207" [saved-point noerror err error error-message-string] 3)))] 3 (#$ . 2611)])
#@49 Auxiliary function for `js-re-search-backward'.
(defalias 'js-re-search-backward-inner #[(regexp &optional bound count) "\305e\n\306V\203s \307\f\"\210`eV\203# \212\310u\210\311\312!)\203# \305u\210\313`\"\314 8\203B \307\315\316\314 8!P\212\317 \210`)\320#\210\202 \321 8\203P \322 8b\210\202 \323 8\204e `Sf\324=\203l \305f\325=\203l \307\326!\210\202 \nS\211\202 *`\207" [saved-point parse count regexp bound nil 0 re-search-backward -1 looking-at "/[/*]" parse-partial-sexp 3 "\\([^\\]\\|^\\)" string beginning-of-line t 7 8 4 47 42 "/\\*"] 6 (#$ . 3252)])
#@147 Search backward but ignore strings and comments. Invokes
`re-search-backward' but treats the buffer as if strings and
comments have been removed.
(defalias 'js-re-search-backward #[(regexp &optional bound noerror count) "`\204 \303\202 \304W\203 \305\202 \304V\205 \306\307\310\311\217*\207" [count search-expr saved-point (js-re-search-backward-inner regexp bound 1) 0 (js-re-search-forward-inner regexp bound (- count)) (js-re-search-backward-inner regexp bound count) err (eval search-expr) ((search-failed (byte-code "b\210 ?\205 \303\304\n!!\207" [saved-point noerror err error error-message-string] 3)))] 3 (#$ . 3830)])
#@74 Return non-nil if point is inside a continued variable declaration
list.
(defalias 'js-continued-var-decl-list-p #[nil "\212\301\302\303\304#)\211\205 \212\305\306\304#)\205 \212\301\307\304#)?)\207" [start js-re-search-backward "\\<var\\>" nil t re-search-backward "\n" ";\\|[^, ][ ]*\\(/[/*]\\|$\\)"] 5 (#$ . 4475) nil])
#@62 Return non-nil if point is inside a function parameter list.
(defalias 'js-inside-param-list-p #[nil "\300\301\302\217\207" [err (byte-code "\212\300\301!\210\302\303!\205 \301v\210\302\304!\206 \301v\210\302\304!)\207" [up-list -1 looking-at "(" "function"] 2) ((error))] 3 (#$ . 4811)])
#@61 Regular expression matching the start of a function header.
(defconst js-function-heading-1-re "^[ ]*function[ ]+\\(\\w+\\)" (#$ . 5108))
#@86 Regular expression matching the start of a function entry in
an associative array.
(defconst js-function-heading-2-re "^[ ]*\\(\\w+\\)[ ]*:[ ]*function\\>" (#$ . 5254))
#@53 Regular expression matching any JavaScript keyword.
(defconst js-keyword-re "\\<\\(abstract\\|break\\|c\\(?:a\\(?:se\\|tch\\)\\|lass\\|on\\(?:st\\|tinue\\)\\)\\|d\\(?:e\\(?:bugger\\|fault\\|lete\\)\\|o\\)\\|e\\(?:lse\\|num\\|x\\(?:port\\|tends\\)\\)\\|f\\(?:inal\\(?:ly\\)?\\|or\\|unction\\)\\|goto\\|i\\(?:mp\\(?:lements\\|ort\\)\\|n\\(?:stanceof\\|terface\\)\\|[fn]\\)\\|n\\(?:ative\\|ew\\)\\|p\\(?:ackage\\|r\\(?:ivate\\|otected\\)\\|ublic\\)\\|return\\|s\\(?:tatic\\|uper\\|witch\\|ynchronized\\)\\|t\\(?:h\\(?:is\\|rows?\\)\\|r\\(?:ansient\\|y\\)\\|ypeof\\)\\|v\\(?:ar\\|o\\(?:id\\|latile\\)\\)\\|w\\(?:hile\\|ith\\)\\)\\>" (#$ . 5434))
#@64 Regular expression matching any predefined type in JavaScript.
(defconst js-basic-type-re "\\<\\(b\\(?:oolean\\|yte\\)\\|char\\|double\\|float\\|int\\|long\\|short\\|void\\)\\>" (#$ . 6082))
#@70 Regular expression matching any future reserved words in JavaScript.
(defconst js-constant-re "\\<\\(false\\|null\\|true\\)\\>" (#$ . 6279))
#@22 Level one font lock.
(defconst js-font-lock-keywords-1 (byte-code "\304\305 E\n\305 E\306\305EF\207" [js-function-heading-1-re font-lock-function-name-face js-function-heading-2-re font-lock-string-face "\\<import\\>" 1 "[=(][ ]*\\(/.*?[^\\]/\\w*\\)"] 6) (#$ . 6426))
#@22 Level two font lock.
(defconst js-font-lock-keywords-2 (byte-code "\306 \307\nE\fBBE\"\207" [js-font-lock-keywords-1 js-keyword-re font-lock-keyword-face js-basic-type-re font-lock-type-face js-constant-re append 1 font-lock-constant-face] 6) (#$ . 6703))
#@24 Level three font lock.
(defconst js-font-lock-keywords-3 (byte-code "\302\303 P\304\305\211\306FD\307\304\310\311\312FD\313\314\315\316\317FD\320\321\322\323\324FDF\"\207" [js-font-lock-keywords-2 js-basic-type-re append "\\<\\(const\\|var\\)\\>\\|" "\\(\\w+\\)[ ]*\\([=;].*\\|,\\|/[/*]\\|$\\)" nil (1 font-lock-variable-name-face) "^[ ]*\\w+[ ]*\\([,;=]\\|/[/*]\\|$\\)" (if (save-excursion (backward-char) (js-continued-var-decl-list-p)) (backward-word 1) (end-of-line)) (end-of-line) (1 font-lock-variable-name-face) "\\<function\\>\\([ ]+\\w+\\)?[ ]*([ ]*\\w" "\\(\\w+\\)\\([ ]*).*\\)?" (backward-char) (end-of-line) (1 font-lock-variable-name-face) "^[ ]*\\w+[ ]*[,)]" "\\w+" (if (save-excursion (backward-char) (js-inside-param-list-p)) (backward-word 1) (end-of-line)) (end-of-line) (0 font-lock-variable-name-face)] 10) (#$ . 6970))
#@27 See `font-lock-keywords'.
(defconst js-font-lock-keywords '(js-font-lock-keywords-3 js-font-lock-keywords-1 js-font-lock-keywords-2 js-font-lock-keywords-3) (#$ . 7826))
#@90 Regular expression matching keywords that are optionally
followed by an opening brace.
(defconst js-possibly-braceless-keyword-re "\\<\\(catch\\|do\\|else\\|f\\(?:inally\\|or\\)\\|if\\|try\\|w\\(?:hile\\|ith\\)\\)\\>" (#$ . 8002))
#@91 Regular expression matching operators that affect indentation
of continued expressions.
(defconst js-indent-operator-re "[-+*/%<>=&^|?:]\\([^-+*/]\\|$\\)\\|\\<\\(in\\(?:stanceof\\)?\\)\\>" (#$ . 8241))
#@74 Return non-nil if text after point is an operator (that is not
a comma).
(defalias 'js-looking-at-operator-p #[nil "\302 \303\216\304 !\205 \304\305!?\206 \212\306\307\310\311#\205 \304\312!)*\207" [save-match-data-internal js-indent-operator-re match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) looking-at ":" js-re-search-backward "[?:{]\\|\\<case\\>" nil t "?"] 4 (#$ . 8451)])
#@62 Returns non-nil if the current line continues an expression.
(defalias 'js-continued-expression-p #[nil "\212\300 \210\301 \2066 \302\303\304\305#\2056 \306\304x\210\307u\210`eV\2056 \212\307u\210\310\311!)?\2056 \301 \2056 \307u\210\310\312!?)\207" [back-to-indentation js-looking-at-operator-p js-re-search-backward "\n" nil t " " -1 looking-at "[/*]/" "++\\|--\\|/[/*]"] 4 (#$ . 8889)])
#@233 Returns non-nil if word after point is `while' of a do-while
statement, else returns nil. A braceless do-while statement
spanning several lines requires that the start of the loop is
indented to the same column as the current line.
(defalias 'js-end-of-do-while-loop-p #[nil "\212\302 \303\216\304\305!\205Z \212\306\307x\210\304\306!)\203&