-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathespresso.elc
556 lines (535 loc) · 97.8 KB
/
espresso.elc
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
;ELC
;;; Compiled by shant@ultraio on Sat Sep 27 19:36:32 2014
;;; from file /home/shant/.emacs.d/espresso.el
;;; in Emacs version 24.3.1
;;; with all optimizations.
;;; This file contains utf-8 non-ASCII characters,
;;; and so cannot be loaded into Emacs 22 or earlier.
(and (boundp 'emacs-version)
(< (aref emacs-version (1- (length emacs-version))) ?A)
(string-lessp emacs-version "23")
(error "`%s' was compiled for Emacs 23 or later" #$))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310\311\312#\210\300\313\311\312#\207" [require cc-mode font-lock newcomment imenu etags thingatpt easymenu moz nil t json] 4)
#@67 Matches the first character of a Espresso identifier. No grouping
(defconst espresso--name-start-re "[a-zA-Z_$]" (#$ . 737))
(defconst espresso--stmt-delim-chars "^;{}?:")
#@47 Matches a Javascript identifier. No grouping.
(defconst espresso--name-re (concat espresso--name-start-re "\\(?:\\s_\\|\\sw\\)*") (#$ . 915))
#@41 Matches a Javascript object field start
(defconst espresso--objfield-re (concat espresso--name-re ":") (#$ . 1063))
#@54 Matches a dot-separated sequence of Javascript names
(defconst espresso--dotted-name-re (concat espresso--name-re "\\(?:\\." espresso--name-re "\\)*") (#$ . 1185))
#@31 Matches a C preprocessor name
(defconst espresso--cpp-name-re espresso--name-re (#$ . 1355))
#@177 Regexp matching the prefix of a cpp directive including the directive
name, or nil in languages without preprocessor support. The first
submatch surrounds the directive name.
(defconst espresso--opt-cpp-start "^\\s-*#\\s-*\\([[:alnum:]]+\\)" (#$ . 1455))
#@187 Regexp matching an old-fashioned explicit prototype "method"
declaration. Group 1 is a (possibly-dotted) class name, group 2
is a method name, and group 3 is the 'function' keyword.
(defconst espresso--plain-method-re (concat "^\\s-*?\\(" espresso--dotted-name-re "\\)\\.prototype" "\\.\\(" espresso--name-re "\\)\\s-*?=\\s-*?\\(function\\)\\_>") (#$ . 1718))
#@117 Regexp matching an old-fashioned explicit prototype "class"
declaration, as in Class.prototype = { method1: ...}
(defconst espresso--plain-class-re (concat "^\\s-*\\(" espresso--dotted-name-re "\\)\\.prototype" "\\s-*=\\s-*{") (#$ . 2089))
#@34 var NewClass = BaseClass.extend(
(defconst espresso--mp-class-decl-re (concat "^\\s-*var\\s-+" #1="\\(" espresso--name-re "\\)" "\\s-*=\\s-*" #1# espresso--dotted-name-re "\\)\\.extend\\(?:Final\\)?\\s-*(\\s-*{?\\s-*$") (#$ . 2338))
#@31 var NewClass = Class.create()
(defconst espresso--prototype-obsolete-class-decl-re (concat "^\\s-*\\(?:var\\s-+\\)?" "\\(" espresso--dotted-name-re "\\)" "\\s-*=\\s-*Class\\.create()") (#$ . 2577))
(defconst espresso--prototype-objextend-class-decl-re-1 (concat "^\\s-*Object\\.extend\\s-*(" "\\(" espresso--dotted-name-re "\\)" "\\s-*,\\s-*{"))
(defconst espresso--prototype-objextend-class-decl-re-2 (concat "^\\s-*\\(?:var\\s-+\\)?" "\\(" espresso--dotted-name-re "\\)" "\\s-*=\\s-*Object\\.extend\\s-*("))
#@31 var NewClass = Class.create({
(defconst espresso--prototype-class-decl-re (concat "^\\s-*\\(?:var\\s-+\\)?" "\\(" espresso--name-re "\\)" "\\s-*=\\s-*Class\\.create\\s-*(\\s-*" "\\(?:\\(" espresso--dotted-name-re "\\)\\s-*,\\s-*\\)?{?") (#$ . 3093))
(defconst espresso--dojo-class-decl-re (concat "^\\s-*dojo\\.declare\\s-*(\"\\(" espresso--dotted-name-re "\\)"))
#@35 ExtJS class declaration (style 1)
(defconst espresso--extjs-class-decl-re-1 (concat "^\\s-*Ext\\.extend\\s-*(" "\\s-*\\(" espresso--dotted-name-re #1="\\)" "\\s-*,\\s-*\\(" espresso--dotted-name-re #1#) (#$ . 3463))
#@35 ExtJS class declaration (style 2)
(defconst espresso--extjs-class-decl-re-2 (concat "^\\s-*\\(?:var\\s-+\\)?" #1="\\(" espresso--name-re #2="\\)" "\\s-*=\\s-*Ext\\.extend\\s-*(\\s-*" #1# espresso--dotted-name-re #2#) (#$ . 3685))
#@29 MochiKit class declaration?
(defconst espresso--mochikit-class-re (concat "^\\s-*MochiKit\\.Base\\.update\\s-*(\\s-*" "\\(" espresso--dotted-name-re "\\)") (#$ . 3921))
(defconst espresso--dummy-class-style '(:name "[Automatically Generated Class]"))
#@761 A list of class definition styles.
A class definition style is a plist with the following keys:
:name is a human-readable name of the class type
:class-decl is a regular expression giving the start of the
class. Its first group must match the name of its class. If there
is a parent class, the second group should match, and it should
be the name of the class.
If :prototype is present and non-nil, the parser will merge
declarations for this constructs with others at the same lexical
level that have the same name. Otherwise, multiple definitions
will create multiple top-level entries. Don't use :prototype
unnecessarily: it has an associated cost in performance.
If :strip-prototype is present and non-nil, then if the class
name as matched contains
(defconst espresso--class-styles (byte-code "\306\307\310\311BBBB\306\312\310 \313BBBB\306\314\310\n\315BBBB\306\316\310\317BBBB\306\320\310\f\321BBBB\306\322\310\323BBBB\306\324\310\325BBBB\306\326\310\327BBBB\306\330\310\331BBBB\306\332\310\333BBBB\257\n\207" [espresso--plain-class-re espresso--mochikit-class-re espresso--prototype-obsolete-class-decl-re espresso--prototype-class-decl-re espresso--prototype-objextend-class-decl-re-1 espresso--prototype-objextend-class-decl-re-2 :name "Plain" :class-decl (:prototype t :contexts (toplevel) :framework javascript) "MochiKit" (:prototype t :contexts (toplevel) :framework mochikit) "Prototype (Obsolete)" (:contexts (toplevel) :framework prototype) "Prototype (Modern)" (:contexts (toplevel) :framework prototype) "Prototype (Object.extend)" (:prototype t :contexts (toplevel) :framework prototype) "Prototype (Object.extend) 2" (:prototype t :contexts (toplevel) :framework prototype) "Dojo" (:contexts (toplevel) :framework dojo) "ExtJS (style 1)" (:prototype t :contexts (toplevel) :framework extjs) "ExtJS (style 2)" (:contexts (toplevel) :framework extjs) "Merrill Press" (:contexts (toplevel) :framework merrillpress) espresso--dojo-class-decl-re espresso--extjs-class-decl-re-1 espresso--extjs-class-decl-re-2 espresso--mp-class-decl-re] 14) (#$ . 4179))
#@38 List of available frameworks symbols
(defconst espresso--available-frameworks (byte-code "\305 \305\305\305\n:\203+ \n@\306\307\"\f>\203 \202% \fC\244\nA\202\n -\207" [available-frameworks espresso--class-styles #1=#:--cl-var-- style framework nil plist-get :framework] 3) (#$ . 6272))
#@104 Regular expression matching the start of a function header. Match group 1
is the name of the function.
(defconst espresso--function-heading-1-re (concat "^\\s-*function\\s-+\\(" espresso--name-re "\\)") (#$ . 6579))
#@129 Regular expression matching the start of a function entry in
an associative array. Match group 1 is the name of the function.
(defconst espresso--function-heading-2-re (concat "^\\s-*\\(" espresso--name-re "\\)\\s-*:\\s-*function\\_>") (#$ . 6802))
#@78 Matches a line in the form var MUMBLE = function. Match group
1 is MUMBLE.
(defconst espresso--function-heading-3-re (concat "^\\s-*\\(?:var\\s-+\\)?\\(" espresso--dotted-name-re "\\)" "\\s-*=\\s-*function\\_>") (#$ . 7059))
#@126 Regular expression matching a CPP macro definition up to the opening
parenthesis. Match group 1 is the name of the function.
(defconst espresso--macro-decl-re (concat "^\\s-*#\\s-*define\\s-+\\(" espresso--cpp-name-re "\\)\\s-*(") (#$ . 7293))
#@88 Like regexp-opt, but surround the optimized regular expression
with `\\_<' and `\\_>'.
(defalias 'espresso--regexp-opt-symbol #[(list) "\301\302\303\"\304Q\207" [list "\\_<" regexp-opt t "\\_>"] 4 (#$ . 7543)])
#@53 Regular expression matching any JavaScript keyword.
(defconst espresso--keyword-re (espresso--regexp-opt-symbol '("abstract" "break" "case" "catch" "class" "const" "continue" "debugger" "default" "delete" "do" "else" "enum" "export" "extends" "final" "finally" "for" "function" "goto" "if" "implements" "import" "in" "instanceof" "interface" "native" "new" "package" "private" "protected" "public" "return" "static" "super" "switch" "synchronized" "throw" "throws" "transient" "try" "typeof" "var" "void" "let" "yield" "volatile" "while" "with")) (#$ . 7761))
#@64 Regular expression matching any predefined type in JavaScript.
(defconst espresso--basic-type-re (espresso--regexp-opt-symbol '("boolean" "byte" "char" "double" "float" "int" "long" "short" "void")) (#$ . 8327))
#@70 Regular expression matching any future reserved words in JavaScript.
(defconst espresso--constant-re (espresso--regexp-opt-symbol '("false" "null" "undefined" "Infinity" "NaN" "true" "arguments" "this")) (#$ . 8545))
#@22 Level one font lock.
(defconst espresso--font-lock-keywords-1 (byte-code "\303\304 E\n\304 EE\207" [espresso--function-heading-1-re font-lock-function-name-face espresso--function-heading-2-re "\\_<import\\_>" 1] 5) (#$ . 8768))
#@22 Level two font lock.
(defconst espresso--font-lock-keywords-2 (byte-code "\306 \307\nE\310\311\312\312\307\302D\257\fBBF\"\207" [espresso--font-lock-keywords-1 espresso--keyword-re font-lock-keyword-face espresso--basic-type-re font-lock-type-face espresso--constant-re append 1 "\\_<for\\_>" "\\s-+\\(each\\)\\_>" nil font-lock-constant-face] 9) (#$ . 9004))
(byte-code "\301\302\303\304#\210\305\203 \301\302\306\307\310!!#\210)\301\207" [file put espresso--pitem-children compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\304\304&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block espresso--pitem-children (car cl-x)) nil] 7] "/home/shant/.emacs.d/espresso.el" compiler-macro-file purecopy file-name-nondirectory] 6)
(defalias 'espresso--pitem-children #[(cl-x) "@\207" [cl-x] 1])
(byte-code "\301\302\303\304#\210\301\305\306\307#\210\310\203 \301\305\311\312\313!!#\210)\301\207" [file put espresso--pitem-children gv-expander #[(_cl-do _cl-x) "\300\301\302\"\207" [error "%s is a read-only slot" espresso--pitem-children] 3] espresso--pitem-paren-depth compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\304\304&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block espresso--pitem-paren-depth (nth 1 cl-x)) nil] 7] "/home/shant/.emacs.d/espresso.el" compiler-macro-file purecopy file-name-nondirectory] 6)
(defalias 'espresso--pitem-paren-depth #[(cl-x) "\3018\207" [cl-x 1] 2])
(byte-code "\301\302\303\304#\210\301\305\306\307#\210\310\203 \301\305\311\312\313!!#\210)\301\207" [file put espresso--pitem-paren-depth gv-expander #[(_cl-do _cl-x) "\300\301\302\"\207" [error "%s is a read-only slot" espresso--pitem-paren-depth] 3] espresso--pitem-type compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\304\304&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block espresso--pitem-type (nth 2 cl-x)) nil] 7] "/home/shant/.emacs.d/espresso.el" compiler-macro-file purecopy file-name-nondirectory] 6)
(defalias 'espresso--pitem-type #[(cl-x) "\3018\207" [cl-x 2] 2])
(byte-code "\301\302\303\304#\210\301\305\306\307#\210\310\203 \301\305\311\312\313!!#\210)\301\207" [file put espresso--pitem-type gv-expander #[(_cl-do _cl-x) "\300\301\302\"\207" [error "%s is a read-only slot" espresso--pitem-type] 3] espresso--pitem-h-begin compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\304\304&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block espresso--pitem-h-begin (nth 3 cl-x)) nil] 7] "/home/shant/.emacs.d/espresso.el" compiler-macro-file purecopy file-name-nondirectory] 6)
(defalias 'espresso--pitem-h-begin #[(cl-x) "\3018\207" [cl-x 3] 2])
(byte-code "\301\302\303\304#\210\301\305\306\307#\210\310\203 \301\305\311\312\313!!#\210)\301\207" [file put espresso--pitem-h-begin gv-expander #[(_cl-do _cl-x) "\300\301\302\"\207" [error "%s is a read-only slot" espresso--pitem-h-begin] 3] espresso--pitem-name compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\304\304&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block espresso--pitem-name (nth 4 cl-x)) nil] 7] "/home/shant/.emacs.d/espresso.el" compiler-macro-file purecopy file-name-nondirectory] 6)
(defalias 'espresso--pitem-name #[(cl-x) "\3018\207" [cl-x 4] 2])
(byte-code "\301\302\303\304#\210\301\305\306\307#\210\310\203 \301\305\311\312\313!!#\210)\301\207" [file put espresso--pitem-name gv-expander #[(_cl-do _cl-x) "\300\301\302\"\207" [error "%s is a read-only slot" espresso--pitem-name] 3] espresso--pitem-b-end compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\304\304&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block espresso--pitem-b-end (nth 5 cl-x)) nil] 7] "/home/shant/.emacs.d/espresso.el" compiler-macro-file purecopy file-name-nondirectory] 6)
(defalias 'espresso--pitem-b-end #[(cl-x) "\3018\207" [cl-x 5] 2])
(defalias 'copy-espresso--pitem #[(x) "\301!\207" [x copy-sequence] 2])
(byte-code "\301\302\303\304#\210\305\203 \301\302\306\307\310!!#\210)\301\207" [file put make-espresso--pitem compiler-macro #[(cl-whole &rest #1=#:--cl-rest--) "\306>A@\307>A@\310>A@\311>A@\312>A@\313>A@\203V @\314>\203>