829
|
1 /* start of AUTO matically checked vim: set ts=4 : */
|
7
|
2 {
|
|
3 if (test)
|
|
4 cmd1;
|
|
5 cmd2;
|
|
6 }
|
|
7
|
|
8 {
|
|
9 if (test)
|
|
10 cmd1;
|
|
11 else
|
|
12 cmd2;
|
|
13 }
|
|
14
|
|
15 {
|
|
16 if (test)
|
|
17 {
|
|
18 cmd1;
|
|
19 cmd2;
|
|
20 }
|
|
21 }
|
|
22
|
|
23 {
|
|
24 if (test)
|
|
25 {
|
|
26 cmd1;
|
|
27 else
|
|
28 }
|
|
29 }
|
|
30
|
|
31 {
|
|
32 while (this)
|
|
33 if (test)
|
|
34 cmd1;
|
|
35 cmd2;
|
|
36 }
|
|
37
|
|
38 {
|
|
39 while (this)
|
|
40 if (test)
|
|
41 cmd1;
|
|
42 else
|
|
43 cmd2;
|
|
44 }
|
|
45
|
|
46 {
|
|
47 if (test)
|
|
48 {
|
|
49 cmd;
|
|
50 }
|
|
51
|
|
52 if (test)
|
|
53 cmd;
|
|
54 }
|
|
55
|
|
56 {
|
|
57 if (test) {
|
|
58 cmd;
|
|
59 }
|
|
60
|
|
61 if (test) cmd;
|
|
62 }
|
|
63
|
|
64 {
|
|
65 cmd1;
|
|
66 for (blah)
|
|
67 while (this)
|
|
68 if (test)
|
|
69 cmd2;
|
|
70 cmd3;
|
|
71 }
|
|
72
|
|
73 {
|
|
74 cmd1;
|
|
75 for (blah)
|
|
76 while (this)
|
|
77 if (test)
|
|
78 cmd2;
|
|
79 cmd3;
|
|
80
|
|
81 if (test)
|
|
82 {
|
|
83 cmd1;
|
|
84 cmd2;
|
|
85 cmd3;
|
|
86 }
|
|
87 }
|
|
88
|
|
89
|
|
90 /* Test for 'cindent' do/while mixed with if/else: */
|
|
91
|
|
92 {
|
|
93 do
|
|
94 if (asdf)
|
|
95 asdfasd;
|
|
96 while (cond);
|
|
97
|
|
98 do
|
|
99 if (asdf)
|
|
100 while (asdf)
|
|
101 asdf;
|
|
102 while (asdf);
|
|
103 }
|
|
104
|
|
105 /* Test for 'cindent' with two ) on a continuation line */
|
|
106 {
|
|
107 if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d
|
|
108 aal;sdkjf ( ;asldfkja;sldfk
|
|
109 al;sdjfka ;slkdf ) sa;ldkjfsa dlk;)
|
|
110 line up here;
|
|
111 }
|
|
112
|
|
113
|
|
114 /* C++ tests: */
|
|
115
|
|
116 // foo() these three lines should remain in column 0
|
|
117 // {
|
|
118 // }
|
|
119
|
|
120 /* Test for continuation and unterminated lines: */
|
|
121 {
|
|
122 i = 99 + 14325 +
|
|
123 21345 +
|
|
124 21345 +
|
|
125 21345 + ( 21345 +
|
|
126 21345) +
|
|
127 2345 +
|
|
128 1234;
|
|
129 c = 1;
|
|
130 }
|
|
131
|
|
132 /*
|
|
133 testje for indent with empty line
|
|
134
|
|
135 here */
|
|
136
|
|
137 {
|
|
138 if (testing &&
|
|
139 not a joke ||
|
|
140 line up here)
|
|
141 hay;
|
|
142 if (testing &&
|
|
143 (not a joke || testing
|
|
144 )line up here)
|
|
145 hay;
|
|
146 if (testing &&
|
|
147 (not a joke || testing
|
|
148 line up here))
|
|
149 hay;
|
|
150 }
|
|
151
|
|
152
|
|
153 {
|
|
154 switch (c)
|
|
155 {
|
|
156 case xx:
|
|
157 do
|
|
158 if (asdf)
|
|
159 do
|
|
160 asdfasdf;
|
|
161 while (asdf);
|
|
162 else
|
|
163 asdfasdf;
|
|
164 while (cond);
|
|
165 case yy:
|
|
166 case xx:
|
|
167 case zz:
|
|
168 testing;
|
|
169 }
|
|
170 }
|
|
171
|
|
172 {
|
|
173 if (cond) {
|
|
174 foo;
|
|
175 }
|
|
176 else
|
|
177 {
|
|
178 bar;
|
|
179 }
|
|
180 }
|
|
181
|
|
182 {
|
|
183 if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf
|
|
184 alsdkfj (asldk;fj
|
|
185 awith cino=(0 ;lf this one goes to below the paren with ==
|
|
186 ;laksjfd ;lsakdjf ;alskdf asd)
|
|
187 asdfasdf;)))
|
|
188 asdfasdf;
|
|
189 }
|
|
190
|
|
191 int
|
|
192 func(a, b)
|
|
193 int a;
|
|
194 int c;
|
|
195 {
|
|
196 if (c1 && (c2 ||
|
|
197 c3))
|
|
198 foo;
|
|
199 if (c1 &&
|
|
200 (c2 || c3)
|
|
201 )
|
|
202 }
|
|
203
|
|
204 {
|
|
205 while (asd)
|
|
206 {
|
|
207 if (asdf)
|
|
208 if (test)
|
|
209 if (that)
|
|
210 {
|
|
211 if (asdf)
|
|
212 do
|
|
213 cdasd;
|
|
214 while (as
|
|
215 df);
|
|
216 }
|
|
217 else
|
|
218 if (asdf)
|
|
219 asdf;
|
|
220 else
|
|
221 asdf;
|
|
222 asdf;
|
|
223 }
|
|
224 }
|
|
225
|
|
226 {
|
|
227 s = "/*"; b = ';'
|
|
228 s = "/*"; b = ';';
|
|
229 a = b;
|
|
230 }
|
|
231
|
|
232 {
|
|
233 switch (a)
|
|
234 {
|
|
235 case a:
|
|
236 switch (t)
|
|
237 {
|
|
238 case 1:
|
|
239 cmd;
|
|
240 break;
|
|
241 case 2:
|
|
242 cmd;
|
|
243 break;
|
|
244 }
|
|
245 cmd;
|
|
246 break;
|
|
247 case b:
|
|
248 {
|
|
249 int i;
|
|
250 cmd;
|
|
251 }
|
|
252 break;
|
|
253 case c: {
|
|
254 int i;
|
|
255 cmd;
|
|
256 }
|
|
257 case d: if (cond &&
|
|
258 test) { /* this line doesn't work right */
|
|
259 int i;
|
|
260 cmd;
|
|
261 }
|
|
262 break;
|
|
263 }
|
|
264 }
|
|
265
|
|
266 {
|
|
267 if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) &&
|
|
268 (bp_to->b_p_initialized ||
|
|
269 (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL)))
|
|
270 return;
|
|
271 label :
|
|
272 asdf = asdf ?
|
|
273 asdf : asdf;
|
|
274 asdf = asdf ?
|
|
275 asdf: asdf;
|
|
276 }
|
|
277
|
|
278 /* Special Comments : This function has the added complexity (compared */
|
|
279 /* : to addtolist) of having to check for a detail */
|
|
280 /* : texture and add that to the list first. */
|
|
281
|
|
282 char *(array[100]) = {
|
|
283 "testje",
|
|
284 "foo",
|
|
285 "bar",
|
|
286 }
|
|
287
|
|
288 enum soppie
|
|
289 {
|
|
290 yes = 0,
|
|
291 no,
|
|
292 maybe
|
|
293 };
|
|
294
|
|
295 typedef enum soppie
|
|
296 {
|
|
297 yes = 0,
|
|
298 no,
|
|
299 maybe
|
|
300 };
|
|
301
|
3218
|
302 static enum
|
|
303 {
|
|
304 yes = 0,
|
|
305 no,
|
|
306 maybe
|
|
307 } soppie;
|
|
308
|
4187
|
309 public static enum
|
|
310 {
|
|
311 yes = 0,
|
|
312 no,
|
|
313 maybe
|
|
314 } soppie;
|
|
315
|
|
316 static private enum
|
|
317 {
|
|
318 yes = 0,
|
|
319 no,
|
|
320 maybe
|
|
321 } soppie;
|
|
322
|
7
|
323 {
|
|
324 int a,
|
|
325 b;
|
|
326 }
|
|
327
|
|
328 {
|
|
329 struct Type
|
|
330 {
|
|
331 int i;
|
|
332 char *str;
|
|
333 } var[] =
|
|
334 {
|
|
335 0, "zero",
|
|
336 1, "one",
|
|
337 2, "two",
|
|
338 3, "three"
|
|
339 };
|
|
340
|
|
341 float matrix[3][3] =
|
|
342 {
|
|
343 {
|
|
344 0,
|
|
345 1,
|
|
346 2
|
|
347 },
|
|
348 {
|
|
349 3,
|
|
350 4,
|
|
351 5
|
|
352 },
|
|
353 {
|
|
354 6,
|
|
355 7,
|
|
356 8
|
|
357 }
|
|
358 };
|
|
359 }
|
|
360
|
|
361 {
|
|
362 /* blah ( blah */
|
|
363 /* where does this go? */
|
|
364
|
|
365 /* blah ( blah */
|
|
366 cmd;
|
|
367
|
|
368 func(arg1,
|
|
369 /* comment */
|
|
370 arg2);
|
|
371 a;
|
|
372 {
|
|
373 b;
|
|
374 {
|
|
375 c; /* Hey, NOW it indents?! */
|
|
376 }
|
|
377 }
|
|
378
|
|
379 {
|
|
380 func(arg1,
|
|
381 arg2,
|
|
382 arg3);
|
|
383 /* Hey, what am I doing here? Is this coz of the ","? */
|
|
384 }
|
|
385 }
|
|
386
|
|
387 main ()
|
|
388 {
|
|
389 if (cond)
|
|
390 {
|
|
391 a = b;
|
|
392 }
|
|
393 if (cond) {
|
|
394 a = c;
|
|
395 }
|
|
396 if (cond)
|
|
397 a = d;
|
|
398 return;
|
|
399 }
|
|
400
|
|
401 {
|
|
402 case 2: if (asdf &&
|
|
403 asdfasdf)
|
|
404 aasdf;
|
|
405 a = 9;
|
|
406 case 3: if (asdf)
|
|
407 aasdf;
|
|
408 a = 9;
|
|
409 case 4: x = 1;
|
|
410 y = 2;
|
|
411
|
|
412 label: if (asdf)
|
|
413 here;
|
|
414
|
|
415 label: if (asdf &&
|
|
416 asdfasdf)
|
|
417 {
|
|
418 }
|
|
419
|
|
420 label: if (asdf &&
|
|
421 asdfasdf) {
|
|
422 there;
|
|
423 }
|
|
424
|
|
425 label: if (asdf &&
|
|
426 asdfasdf)
|
|
427 there;
|
|
428 }
|
|
429
|
|
430 {
|
|
431 /*
|
|
432 hello with ":set comments= cino=c5"
|
|
433 */
|
|
434
|
|
435 /*
|
|
436 hello with ":set comments= cino="
|
|
437 */
|
|
438 }
|
|
439
|
|
440
|
|
441 {
|
|
442 if (a < b) {
|
|
443 a = a + 1;
|
|
444 } else
|
|
445 a = a + 2;
|
|
446
|
|
447 if (a)
|
|
448 do {
|
|
449 testing;
|
|
450 } while (asdfasdf);
|
|
451 a = b + 1;
|
|
452 asdfasdf
|
|
453 }
|
|
454
|
6114
|
455 {
|
|
456 for ( int i = 0;
|
|
457 i < 10; i++ )
|
|
458 {
|
|
459 }
|
|
460 i = 0;
|
|
461 }
|
|
462
|
7
|
463 class bob
|
|
464 {
|
|
465 int foo() {return 1;}
|
|
466 int bar;
|
|
467 }
|
|
468
|
|
469 main()
|
|
470 {
|
|
471 while(1)
|
|
472 if (foo)
|
|
473 {
|
|
474 bar;
|
|
475 }
|
|
476 else {
|
|
477 asdf;
|
|
478 }
|
|
479 misplacedline;
|
|
480 }
|
|
481
|
|
482 {
|
|
483 if (clipboard.state == SELECT_DONE
|
|
484 && ((row == clipboard.start.lnum
|
|
485 && col >= clipboard.start.col)
|
|
486 || row > clipboard.start.lnum))
|
|
487 }
|
|
488
|
|
489 {
|
|
490 if (1) {i += 4;}
|
|
491 where_am_i;
|
|
492 return 0;
|
|
493 }
|
|
494
|
|
495 {
|
|
496 {
|
|
497 } // sdf(asdf
|
|
498 if (asdf)
|
|
499 asd;
|
|
500 }
|
|
501
|
|
502 {
|
|
503 label1:
|
|
504 label2:
|
|
505 }
|
|
506
|
|
507 {
|
|
508 int fooRet = foo(pBar1, false /*fKB*/,
|
|
509 true /*fPTB*/, 3 /*nT*/, false /*fDF*/);
|
|
510 f() {
|
|
511 for ( i = 0;
|
|
512 i < m;
|
|
513 /* c */ i++ ) {
|
|
514 a = b;
|
|
515 }
|
|
516 }
|
|
517 }
|
|
518
|
|
519 {
|
|
520 f1(/*comment*/);
|
|
521 f2();
|
|
522 }
|
|
523
|
|
524 {
|
|
525 do {
|
|
526 if (foo) {
|
|
527 } else
|
|
528 ;
|
|
529 } while (foo);
|
|
530 foo(); // was wrong
|
|
531 }
|
|
532
|
|
533 int x; // no extra indent because of the ;
|
|
534 void func()
|
|
535 {
|
|
536 }
|
|
537
|
|
538 char *tab[] = {"aaa",
|
|
539 "};", /* }; */ NULL}
|
|
540 int indented;
|
|
541 {}
|
|
542
|
|
543 char *a[] = {"aaa", "bbb",
|
|
544 "ccc", NULL};
|
|
545 // here
|
|
546
|
|
547 char *tab[] = {"aaa",
|
|
548 "xx", /* xx */}; /* asdf */
|
|
549 int not_indented;
|
|
550
|
|
551 {
|
|
552 do {
|
|
553 switch (bla)
|
|
554 {
|
|
555 case 1: if (foo)
|
|
556 bar;
|
|
557 }
|
|
558 } while (boo);
|
|
559 wrong;
|
|
560 }
|
|
561
|
|
562 int foo,
|
|
563 bar;
|
|
564 int foo;
|
|
565
|
|
566 #if defined(foo) \
|
|
567 && defined(bar)
|
|
568 char * xx = "asdf\
|
|
569 foo\
|
|
570 bor";
|
|
571 int x;
|
|
572
|
|
573 char *foo = "asdf\
|
|
574 asdf\
|
|
575 asdf",
|
|
576 *bar;
|
|
577
|
|
578 void f()
|
|
579 {
|
|
580 #if defined(foo) \
|
|
581 && defined(bar)
|
|
582 char *foo = "asdf\
|
|
583 asdf\
|
|
584 asdf",
|
|
585 *bar;
|
|
586 {
|
|
587 int i;
|
|
588 char *foo = "asdf\
|
|
589 asdf\
|
|
590 asdf",
|
|
591 *bar;
|
|
592 }
|
|
593 #endif
|
|
594 }
|
|
595 #endif
|
|
596
|
|
597 int y; // comment
|
|
598 // comment
|
|
599
|
|
600 // comment
|
|
601
|
|
602 {
|
|
603 Constructor(int a,
|
|
604 int b ) : BaseClass(a)
|
|
605 {
|
|
606 }
|
|
607 }
|
|
608
|
|
609 void foo()
|
|
610 {
|
|
611 char one,
|
|
612 two;
|
|
613 struct bla piet,
|
|
614 jan;
|
|
615 enum foo kees,
|
|
616 jannie;
|
|
617 static unsigned sdf,
|
|
618 krap;
|
|
619 unsigned int piet,
|
|
620 jan;
|
|
621 int
|
|
622 kees,
|
|
623 jan;
|
|
624 }
|
|
625
|
|
626 {
|
|
627 t(int f,
|
|
628 int d); // )
|
|
629 d();
|
|
630 }
|
|
631
|
|
632 Constructor::Constructor(int a,
|
|
633 int b
|
|
634 ) :
|
|
635 BaseClass(a,
|
|
636 b,
|
|
637 c),
|
|
638 mMember(b),
|
|
639 {
|
|
640 }
|
|
641
|
|
642 Constructor::Constructor(int a,
|
|
643 int b ) :
|
|
644 BaseClass(a)
|
|
645 {
|
|
646 }
|
|
647
|
|
648 Constructor::Constructor(int a,
|
|
649 int b ) /*x*/ : /*x*/ BaseClass(a),
|
828
|
650 member(b)
|
7
|
651 {
|
|
652 }
|
|
653
|
|
654 class CAbc :
|
|
655 public BaseClass1,
|
|
656 protected BaseClass2
|
|
657 {
|
|
658 int Test() { return FALSE; }
|
|
659 int Test1() { return TRUE; }
|
|
660
|
|
661 CAbc(int a, int b ) :
|
|
662 BaseClass(a)
|
|
663 {
|
|
664 switch(xxx)
|
|
665 {
|
|
666 case abc:
|
|
667 asdf();
|
|
668 break;
|
|
669
|
|
670 case 999:
|
|
671 baer();
|
|
672 break;
|
|
673 }
|
|
674 }
|
|
675
|
|
676 public: // <-- this was incoreectly indented before!!
|
|
677 void testfall();
|
|
678 protected:
|
|
679 void testfall();
|
|
680 };
|
|
681
|
|
682 class CAbc : public BaseClass1,
|
828
|
683 protected BaseClass2
|
7
|
684 {
|
|
685 };
|
|
686
|
|
687 static struct
|
|
688 {
|
|
689 int a;
|
|
690 int b;
|
|
691 } variable[COUNT] =
|
|
692 {
|
|
693 {
|
|
694 123,
|
|
695 456
|
|
696 },
|
|
697 {
|
|
698 123,
|
|
699 456
|
|
700 }
|
|
701 };
|
|
702
|
|
703 static struct
|
|
704 {
|
|
705 int a;
|
|
706 int b;
|
|
707 } variable[COUNT] =
|
|
708 {
|
|
709 { 123, 456 },
|
|
710 { 123, 456 }
|
|
711 };
|
|
712
|
|
713 void asdf() /* ind_maxparen may cause trouble here */
|
|
714 {
|
|
715 if ((0
|
|
716 && 1
|
|
717 && 1
|
|
718 && 1
|
|
719 && 1
|
|
720 && 1
|
|
721 && 1
|
|
722 && 1
|
|
723 && 1
|
|
724 && 1
|
|
725 && 1
|
|
726 && 1
|
|
727 && 1
|
|
728 && 1
|
|
729 && 1
|
|
730 && 1
|
|
731 && 1
|
|
732 && 1
|
|
733 && 1
|
|
734 && 1
|
|
735 && 1
|
|
736 && 1
|
|
737 && 1
|
|
738 && 1
|
|
739 && 1
|
|
740 && 1)) break;
|
|
741 }
|
|
742
|
827
|
743 foo()
|
|
744 {
|
|
745 a = cond ? foo() : asdf
|
|
746 + asdf;
|
|
747
|
|
748 a = cond ?
|
|
749 foo() : asdf
|
|
750 + asdf;
|
|
751 }
|
|
752
|
|
753 int main(void)
|
|
754 {
|
|
755 if (a)
|
|
756 if (b)
|
|
757 2;
|
|
758 else 3;
|
|
759 next_line_of_code();
|
|
760 }
|
|
761
|
828
|
762 barry()
|
|
763 {
|
|
764 Foo::Foo (int one,
|
|
765 int two)
|
|
766 : something(4)
|
|
767 {}
|
|
768 }
|
|
769
|
|
770 barry()
|
|
771 {
|
|
772 Foo::Foo (int one, int two)
|
|
773 : something(4)
|
|
774 {}
|
|
775 }
|
|
776
|
|
777 Constructor::Constructor(int a,
|
|
778 int b
|
|
779 ) :
|
|
780 BaseClass(a,
|
|
781 b,
|
|
782 c),
|
|
783 mMember(b)
|
|
784 {
|
|
785 }
|
829
|
786 int main ()
|
|
787 {
|
|
788 if (lala)
|
|
789 do
|
|
790 ++(*lolo);
|
|
791 while (lili
|
|
792 && lele);
|
|
793 lulu;
|
|
794 }
|
828
|
795
|
829
|
796 int main ()
|
|
797 {
|
|
798 switch (c)
|
|
799 {
|
|
800 case 'c': if (cond)
|
|
801 {
|
|
802 }
|
|
803 }
|
|
804 }
|
|
805
|
|
806 main()
|
|
807 {
|
|
808 (void) MyFancyFuasdfadsfnction(
|
|
809 argument);
|
|
810 }
|
|
811
|
|
812 main()
|
|
813 {
|
|
814 char foo[] = "/*";
|
|
815 /* as
|
|
816 df */
|
|
817 hello
|
|
818 }
|
2857
|
819
|
|
820 /* valid namespaces with normal indent */
|
|
821 namespace
|
|
822 {
|
|
823 {
|
|
824 111111111111;
|
|
825 }
|
|
826 }
|
|
827 namespace /* test */
|
|
828 {
|
|
829 11111111111111111;
|
|
830 }
|
|
831 namespace // test
|
|
832 {
|
|
833 111111111111111111;
|
|
834 }
|
|
835 namespace
|
|
836 {
|
|
837 111111111111111111;
|
|
838 }
|
|
839 namespace test
|
|
840 {
|
|
841 111111111111111111;
|
|
842 }
|
|
843 namespace{
|
|
844 111111111111111111;
|
|
845 }
|
|
846 namespace test{
|
|
847 111111111111111111;
|
|
848 }
|
|
849 namespace {
|
|
850 111111111111111111;
|
|
851 }
|
|
852 namespace test {
|
|
853 111111111111111111;
|
|
854 namespace test2 {
|
|
855 22222222222222222;
|
|
856 }
|
|
857 }
|
|
858
|
|
859 /* invalid namespaces use block indent */
|
|
860 namespace test test2 {
|
|
861 111111111111111111111;
|
|
862 }
|
|
863 namespace11111111111 {
|
|
864 111111111111;
|
|
865 }
|
|
866 namespace() {
|
|
867 1111111111111;
|
|
868 }
|
|
869 namespace()
|
|
870 {
|
|
871 111111111111111111;
|
|
872 }
|
|
873 namespace test test2
|
|
874 {
|
|
875 1111111111111111111;
|
|
876 }
|
|
877 namespace111111111
|
|
878 {
|
|
879 111111111111111111;
|
|
880 }
|
|
881
|
6971
|
882 void getstring() {
|
|
883 /* Raw strings */
|
|
884 const char* s = R"(
|
|
885 test {
|
|
886 # comment
|
|
887 field: 123
|
|
888 }
|
|
889 )";
|
|
890 }
|
|
891
|
|
892 void getstring() {
|
|
893 const char* s = R"foo(
|
|
894 test {
|
|
895 # comment
|
|
896 field: 123
|
|
897 }
|
|
898 )foo";
|
|
899 }
|
|
900
|
7
|
901 /* end of AUTO */
|
|
902
|
|
903
|
|
904 {
|
|
905
|
|
906 /* this is
|
|
907 * a real serious
|
|
908 * about life, the
|
|
909 * universe, and the
|
|
910 * rest important big
|
|
911 * comment
|
|
912 */
|
|
913 /* insert " about life, the universe, and the rest" after "serious" */
|
|
914 }
|
|
915
|
|
916
|
|
917 {
|
|
918 /*
|
|
919 * Testing for comments, without 'cin' set
|
|
920 */
|
|
921 about life
|
|
922
|
|
923 /*
|
|
924 * what happens here?
|
|
925 */
|
|
926 there
|
|
927
|
|
928 /*
|
|
929 the end of the comment, try inserting a line below */
|
|
930 line
|
|
931
|
|
932 /* how about
|
|
933 hello
|
|
934 this one */
|
|
935 }
|
|
936
|
|
937
|
|
938 {
|
|
939 var = this + that + vec[0] * vec[0]
|
|
940 + vec[1] * vec[1]
|
|
941 + vec2[2] * vec[2];
|
|
942 }
|
|
943
|
|
944
|
|
945 {
|
|
946 asdf asdflkajds f;
|
|
947 if (tes & ting) {
|
|
948 asdf asdf asdf ;
|
|
949 asdfa sdf asdf;
|
|
950 }
|
|
951 testing1;
|
|
952 if (tes & ting)
|
|
953 {
|
|
954 asdf asdf asdf ;
|
|
955 asdfa sdf asdf;
|
|
956 }
|
|
957 testing2;
|
|
958 }
|
|
959
|
|
960
|
|
961 main ( int first_par, /*
|
|
962 * Comment for
|
|
963 * first par
|
|
964 */
|
|
965 int second_par /*
|
|
966 * Comment for
|
|
967 * second par
|
|
968 */
|
|
969 )
|
|
970 {
|
|
971 func( first_par, /*
|
|
972 * Comment for
|
|
973 * first par
|
|
974 */
|
|
975 second_par /*
|
|
976 * Comment for
|
|
977 * second par
|
|
978 */
|
|
979 );
|
|
980
|
|
981 }
|
|
982
|
|
983
|
3578
|
984 main(void)
|
|
985 {
|
|
986 /* Make sure that cino=X0s is not parsed like cino=Xs. */
|
|
987 if (cond)
|
|
988 foo();
|
|
989 else
|
|
990 {
|
|
991 bar();
|
|
992 }
|
|
993 }
|
|
994
|
|
995
|
7
|
996 {
|
|
997 do
|
|
998 {
|
|
999 if ()
|
|
1000 {
|
|
1001 if ()
|
|
1002 asdf;
|
|
1003 else
|
|
1004 asdf;
|
|
1005 }
|
|
1006 } while ();
|
|
1007 cmd; /* this should go under the } */
|
|
1008 }
|
|
1009
|
|
1010
|
|
1011 void f()
|
|
1012 {
|
|
1013 if ( k() ) {
|
|
1014 l();
|
|
1015
|
|
1016 } else { /* Start (two words) end */
|
|
1017 m();
|
|
1018 }
|
|
1019
|
|
1020 n();
|
|
1021 }
|
|
1022
|
|
1023
|
|
1024 void f()
|
|
1025 {
|
|
1026 if ( k() )
|
|
1027 {
|
|
1028 l();
|
|
1029 } else { /* Start (two words) end */
|
|
1030 m();
|
|
1031 }
|
|
1032 n(); /* should be under the if () */
|
|
1033 }
|
|
1034
|
|
1035
|
|
1036 void bar(void)
|
|
1037 {
|
|
1038 static array[2][2] =
|
|
1039 {
|
|
1040 { 1, 2 },
|
|
1041 { 3, 4 },
|
|
1042 }
|
|
1043
|
|
1044 while (a)
|
|
1045 {
|
|
1046 foo(&a);
|
|
1047 }
|
|
1048
|
|
1049 {
|
|
1050 int a;
|
|
1051 {
|
|
1052 a = a + 1;
|
|
1053 }
|
|
1054 }
|
|
1055 b = a;
|
|
1056 }
|
|
1057
|
|
1058 void func(void)
|
|
1059 {
|
|
1060 a = 1;
|
|
1061 {
|
|
1062 b = 2;
|
|
1063 }
|
|
1064 c = 3;
|
|
1065 d = 4;
|
|
1066 }
|
|
1067 /* foo */
|
|
1068
|
|
1069
|
|
1070 a()
|
|
1071 {
|
|
1072 do {
|
|
1073 a = a +
|
|
1074 a;
|
|
1075 } while ( a ); /* add text under this line */
|
|
1076 here
|
|
1077 if ( a )
|
|
1078 a;
|
|
1079 }
|
|
1080
|
|
1081
|
|
1082 a()
|
|
1083 {
|
|
1084 label1:
|
|
1085 /* hmm */
|
|
1086 // comment
|
|
1087 label2: b();
|
|
1088 label3 /* post */:
|
|
1089 /* pre */ label4:
|
|
1090 f(/*com*/);
|
|
1091 if (/*com*/)
|
|
1092 cmd();
|
|
1093 }
|
|
1094
|
|
1095
|
|
1096 /*
|
|
1097 * A simple comment
|
|
1098 */
|
|
1099
|
|
1100 /*
|
|
1101 ** A different comment
|
|
1102 */
|
|
1103
|
|
1104
|
|
1105 void f()
|
|
1106 {
|
|
1107
|
|
1108 /*********
|
|
1109 A comment.
|
|
1110 *********/
|
|
1111 }
|
|
1112
|
|
1113
|
|
1114 void f()
|
|
1115 {
|
|
1116
|
|
1117 /*********
|
|
1118 A comment.
|
|
1119 *********/
|
|
1120 }
|
|
1121
|
|
1122
|
|
1123 void f()
|
|
1124 {
|
|
1125 c = c1 &&
|
|
1126 (
|
|
1127 c2 ||
|
|
1128 c3
|
|
1129 ) && c4;
|
|
1130 }
|
|
1131
|
|
1132
|
|
1133 void f()
|
|
1134 {
|
|
1135 c = c1 &&
|
|
1136 (
|
|
1137 c2 ||
|
|
1138 c3
|
|
1139 ) && c4;
|
|
1140 }
|
|
1141
|
|
1142
|
|
1143 void f()
|
|
1144 {
|
|
1145 c = c1 &&
|
|
1146 (
|
|
1147 c2 ||
|
|
1148 c3
|
|
1149 ) && c4;
|
|
1150 }
|
|
1151
|
|
1152
|
|
1153 void f()
|
|
1154 {
|
|
1155 if ( c1
|
|
1156 && ( c2
|
|
1157 || c3))
|
|
1158 foo;
|
|
1159 }
|
|
1160
|
|
1161
|
|
1162 void f()
|
|
1163 {
|
|
1164 if ( c1
|
|
1165 && ( c2
|
|
1166 || c3))
|
|
1167 foo;
|
|
1168 }
|
|
1169
|
|
1170
|
|
1171 void f()
|
|
1172 {
|
|
1173 c = c1 && (
|
|
1174 c2 ||
|
|
1175 c3
|
|
1176 ) && c4;
|
|
1177 if (
|
|
1178 c1 && c2
|
|
1179 )
|
|
1180 foo;
|
|
1181 }
|
|
1182
|
|
1183
|
|
1184 void f()
|
|
1185 {
|
|
1186 c = c1 && (
|
|
1187 c2 ||
|
|
1188 c3
|
|
1189 ) && c4;
|
|
1190 if (
|
|
1191 c1 && c2
|
|
1192 )
|
|
1193 foo;
|
|
1194 }
|
|
1195
|
|
1196
|
|
1197 void f()
|
|
1198 {
|
|
1199 switch (x)
|
|
1200 {
|
|
1201 case 1:
|
|
1202 a = b;
|
|
1203 break;
|
|
1204 default:
|
|
1205 a = 0;
|
|
1206 break;
|
|
1207 }
|
|
1208 }
|
|
1209
|
|
1210
|
|
1211 void f()
|
|
1212 {
|
|
1213 invokeme(
|
|
1214 argu,
|
|
1215 ment);
|
|
1216 invokeme(
|
|
1217 argu,
|
|
1218 ment
|
|
1219 );
|
|
1220 invokeme(argu,
|
|
1221 ment
|
|
1222 );
|
|
1223 }
|
|
1224
|
|
1225
|
|
1226 void f()
|
|
1227 {
|
|
1228 statement;
|
|
1229 // comment 1
|
|
1230 // comment 2
|
|
1231 }
|
|
1232
|
|
1233
|
|
1234 void f()
|
|
1235 {
|
|
1236 statement;
|
|
1237 // comment 1
|
|
1238 // comment 2
|
|
1239 }
|
|
1240
|
|
1241
|
|
1242 class CAbc
|
|
1243 {
|
|
1244 int Test() { return FALSE; }
|
|
1245
|
|
1246 public: // comment
|
|
1247 void testfall();
|
|
1248 protected:
|
|
1249 void testfall();
|
|
1250 };
|
|
1251
|
|
1252
|
3123
|
1253 class Foo : public Bar
|
|
1254 {
|
|
1255 public:
|
|
1256 virtual void method1(void) = 0;
|
|
1257 virtual void method2(int arg1,
|
|
1258 int arg2,
|
|
1259 int arg3) = 0;
|
|
1260 };
|
|
1261
|
|
1262
|
828
|
1263 void
|
|
1264 foo()
|
|
1265 {
|
|
1266 if (a)
|
|
1267 {
|
|
1268 } else
|
|
1269 asdf;
|
|
1270 }
|
|
1271
|
|
1272
|
7
|
1273 {
|
|
1274 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
|
|
1275 asdasdf,
|
|
1276 func(asdf,
|
|
1277 asdfadsf),
|
|
1278 asdfasdf
|
|
1279 );
|
|
1280
|
|
1281 /* those are ugly, but consequent */
|
|
1282
|
|
1283 func()->asd(asdasdf,
|
|
1284 averylongfunctionname(
|
|
1285 abc,
|
|
1286 dec)->averylongfunctionname(
|
|
1287 asdfadsf,
|
|
1288 asdfasdf,
|
|
1289 asdfasdf,
|
|
1290 ),
|
|
1291 func(asdfadf,
|
|
1292 asdfasdf
|
|
1293 ),
|
|
1294 asdasdf
|
|
1295 );
|
|
1296
|
|
1297 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
|
|
1298 abc,
|
|
1299 dec)->asdfasdfasdf(
|
|
1300 asdfadsf,
|
|
1301 asdfasdf,
|
|
1302 asdfasdf,
|
|
1303 ),
|
|
1304 func(asdfadf,
|
|
1305 asdfasdf),
|
|
1306 asdasdf
|
|
1307 );
|
|
1308 }
|
|
1309
|
829
|
1310
|
|
1311 int main ()
|
|
1312 {
|
|
1313 if (cond1 &&
|
|
1314 cond2
|
|
1315 )
|
|
1316 foo;
|
|
1317 }
|
|
1318
|
2776
|
1319
|
|
1320 void func(int a
|
|
1321 #if defined(FOO)
|
|
1322 , int b
|
|
1323 , int c
|
|
1324 #endif
|
|
1325 )
|
|
1326 {
|
|
1327 }
|
|
1328
|
|
1329
|
|
1330 void
|
|
1331 func(int a
|
|
1332 #if defined(FOO)
|
|
1333 , int b
|
|
1334 , int c
|
|
1335 #endif
|
|
1336 )
|
|
1337 {
|
|
1338 }
|
|
1339
|
2805
|
1340
|
|
1341 void func(void)
|
|
1342 {
|
|
1343 if(x==y)
|
|
1344 if(y==z)
|
|
1345 foo=1;
|
|
1346 else { bar=1;
|
|
1347 baz=2;
|
|
1348 }
|
|
1349 printf("Foo!\n");
|
|
1350 }
|
|
1351
|
2843
|
1352 void func1(void)
|
|
1353 {
|
|
1354 char* tab[] = {"foo", "bar",
|
|
1355 "baz", "quux",
|
|
1356 "this line used", "to be indented incorrectly"};
|
|
1357 foo();
|
|
1358 }
|
|
1359
|
|
1360 void func2(void)
|
|
1361 {
|
|
1362 int tab[] =
|
|
1363 {1, 2,
|
|
1364 3, 4,
|
|
1365 5, 6};
|
|
1366
|
|
1367 printf("This line used to be indented incorrectly.\n");
|
|
1368 }
|
|
1369
|
3186
|
1370 int foo[]
|
|
1371 #ifdef BAR
|
|
1372
|
|
1373 = { 1, 2, 3,
|
|
1374 4, 5, 6 }
|
|
1375
|
|
1376 #endif
|
|
1377 ;
|
|
1378 int baz;
|
|
1379
|
2843
|
1380 void func3(void)
|
|
1381 {
|
|
1382 int tab[] = {
|
|
1383 1, 2,
|
|
1384 3, 4,
|
|
1385 5, 6};
|
|
1386
|
3220
|
1387 printf("Don't you dare indent this line incorrectly!\n");
|
|
1388 }
|
|
1389
|
|
1390 void
|
|
1391 func4(a, b,
|
|
1392 c)
|
|
1393 int a;
|
|
1394 int b;
|
|
1395 int c;
|
|
1396 {
|
|
1397 }
|
|
1398
|
|
1399 void
|
|
1400 func5(
|
|
1401 int a,
|
|
1402 int b)
|
|
1403 {
|
|
1404 }
|
|
1405
|
|
1406 void
|
|
1407 func6(
|
|
1408 int a)
|
|
1409 {
|
2843
|
1410 }
|
|
1411
|
2807
|
1412
|
|
1413 void func(void)
|
|
1414 {
|
2953
|
1415 int tab[] =
|
|
1416 {
|
|
1417 1, 2, 3,
|
|
1418 4, 5, 6};
|
|
1419
|
|
1420 printf("Indent this line correctly!\n");
|
|
1421
|
|
1422 switch (foo)
|
|
1423 {
|
|
1424 case bar:
|
|
1425 printf("bar");
|
|
1426 break;
|
|
1427 case baz: {
|
|
1428 printf("baz");
|
|
1429 break;
|
|
1430 }
|
|
1431 case quux:
|
|
1432 printf("But don't break the indentation of this instruction\n");
|
|
1433 break;
|
|
1434 }
|
|
1435 }
|
|
1436
|
|
1437
|
|
1438 void func(void)
|
|
1439 {
|
2807
|
1440 cout << "a"
|
|
1441 << "b"
|
|
1442 << ") :"
|
|
1443 << "c";
|
|
1444 }
|
|
1445
|
2809
|
1446
|
|
1447 void func(void)
|
|
1448 {
|
|
1449 /*
|
|
1450 * This is a comment.
|
|
1451 */
|
|
1452 foo();
|
|
1453 }
|
|
1454
|
2855
|
1455
|
|
1456 void func(void)
|
|
1457 {
|
|
1458 for (int i = 0; i < 10; ++i)
|
|
1459 if (i & 1) {
|
|
1460 foo(1);
|
|
1461 } else
|
|
1462 foo(0);
|
|
1463 baz();
|
|
1464 }
|
|
1465
|
2857
|
1466
|
3454
|
1467 void func(void)
|
|
1468 {
|
|
1469 if (condition1
|
|
1470 && condition2)
|
|
1471 action();
|
|
1472 function(argument1
|
|
1473 && argument2);
|
|
1474
|
|
1475 if (c1 && (c2 ||
|
|
1476 c3))
|
|
1477 foo;
|
|
1478 if (c1 &&
|
|
1479 (c2 || c3))
|
|
1480 {
|
|
1481 }
|
|
1482
|
|
1483 if ( c1
|
|
1484 && ( c2
|
|
1485 || c3))
|
|
1486 foo;
|
|
1487 func( c1
|
|
1488 && ( c2
|
|
1489 || c3))
|
|
1490 foo;
|
|
1491 }
|
|
1492
|
|
1493
|
|
1494 void func(void)
|
|
1495 {
|
|
1496 if (condition1
|
|
1497 && condition2)
|
|
1498 action();
|
|
1499 function(argument1
|
|
1500 && argument2);
|
|
1501
|
|
1502 if (c1 && (c2 ||
|
|
1503 c3))
|
|
1504 foo;
|
|
1505 if (c1 &&
|
|
1506 (c2 || c3))
|
|
1507 {
|
|
1508 }
|
|
1509
|
|
1510 if ( c1
|
|
1511 && ( c2
|
|
1512 || c3))
|
|
1513 foo;
|
|
1514 func( c1
|
|
1515 && ( c2
|
|
1516 || c3))
|
|
1517 foo;
|
|
1518 }
|
|
1519
|
|
1520
|
|
1521 void func(void)
|
|
1522 {
|
|
1523 if (condition1
|
|
1524 && condition2)
|
|
1525 action();
|
|
1526 function(argument1
|
|
1527 && argument2);
|
|
1528
|
|
1529 if (c1 && (c2 ||
|
|
1530 c3))
|
|
1531 foo;
|
|
1532 if (c1 &&
|
|
1533 (c2 || c3))
|
|
1534 {
|
|
1535 }
|
|
1536 if (c123456789
|
|
1537 && (c22345
|
|
1538 || c3))
|
|
1539 printf("foo\n");
|
|
1540
|
|
1541 c = c1 &&
|
|
1542 (
|
|
1543 c2 ||
|
|
1544 c3
|
|
1545 ) && c4;
|
|
1546 }
|
|
1547
|
|
1548
|
|
1549 void func(void)
|
|
1550 {
|
|
1551 if (condition1
|
|
1552 && condition2)
|
|
1553 action();
|
|
1554 function(argument1
|
|
1555 && argument2);
|
|
1556
|
|
1557 if (c1 && (c2 ||
|
|
1558 c3))
|
|
1559 foo;
|
|
1560 if (c1 &&
|
|
1561 (c2 || c3))
|
|
1562 {
|
|
1563 }
|
|
1564 if (c123456789
|
|
1565 && (c22345
|
|
1566 || c3))
|
|
1567 printf("foo\n");
|
|
1568
|
|
1569 if ( c1
|
|
1570 && ( c2
|
|
1571 || c3))
|
|
1572 foo;
|
|
1573
|
|
1574 a_long_line(
|
|
1575 argument,
|
|
1576 argument);
|
|
1577 a_short_line(argument,
|
|
1578 argument);
|
|
1579 }
|
|
1580
|
|
1581
|
|
1582 void func(void)
|
|
1583 {
|
|
1584 if (condition1
|
|
1585 && condition2)
|
|
1586 action();
|
|
1587 function(argument1
|
|
1588 && argument2);
|
|
1589
|
|
1590 if (c1 && (c2 ||
|
|
1591 c3))
|
|
1592 foo;
|
|
1593 if (c1 &&
|
|
1594 (c2 || c3))
|
|
1595 {
|
|
1596 }
|
|
1597 if (c123456789
|
|
1598 && (c22345
|
|
1599 || c3))
|
|
1600 printf("foo\n");
|
|
1601 }
|
|
1602
|
|
1603
|
|
1604 void func(void)
|
|
1605 {
|
|
1606 if (condition1
|
|
1607 && condition2)
|
|
1608 action();
|
|
1609 function(argument1
|
|
1610 && argument2);
|
|
1611
|
|
1612 if (c1 && (c2 ||
|
|
1613 c3))
|
|
1614 foo;
|
|
1615 if (c1 &&
|
|
1616 (c2 || c3))
|
|
1617 {
|
|
1618 }
|
|
1619 if (c123456789
|
|
1620 && (c22345
|
|
1621 || c3))
|
|
1622 printf("foo\n");
|
|
1623
|
|
1624 if ( c1
|
|
1625 && ( c2
|
|
1626 || c3))
|
|
1627 foo;
|
|
1628 func( c1
|
|
1629 && ( c2
|
|
1630 || c3))
|
|
1631 foo;
|
|
1632 }
|
|
1633
|
|
1634
|
|
1635 void func(void)
|
|
1636 {
|
|
1637 if (condition1
|
|
1638 && condition2)
|
|
1639 action();
|
|
1640 function(argument1
|
|
1641 && argument2);
|
|
1642
|
|
1643 if (c1 && (c2 ||
|
|
1644 c3))
|
|
1645 foo;
|
|
1646 if (c1 &&
|
|
1647 (c2 || c3))
|
|
1648 {
|
|
1649 }
|
|
1650 }
|
|
1651
|
|
1652
|
2879
|
1653 NAMESPACESTART
|
2857
|
1654 /* valid namespaces with normal indent */
|
|
1655 namespace
|
|
1656 {
|
|
1657 {
|
|
1658 111111111111;
|
|
1659 }
|
|
1660 }
|
|
1661 namespace /* test */
|
|
1662 {
|
|
1663 11111111111111111;
|
|
1664 }
|
|
1665 namespace // test
|
|
1666 {
|
|
1667 111111111111111111;
|
|
1668 }
|
|
1669 namespace
|
|
1670 {
|
|
1671 111111111111111111;
|
|
1672 }
|
|
1673 namespace test
|
|
1674 {
|
|
1675 111111111111111111;
|
|
1676 }
|
|
1677 namespace{
|
|
1678 111111111111111111;
|
|
1679 }
|
|
1680 namespace test{
|
|
1681 111111111111111111;
|
|
1682 }
|
|
1683 namespace {
|
|
1684 111111111111111111;
|
|
1685 }
|
|
1686 namespace test {
|
|
1687 111111111111111111;
|
|
1688 namespace test2 {
|
|
1689 22222222222222222;
|
|
1690 }
|
|
1691 }
|
|
1692
|
|
1693 /* invalid namespaces use block indent */
|
|
1694 namespace test test2 {
|
|
1695 111111111111111111111;
|
|
1696 }
|
|
1697 namespace11111111111 {
|
|
1698 111111111111;
|
|
1699 }
|
|
1700 namespace() {
|
|
1701 1111111111111;
|
|
1702 }
|
|
1703 namespace()
|
|
1704 {
|
|
1705 111111111111111111;
|
|
1706 }
|
|
1707 namespace test test2
|
|
1708 {
|
|
1709 1111111111111111111;
|
|
1710 }
|
|
1711 namespace111111111
|
|
1712 {
|
|
1713 111111111111111111;
|
|
1714 }
|
|
1715 NAMESPACEEND
|
|
1716
|
|
1717
|
2879
|
1718
|
|
1719 JSSTART
|
|
1720 var bar = {
|
|
1721 foo: {
|
|
1722 that: this,
|
|
1723 some: ok,
|
|
1724 },
|
|
1725 "bar":{
|
|
1726 a : 2,
|
|
1727 b: "123abc",
|
|
1728 x: 4,
|
|
1729 "y": 5
|
|
1730 }
|
|
1731 }
|
|
1732 JSEND
|
|
1733
|
2968
|
1734
|
|
1735 JSSTART
|
|
1736 var foo = [
|
6030
|
1737 1,
|
2968
|
1738 2,
|
|
1739 3
|
6030
|
1740 ];
|
2968
|
1741 JSEND
|
|
1742
|
|
1743
|
|
1744 JSSTART
|
|
1745 function bar() {
|
|
1746 var foo = [
|
|
1747 1,
|
|
1748 2,
|
|
1749 3
|
6030
|
1750 ];
|
2968
|
1751 }
|
|
1752 JSEND
|
|
1753
|
|
1754
|
|
1755 JSSTART
|
|
1756 (function($){
|
|
1757
|
6020
|
1758 if (cond &&
|
|
1759 cond) {
|
|
1760 stmt;
|
|
1761 }
|
6030
|
1762 window.something.left =
|
|
1763 (width - 50 + offset) + "px";
|
2968
|
1764 var class_name='myclass';
|
|
1765
|
|
1766 function private_method() {
|
|
1767 }
|
|
1768
|
|
1769 var public_method={
|
|
1770 method: function(options,args){
|
|
1771 private_method();
|
|
1772 }
|
|
1773 }
|
|
1774
|
|
1775 function init(options) {
|
|
1776
|
|
1777 $(this).data(class_name+'_public',$.extend({},{
|
|
1778 foo: 'bar',
|
6030
|
1779 bar: 2,
|
|
1780 foobar: [
|
|
1781 1,
|
|
1782 2,
|
|
1783 3
|
2968
|
1784 ],
|
6030
|
1785 callback: function(){
|
|
1786 return true;
|
|
1787 }
|
2968
|
1788 }, options||{}));
|
|
1789 }
|
|
1790
|
|
1791 $.fn[class_name]=function() {
|
|
1792
|
|
1793 var _arguments=arguments;
|
|
1794 return this.each(function(){
|
|
1795
|
|
1796 var options=$(this).data(class_name+'_public');
|
|
1797 if (!options) {
|
|
1798 init.apply(this,_arguments);
|
|
1799
|
|
1800 } else {
|
|
1801 var method=public_method[_arguments[0]];
|
|
1802
|
|
1803 if (typeof(method)!='function') {
|
|
1804 console.log(class_name+' has no method "'+_arguments[0]+'"');
|
|
1805 return false;
|
|
1806 }
|
|
1807 _arguments[0]=options;
|
|
1808 method.apply(this,_arguments);
|
|
1809 }
|
|
1810 });
|
|
1811 }
|
|
1812
|
|
1813 })(jQuery);
|
|
1814 JSEND
|
|
1815
|
|
1816
|
|
1817 JSSTART
|
|
1818 function init(options) {
|
|
1819 $(this).data(class_name+'_public',$.extend({},{
|
|
1820 foo: 'bar',
|
|
1821 bar: 2,
|
|
1822 foobar: [
|
6030
|
1823 1,
|
|
1824 2,
|
|
1825 3
|
2968
|
1826 ],
|
|
1827 callback: function(){
|
|
1828 return true;
|
|
1829 }
|
|
1830 }, options||{}));
|
|
1831 }
|
|
1832 JSEND
|
|
1833
|
|
1834
|
|
1835 JSSTART
|
|
1836 (function($){
|
|
1837 function init(options) {
|
|
1838 $(this).data(class_name+'_public',$.extend({},{
|
|
1839 foo: 'bar',
|
6030
|
1840 bar: 2,
|
|
1841 foobar: [
|
|
1842 1,
|
|
1843 2,
|
|
1844 3
|
2968
|
1845 ],
|
6030
|
1846 callback: function(){
|
|
1847 return true;
|
|
1848 }
|
2968
|
1849 }, options||{}));
|
|
1850 }
|
|
1851 })(jQuery);
|
|
1852 JSEND
|
|
1853
|
6691
|
1854
|
|
1855 JSSTART
|
|
1856 // Results of JavaScript indent
|
|
1857 // 1
|
|
1858 (function(){
|
|
1859 var a = [
|
|
1860 'a',
|
|
1861 'b',
|
|
1862 'c',
|
|
1863 'd',
|
|
1864 'e',
|
|
1865 'f',
|
|
1866 'g',
|
|
1867 'h',
|
|
1868 'i'
|
|
1869 ];
|
|
1870 }())
|
|
1871
|
|
1872 // 2
|
|
1873 (function(){
|
|
1874 var a = [
|
|
1875 0 +
|
|
1876 5 *
|
|
1877 9 *
|
|
1878 'a',
|
|
1879 'b',
|
|
1880 0 +
|
|
1881 5 *
|
|
1882 9 *
|
|
1883 'c',
|
|
1884 'd',
|
|
1885 'e',
|
|
1886 'f',
|
|
1887 'g',
|
|
1888 'h',
|
|
1889 'i'
|
|
1890 ];
|
|
1891 }())
|
|
1892
|
|
1893 // 3
|
|
1894 (function(){
|
|
1895 var a = [
|
|
1896 0 +
|
|
1897 // comment 1
|
|
1898 5 *
|
|
1899 /* comment 2 */
|
|
1900 9 *
|
|
1901 'a',
|
|
1902 'b',
|
|
1903 0 +
|
|
1904 5 *
|
|
1905 9 *
|
|
1906 'c',
|
|
1907 'd',
|
|
1908 'e',
|
|
1909 'f',
|
|
1910 'g',
|
|
1911 'h',
|
|
1912 'i'
|
|
1913 ];
|
|
1914 }())
|
|
1915
|
|
1916 // 4
|
|
1917 {
|
|
1918 var a = [
|
|
1919 0,
|
|
1920 1
|
|
1921 ];
|
|
1922 var b;
|
|
1923 var c;
|
|
1924 }
|
|
1925
|
|
1926 // 5
|
|
1927 {
|
|
1928 var a = [
|
|
1929 [
|
|
1930 0
|
|
1931 ],
|
|
1932 2,
|
|
1933 3
|
|
1934 ];
|
|
1935 }
|
|
1936
|
|
1937 // 6
|
|
1938 {
|
|
1939 var a = [
|
|
1940 [
|
|
1941 0,
|
|
1942 1
|
|
1943 ],
|
|
1944 2,
|
|
1945 3
|
|
1946 ];
|
|
1947 }
|
|
1948
|
|
1949 // 7
|
|
1950 {
|
|
1951 var a = [
|
|
1952 // [
|
|
1953 0,
|
|
1954 // 1
|
|
1955 // ],
|
|
1956 2,
|
|
1957 3
|
|
1958 ];
|
|
1959 }
|
|
1960
|
|
1961 // 8
|
|
1962 var x = [
|
|
1963 (function(){
|
|
1964 var a,
|
|
1965 b,
|
|
1966 c,
|
|
1967 d,
|
|
1968 e,
|
|
1969 f,
|
|
1970 g,
|
|
1971 h,
|
|
1972 i;
|
|
1973 })
|
|
1974 ];
|
|
1975
|
|
1976 // 9
|
|
1977 var a = [
|
|
1978 0 +
|
|
1979 5 *
|
|
1980 9 *
|
|
1981 'a',
|
|
1982 'b',
|
|
1983 0 +
|
|
1984 5 *
|
|
1985 9 *
|
|
1986 'c',
|
|
1987 'd',
|
|
1988 'e',
|
|
1989 'f',
|
|
1990 'g',
|
|
1991 'h',
|
|
1992 'i'
|
|
1993 ];
|
|
1994
|
|
1995 // 10
|
|
1996 var a,
|
|
1997 b,
|
|
1998 c,
|
|
1999 d,
|
|
2000 e,
|
|
2001 f,
|
|
2002 g,
|
|
2003 h,
|
|
2004 i;
|
|
2005 JSEND
|
|
2006
|