-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
text.html.php.js
1762 lines (1760 loc) · 102 KB
/
text.html.php.js
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
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed permissive.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
dependencies: ['text.html.basic'],
extensions: [
'.aw',
'.ctp',
'.php3',
'.php4',
'.php5',
'.phps',
'.phpt',
'.phtml'
],
injections: {
'^text.html - (meta.embedded | meta.tag), L:^text.html meta.tag, L:text.html.php source.js':
{
patterns: [
{
begin: '(^\\s*)(?=<\\?(?![^?]*\\?>))',
beginCaptures: {
0: {name: 'punctuation.whitespace.embedded.leading.php'}
},
end: '(?!\\G)(\\s*$\\n)?',
endCaptures: {
0: {name: 'punctuation.whitespace.embedded.trailing.php'}
},
patterns: [
{
begin: '<\\?(?i:php|=)?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'}
},
contentName: 'source.php',
end: '(\\?)>',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'source.php'}
},
name: 'meta.embedded.block.php',
patterns: [{include: '#language'}]
}
]
},
{
begin: '<\\?(?i:php|=)?(?![^?]*\\?>)',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'}
},
contentName: 'source.php',
end: '(\\?)>',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'source.php'}
},
name: 'meta.embedded.block.php',
patterns: [{include: '#language'}]
},
{
begin: '<\\?(?i:php|=)?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'}
},
end: '>',
endCaptures: {0: {name: 'punctuation.section.embedded.end.php'}},
name: 'meta.embedded.line.php',
patterns: [
{
captures: {
1: {name: 'source.php'},
2: {name: 'punctuation.section.embedded.end.php'},
3: {name: 'source.php'}
},
match: '\\G(\\s*)((\\?))(?=>)',
name: 'meta.special.empty-tag.php'
},
{
begin: '\\G',
contentName: 'source.php',
end: '(\\?)(?=>)',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'source.php'}
},
patterns: [{include: '#language'}]
}
]
}
]
}
},
names: ['html+php', 'inc', 'php'],
patterns: [{include: 'text.html.basic'}],
repository: {
'class-builtin': {
patterns: [
{
captures: {1: {name: 'punctuation.separator.inheritance.php'}},
match:
'(?ix)\n\t\t\t\t\t\t(\\\\)?\\b\n\t\t\t\t\t\t(st(dClass|reamWrapper)|R(RD(Graph|Creator|Updater)|untimeException|e(sourceBundle|cursive(RegexIterator|Ca(chingIterator|llbackFilterIterator)|TreeIterator|Iterator(Iterator)?|DirectoryIterator|FilterIterator|ArrayIterator)|flect(ion(Generator|Method|Class|Type|ZendExtension|Object|P(arameter|roperty)|Extension|Function(Abstract)?)?|or)|gexIterator)|angeException)|G(ender\\\\Gender|lobIterator|magick(Draw|Pixel)?)|X(sltProcessor|ML(Reader|Diff\\\\(Memory|Base|DOM|File)|Writer)|SLTProcessor)|M(ysqlndUh(Connection|PreparedStatement)|ongo(Re(sultException|gex)|Grid(fsFile|FS(Cursor|File)?)|BinData|C(o(de|llection|mmandCursor)|ursor(Interface|Exception)?|lient)|Timestamp|I(n(sertBatch|t(32|64))|d)|D(B(Ref|\\\\(BSON\\\\(Regex|M(inKey|axKey)|Binary|Serializable|Timestamp|ObjectID|Decimal128|U(nserializable|TCDateTime)|Javascript)|Driver\\\\(Read(Concern|Preference)|Manager|BulkWrite|Server|C(ommand|ursor(Id)?)|Exception\\\\WriteException|Query|Write(Result|Concern(Error)?|Error))))?|eleteBatch|ate)|UpdateBatch|Pool|Write(Batch|ConcernException)|Log)?|u(tex|ltipleIterator)|e(ssageFormatter|mcache(d)?))|Bad(MethodCallException|FunctionCallException)|tidy(Node)?|S(ync(ReaderWriter|Mutex|S(haredMemory|emaphore)|Event)|impleXML(Iterator|Element)|oap(Server|Header|Client|Param|Var|Fault)|NMP|CA(_(SoapProxy|LocalProxy))?|p(hinxClient|oofchecker|l(M(inHeap|axHeap)|S(tack|ubject)|Heap|T(ype|empFileObject)|Ob(server|jectStorage)|DoublyLinkedList|PriorityQueue|Enum|Queue|Fi(le(Info|Object)|xedArray)))|e(ssionHandler(Interface)?|ekableIterator|rializable)|DO_(Model_(ReflectionDataObject|Type|Property)|Sequence|D(ata(Object|Factory)|AS_(Relational|XML(_Document)?|Setting|ChangeSummary|Data(Object|Factory)))|Exception|List)|wish(Result(s)?|Search)?|VM(Model)?|QLite(Result|3(Result|Stmt)?|Database|Unbuffered)|AM(Message|Connection))|H(RTime\\\\(StopWatch|PerformanceCounter)|aru(Image|Outline|D(oc|estination)|Page|Encoder|Font|Annotation))\n\t\t\t\t\t\t|Ya(f_(R(oute(_(Re(write|gex)|Map|S(tatic|imple|upervar)|Interface)|r)|e(sponse_Abstract|quest_(Simple|Http|Abstract)|gistry))|Session|Con(troller_Abstract|fig_(Simple|Ini|Abstract))|Dispatcher|Plugin_Abstract|Exception|View_(Simple|Interface)|Loader|A(ction_Abstract|pplication))|r_(Server(_Exception)?|C(oncurrent_Client|lient(_Exception)?)))|N(o(RewindIterator|rmalizer)|umberFormatter)|C(o(nd|untable|ll(ectable|ator))|URLFile|a(chingIterator|llbackFilterIterator))|T(hread(ed)?|okyoTyrant(Table|Iterator|Query)?|ra(nsliterator|versable))|I(n(tl(RuleBasedBreakIterator|BreakIterator|C(har|odePointBreakIterator|alendar)|TimeZone|Iterator|DateFormatter|PartsIterator)|validArgumentException|finiteIterator)|terator(Iterator|Aggregate)?|magick(Draw|Pixel(Iterator)?|Kernel)?)|php_user_filter|Z(MQ(Socket|Context|Device|Poll)?|ipArchive|ookeeper)|O(CI\\-(Collection|Lob)|ut(erIterator|Of(RangeException|BoundsException))|verflowException)|D(s\\\\(Map|S(tack|e(t|quence))|Hashable|Collection|Deque|P(air|riorityQueue)|Vector|Queue)|irectory(Iterator)?|omainException|OM(XPath|N(ode(list)?|amedNodeMap)|C(haracterData|omment|dataSection)|Text|Implementation|Document(Fragment)?|ProcessingInstruction|E(ntityReference|lement)|Attr)|ate(Time(I(nterface|mmutable)|Zone)?|Interval|Period))|U(n(derflowException|expectedValueException)|Converter|I\\\\(Menu(Item)?|Size|Control(s\\\\(Radio|Gr(id|oup)|MultilineEntry|B(ox|utton)|S(pin|eparator|lider)|C(heck|o(lorButton|mbo))|Tab|P(icker|rogress)|E(ntry|ditableCombo)|Form|Label))?|Draw\\\\(Matrix|Brush(\\\\(RadialGradient|Gradient|LinearGradient))?|Stroke|Color|Text\\\\(Font(\\\\Descriptor)?|Layout)|P(en|ath))|Point|Executor|Window|Area))|JsonSerializable|finfo|P(har(Data|FileInfo)?|ool|DO(Statement)?|arentIterator)|E(v(S(tat|ignal)|Ch(ild|eck)|Timer|I(o|dle)|ent(B(uffer(Event)?|ase)|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?|P(eriodic|repare)|Embed|Fork|Watcher|Loop)?|rrorException|xception|mptyIterator)|V(8Js(Exception)?|arnish(Stat|Log|Admin))|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|Frame|AttachedPictureFrame))|QuickHash(StringIntHash|Int(S(tringHash|et)|Hash))|F(il(terIterator|esystemIterator)|ANNConnection)|mysqli(_(stmt|driver|warning|result))?|W(orker|eak(Map|ref))|L(imitIterator|o(cale|gicException)|ua(Closure)?|engthException|apack)|A(ppendIterator|PC(Iterator|UIterator)|rray(Iterator|Object|Access)))\n\t\t\t\t\t\t\\b\n\t\t\t\t\t',
name: 'support.class.builtin.php'
}
]
},
'class-name': {
patterns: [
{
begin: '(?i)(?=\\\\?[a-z_0-9]+\\\\)',
end: '(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\]|\\z)',
endCaptures: {1: {name: 'support.class.php'}},
patterns: [{include: '#namespace'}]
},
{include: '#class-builtin'},
{
begin: '(?=[\\\\a-zA-Z_])',
end: '(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\]|\\z)',
endCaptures: {1: {name: 'support.class.php'}},
patterns: [{include: '#namespace'}]
}
]
},
comments: {
patterns: [
{
begin: '/\\*\\*(?:#@\\+)?\\s*$',
captures: {0: {name: 'punctuation.definition.comment.php'}},
end: '\\*/',
name: 'comment.block.documentation.phpdoc.php',
patterns: [{include: '#php_doc'}]
},
{
begin: '/\\*',
captures: {0: {name: 'punctuation.definition.comment.php'}},
end: '\\*/',
name: 'comment.block.php'
},
{
begin: '(^[ \\t]+)?(?=//)',
beginCaptures: {
1: {name: 'punctuation.whitespace.comment.leading.php'}
},
end: '(?!\\G)',
patterns: [
{
begin: '//',
beginCaptures: {0: {name: 'punctuation.definition.comment.php'}},
end: '\\n|(?=\\?>)',
name: 'comment.line.double-slash.php'
}
]
},
{
begin: '(^[ \\t]+)?(?=#)',
beginCaptures: {
1: {name: 'punctuation.whitespace.comment.leading.php'}
},
end: '(?!\\G)',
patterns: [
{
begin: '#',
beginCaptures: {0: {name: 'punctuation.definition.comment.php'}},
end: '\\n|(?=\\?>)',
name: 'comment.line.number-sign.php'
}
]
}
]
},
constants: {
patterns: [
{
begin:
'(?xi)(?=\n\t\t\t (\n\t\t\t (\\\\[a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)|\n\t\t\t ([a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)\n\t\t\t )\n\t\t\t [^a-z_0-9\\\\])',
end: '(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])',
endCaptures: {1: {name: 'constant.other.php'}},
patterns: [{include: '#namespace'}]
},
{
begin: '(?=\\\\?[a-zA-Z_\\x{7f}-\\x{ff}])',
end: '(?=[^\\\\a-zA-Z_\\x{7f}-\\x{ff}])',
patterns: [
{
match:
'(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b',
name: 'constant.language.php'
},
{
captures: {1: {name: 'punctuation.separator.inheritance.php'}},
match:
'(\\\\)?\\b(STD(IN|OUT|ERR)|ZEND_(THREAD_SAFE|DEBUG_BUILD)|DEFAULT_INCLUDE_PATH|P(HP_(R(OUND_HALF_(ODD|DOWN|UP|EVEN)|ELEASE_VERSION)|M(INOR_VERSION|A(XPATHLEN|JOR_VERSION))|BINDIR|S(HLIB_SUFFIX|YSCONFDIR|API)|CONFIG_FILE_(SCAN_DIR|PATH)|INT_(MAX|SIZE)|ZTS|O(S|UTPUT_HANDLER_(START|CONT|END))|D(EBUG|ATADIR)|URL_(SCHEME|HOST|USER|P(ORT|A(SS|TH))|QUERY|FRAGMENT)|PREFIX|E(XT(RA_VERSION|ENSION_DIR)|OL)|VERSION(_ID)?|WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)|VERSION_(M(INOR|AJOR)|BUILD|S(UITEMASK|P_M(INOR|AJOR))|P(RODUCTTYPE|LATFORM)))|L(IBDIR|OCALSTATEDIR))|EAR_(INSTALL_DIR|EXTENSION_DIR))|E_(RECOVERABLE_ERROR|STRICT|NOTICE|CO(RE_(ERROR|WARNING)|MPILE_(ERROR|WARNING))|DEPRECATED|USER_(NOTICE|DEPRECATED|ERROR|WARNING)|PARSE|ERROR|WARNING|ALL))\\b',
name: 'support.constant.core.php'
},
{
captures: {1: {name: 'punctuation.separator.inheritance.php'}},
match:
'(\\\\)?\\b(RADIXCHAR|GROUPING|M(_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRTPI|PI)|PI(_(2|4))?|E(ULER)?|L(N(10|2|PI)|OG(10E|2E)))|ON_(GROUPING|1(1|2|0)?|7|2|8|THOUSANDS_SEP|3|DECIMAL_POINT|9|4|5|6))|S(TR_PAD_(RIGHT|BOTH|LEFT)|ORT_(REGULAR|STRING|NUMERIC|DESC|LOCALE_STRING|ASC)|EEK_(SET|CUR|END))|H(TML_(SPECIALCHARS|ENTITIES)|ASH_HMAC)|YES(STR|EXPR)|N(_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|O(STR|EXPR)|EGATIVE_SIGN|AN)|C(R(YPT_(MD5|BLOWFISH|S(HA(256|512)|TD_DES|ALT_LENGTH)|EXT_DES)|NCYSTR|EDITS_(G(ROUP|ENERAL)|MODULES|SAPI|DOCS|QA|FULLPAGE|ALL))|HAR_MAX|O(NNECTION_(NORMAL|TIMEOUT|ABORTED)|DESET|UNT_(RECURSIVE|NORMAL))|URRENCY_SYMBOL|ASE_(UPPER|LOWER))|__COMPILER_HALT_OFFSET__|T(HOUS(EP|ANDS_SEP)|_FMT(_AMPM)?)|IN(T_(CURR_SYMBOL|FRAC_DIGITS)|I_(S(YSTEM|CANNER_(RAW|NORMAL))|USER|PERDIR|ALL)|F(O_(GENERAL|MODULES|C(REDITS|ONFIGURATION)|ENVIRONMENT|VARIABLES|LICENSE|ALL))?)|D(_(T_FMT|FMT)|IRECTORY_SEPARATOR|ECIMAL_POINT|A(Y_(1|7|2|3|4|5|6)|TE_(R(SS|FC(1(123|036)|2822|8(22|50)|3339))|COOKIE|ISO8601|W3C|ATOM)))|UPLOAD_ERR_(NO_(TMP_DIR|FILE)|CANT_WRITE|INI_SIZE|OK|PARTIAL|EXTENSION|FORM_SIZE)|P(M_STR|_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|OSITIVE_SIGN|ATH(_SEPARATOR|INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)))|E(RA(_(YEAR|T_FMT|D_(T_FMT|FMT)))?|XTR_(REFS|SKIP|IF_EXISTS|OVERWRITE|PREFIX_(SAME|I(NVALID|F_EXISTS)|ALL))|NT_(NOQUOTES|COMPAT|IGNORE|QUOTES))|FRAC_DIGITS|L(C_(M(ONETARY|ESSAGES)|NUMERIC|C(TYPE|OLLATE)|TIME|ALL)|O(G_(MAIL|SYSLOG|N(O(TICE|WAIT)|DELAY|EWS)|C(R(IT|ON)|ONS)|INFO|ODELAY|D(EBUG|AEMON)|U(SER|UCP)|P(ID|ERROR)|E(RR|MERG)|KERN|WARNING|L(OCAL(1|7|2|3|4|5|0|6)|PR)|A(UTH(PRIV)?|LERT))|CK_(SH|NB|UN|EX)))|A(M_STR|B(MON_(1(1|2|0)?|7|2|8|3|9|4|5|6)|DAY_(1|7|2|3|4|5|6))|SSERT_(BAIL|CALLBACK|QUIET_EVAL|WARNING|ACTIVE)|LT_DIGITS))\\b',
name: 'support.constant.std.php'
},
{
captures: {1: {name: 'punctuation.separator.inheritance.php'}},
match:
'(?x)\n\t\t\t\t\t\t\t\t(\\\\)?\\b\n\t\t\t\t\t\t\t\t(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)|XML_(SAX_IMPL|HTML_DOCUMENT_NODE|N(OTATION_NODE|AMESPACE_DECL_NODE)|C(OMMENT_NODE|DATA_SECTION_NODE)|TEXT_NODE|OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)|D(TD_NODE|OCUMENT_(NODE|TYPE_NODE|FRAG_NODE))|PI_NODE|E(RROR_(RECURSIVE_ENTITY_REF|MISPLACED_XML_PI|B(INARY_ENTITY_REF|AD_CHAR_REF)|SYNTAX|NO(NE|_(MEMORY|ELEMENTS))|TAG_MISMATCH|IN(CORRECT_ENCODING|VALID_TOKEN)|DUPLICATE_ATTRIBUTE|UN(CLOSED_(CDATA_SECTION|TOKEN)|DEFINED_ENTITY|KNOWN_ENCODING)|JUNK_AFTER_DOC_ELEMENT|PAR(TIAL_CHAR|AM_ENTITY_REF)|EXTERNAL_ENTITY_HANDLING|A(SYNC_ENTITY|TTRIBUTE_EXTERNAL_ENTITY_REF))|NTITY_(REF_NODE|NODE|DECL_NODE)|LEMENT_(NODE|DECL_NODE))|LOCAL_NAMESPACE|ATTRIBUTE_(N(MTOKEN(S)?|O(TATION|DE))|CDATA|ID(REF(S)?)?|DECL_NODE|EN(TITY|UMERATION)))|M(HASH_(RIPEMD(1(28|60)|256|320)|GOST|MD(2|4|5)|S(HA(1|2(24|56)|384|512)|NEFRU256)|HAVAL(1(28|92|60)|2(24|56))|CRC32(B)?|TIGER(1(28|60))?|WHIRLPOOL|ADLER32)|YSQL(_(BOTH|NUM|CLIENT_(SSL|COMPRESS|I(GNORE_SPACE|NTERACTIVE))|ASSOC)|I_(RE(PORT_(STRICT|INDEX|OFF|ERROR|ALL)|FRESH_(GRANT|MASTER|BACKUP_LOG|S(TATUS|LAVE)|HOSTS|T(HREADS|ABLES)|LOG)|AD_DEFAULT_(GROUP|FILE))|GROUP_FLAG|MULTIPLE_KEY_FLAG|B(INARY_FLAG|OTH|LOB_FLAG)|S(T(MT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|ORE_RESULT)|E(RVER_QUERY_(NO_(GOOD_INDEX_USED|INDEX_USED)|WAS_SLOW)|T_(CHARSET_NAME|FLAG)))|N(O(_D(EFAULT_VALUE_FLAG|ATA)|T_NULL_FLAG)|UM(_FLAG)?)|C(URSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)|LIENT_(SSL|NO_SCHEMA|COMPRESS|I(GNORE_SPACE|NTERACTIVE)|FOUND_ROWS))|T(YPE_(GEOMETRY|MEDIUM_BLOB|B(IT|LOB)|S(HORT|TRING|ET)|YEAR|N(ULL|EWD(ECIMAL|ATE))|CHAR|TI(ME(STAMP)?|NY(_BLOB)?)|INT(24|ERVAL)|D(OUBLE|ECIMAL|ATE(TIME)?)|ENUM|VAR_STRING|FLOAT|LONG(_BLOB|LONG)?)|IMESTAMP_FLAG)|INIT_COMMAND|ZEROFILL_FLAG|O(N_UPDATE_NOW_FLAG|PT_(NET_(READ_BUFFER_SIZE|CMD_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE))|D(EBUG_TRACE_ENABLED|ATA_TRUNCATED)|U(SE_RESULT|N(SIGNED_FLAG|IQUE_KEY_FLAG))|P(RI_KEY_FLAG|ART_KEY_FLAG)|ENUM_FLAG|A(S(SOC|YNC)|UTO_INCREMENT_FLAG)))|CRYPT_(R(C(2|6)|IJNDAEL_(1(28|92)|256)|AND)|GOST|XTEA|M(ODE_(STREAM|NOFB|C(BC|FB)|OFB|ECB)|ARS)|BLOWFISH(_COMPAT)?|S(ERPENT|KIPJACK|AFER(128|PLUS|64))|C(RYPT|AST_(128|256))|T(RIPLEDES|HREEWAY|WOFISH)|IDEA|3DES|\n\t\t\t\t\t\t\t\t\tDE(S|CRYPT|V_(RANDOM|URANDOM))|PANAMA|EN(CRYPT|IGNA)|WAKE|LOKI97|ARCFOUR(_IV)?))|S(TREAM_(REPORT_ERRORS|M(UST_SEEK|KDIR_RECURSIVE)|BUFFER_(NONE|FULL|LINE)|S(HUT_(RD(WR)?|WR)|OCK_(R(DM|AW)|S(TREAM|EQPACKET)|DGRAM)|ERVER_(BIND|LISTEN))|NOTIFY_(RE(SOLVE|DIRECTED)|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|CO(MPLETED|NNECT)|PROGRESS|F(ILE_SIZE_IS|AILURE)|AUTH_RE(SULT|QUIRED))|C(RYPTO_METHOD_(SSLv(2(_(SERVER|CLIENT)|3_(SERVER|CLIENT))|3_(SERVER|CLIENT))|TLS_(SERVER|CLIENT))|LIENT_(CONNECT|PERSISTENT|ASYNC_CONNECT)|AST_(FOR_SELECT|AS_STREAM))|I(GNORE_URL|S_URL|PPROTO_(RAW|TCP|I(CMP|P)|UDP))|O(OB|PTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER))|U(RL_STAT_(QUIET|LINK)|SE_PATH)|P(EEK|F_(INET(6)?|UNIX))|ENFORCE_SAFE_MODE|FILTER_(READ|WRITE|ALL))|UNFUNCS_RET_(STRING|TIMESTAMP|DOUBLE)|QLITE(_(R(OW|EADONLY)|MIS(MATCH|USE)|B(OTH|USY)|SCHEMA|N(O(MEM|T(FOUND|ADB)|LFS)|UM)|C(O(RRUPT|NSTRAINT)|ANTOPEN)|TOOBIG|I(NTER(RUPT|NAL)|OERR)|OK|DONE|P(ROTOCOL|ERM)|E(RROR|MPTY)|F(ORMAT|ULL)|LOCKED|A(BORT|SSOC|UTH))|3_(B(OTH|LOB)|NU(M|LL)|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT|ASSOC)))|CURL(M(SG_DONE|_(BAD_(HANDLE|EASY_HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|O(UT_OF_MEMORY|K)))|SSH_AUTH_(HOST|NONE|DEFAULT|P(UBLICKEY|ASSWORD)|KEYBOARD)|CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC))|_(HTTP_VERSION_(1_(1|0)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(MODSINCE|UNMODSINCE)|LASTMOD)|IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))|INFO_(RE(DIRECT_(COUNT|TIME)|QUEST_SIZE)|S(SL_VERIFYRESULT|TARTTRANSFER_TIME|IZE_(DOWNLOAD|UPLOAD)|PEED_(DOWNLOAD|UPLOAD))|H(TTP_CODE|EADER_(SIZE|OUT))|NAMELOOKUP_TIME|C(ON(NECT_TIME|TENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD)))|ERTINFO)|TOTAL_TIME|PR(IVATE|ETRANSFER_TIME)|EFFECTIVE_URL|FILETIME)|OPT_(R(E(SUME_FROM|TURNTRANSFER|DIR_PROTOCOLS|FERER|AD(DATA|FUNCTION))|AN(GE|DOM_FILE))|MAX(REDIRS|CONNECTS)|B(INARYTRANSFER|UFFERSIZE)|S(S(H_(HOST_PUBLIC_KEY_MD5|P(RIVATE_KEYFILE|UBLIC_KEYFILE)|AUTH_TYPES)|L(CERT(TYPE|PASSWD)?|_(CIPHER_LIST|VERIFY(HOST|PEER))|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?))|TDERR)|H(TTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)|EADER(FUNCTION)?)\n\t\t\t\t\t\t\t\t\t|N(O(BODY|SIGNAL|PROGRESS)|ETRC)|C(RLF|O(NNECTTIMEOUT(_MS)?|OKIE(SESSION|JAR|FILE)?)|USTOMREQUEST|ERTINFO|LOSEPOLICY|A(INFO|PATH))|T(RANSFERTEXT|CP_NODELAY|IME(CONDITION|OUT(_MS)?|VALUE))|I(N(TERFACE|FILE(SIZE)?)|PRESOLVE)|DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|U(RL|SER(PWD|AGENT)|NRESTRICTED_AUTH|PLOAD)|P(R(IVATE|O(GRESSFUNCTION|XY(TYPE|USERPWD|PORT|AUTH)?|TOCOLS))|O(RT|ST(REDIR|QUOTE|FIELDS)?)|UT)|E(GDSOCKET|NCODING)|VERBOSE|K(RB4LEVEL|EYPASSWD)|QUOTE|F(RESH_CONNECT|TP(SSLAUTH|_(S(SL|KIP_PASV_IP)|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)|PORT|LISTONLY|APPEND)|ILE(TIME)?|O(RBID_REUSE|LLOWLOCATION)|AILONERROR)|WRITE(HEADER|FUNCTION)|LOW_SPEED_(TIME|LIMIT)|AUTOREFERER)|PRO(XY_(SOCKS(4|5)|HTTP)|TO_(S(CP|FTP)|HTTP(S)?|T(ELNET|FTP)|DICT|F(TP(S)?|ILE)|LDAP(S)?|ALL))|E_(RE(CV_ERROR|AD_ERROR)|GOT_NOTHING|MALFORMAT_USER|BAD_(C(ONTENT_ENCODING|ALLING_ORDER)|PASSWORD_ENTERED|FUNCTION_ARGUMENT)|S(S(H|L_(C(IPHER|ONNECT_ERROR|ERTPROBLEM|ACERT)|PEER_CERTIFICATE|ENGINE_(SETFAILED|NOTFOUND)))|HARE_IN_USE|END_ERROR)|HTTP_(RANGE_ERROR|NOT_FOUND|PO(RT_FAILED|ST_ERROR))|COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|T(OO_MANY_REDIRECTS|ELNET_OPTION_SYNTAX)|O(BSOLETE|UT_OF_MEMORY|PERATION_TIMEOUTED|K)|U(RL_MALFORMAT(_USER)?|N(SUPPORTED_PROTOCOL|KNOWN_TELNET_OPTION))|PARTIAL_FILE|F(TP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|C(OULDNT_(RETR_FILE|GET_SIZE|S(TOR_FILE|ET_(BINARY|ASCII))|USE_REST)|ANT_(RECONNECT|GET_HOST))|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|W(RITE_ERROR|EIRD_(SERVER_REPLY|227_FORMAT|USER_REPLY|PAS(S_REPLY|V_REPLY)))|ACCESS_DENIED)|ILE(SIZE_EXCEEDED|_COULDNT_READ_FILE)|UNCTION_NOT_FOUND|AILED_INIT)|WRITE_ERROR|L(IBRARY_NOT_FOUND|DAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL))|ABORTED_BY_CALLBACK)|VERSION_NOW|FTP(METHOD_(MULTICWD|SINGLECWD|NOCWD)|SSL_(NONE|CONTROL|TRY|ALL)|AUTH_(SSL|TLS|DEFAULT))|AUTH_(GSSNEGOTIATE|BASIC|NTLM|DIGEST|ANY(SAFE)?))|I(MAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|I(CO|FF)|UNKNOWN|J(B2|P(X|2|C|EG(2000)?))|P(SD|NG)|WBMP)|NPUT_(REQUEST|GET|SE(RVER|SSION)|COOKIE|POST|ENV)|CONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION))|D(NS_(MX|S(RV|OA)|HINFO|N(S|APTR)|CNAME|TXT|PTR|A(NY|LL|AAA|6)?)|OM(STRING_SIZE_ERR|_(SYNTAX_ERR|HIERARCHY_REQUEST_ERR|N(O(_(MODIFICATION_ALLOWED_ERR|DATA_ALLOWED_ERR)|T_(SUPPORTED_ERR|FOUND_ERR))|AMESPACE_ERR)|IN(DEX_SIZE_ERR|USE_ATTRIBUTE_ERR|VALID_(MODIFICATION_ERR|STATE_ERR|CHARACTER_ERR|ACCESS_ERR))|PHP_ERR|VALIDATION_ERR|WRONG_DOCUMENT_ERR)))|JSON_(HEX_(TAG|QUOT|A(MP|POS))|NUMERIC_CHECK|ERROR_(S(YNTAX|TATE_MISMATCH)|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)|P(REG_(RECURSION_LIMIT_ERROR|GREP_INVERT|BA(CKTRACK_LIMIT_ERROR|D_UTF8_(OFFSET_ERROR|ERROR))|S(PLIT_(NO_EMPTY|OFFSET_CAPTURE|DELIM_CAPTURE)|ET_ORDER)|NO_ERROR|INTERNAL_ERROR|OFFSET_CAPTURE|PATTERN_ORDER)|SFS_(PASS_ON|ERR_FATAL|F(EED_ME|LAG_(NORMAL|FLUSH_(CLOSE|INC))))|CRE_VERSION|OSIX_(R_OK|X_OK|S_IF(REG|BLK|SOCK|CHR|IFO)|F_OK|W_OK))|F(NM_(NOESCAPE|CASEFOLD|P(ERIOD|ATHNAME))|IL(TER_(REQUIRE_(SCALAR|ARRAY)|SANITIZE_(MAGIC_QUOTES|S(TRI(NG|PPED)|PECIAL_CHARS)|NUMBER_(INT|FLOAT)|URL|E(MAIL|NCODED)|FULL_SPECIAL_CHARS)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW|VALIDATE_(REGEXP|BOOLEAN|I(NT|P)|URL|EMAIL|FLOAT)|F(ORCE_ARRAY|LAG_(S(CHEME_REQUIRED|TRIP_(BACKTICK|HIGH|LOW))|HOST_REQUIRED|NO(NE|_(RES_RANGE|PRIV_RANGE|ENCODE_QUOTES))|IPV(4|6)|PATH_REQUIRED|E(MPTY_STRING_NULL|NCODE_(HIGH|LOW|AMP))|QUERY_REQUIRED|ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION))))|E(_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)|INFO_(RAW|MIME(_(TYPE|ENCODING))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)))|ORCE_(GZIP|DEFLATE))|LIBXML_(XINCLUDE|N(SCLEAN|O(XMLDECL|BLANKS|NET|CDATA|E(RROR|MPTYTAG|NT)|WARNING))|COMPACT|D(TD(VALID|LOAD|ATTR)|OTTED_VERSION)|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)|VERSION|LOADED_VERSION))\n\t\t\t\t\t\t\t\\b\n\t\t\t\t\t\t\t',
name: 'support.constant.ext.php'
},
{
captures: {1: {name: 'punctuation.separator.inheritance.php'}},
match:
'(\\\\)?\\bT_(RE(TURN|QUIRE(_ONCE)?)|G(OTO|LOBAL)|XOR_EQUAL|M(INUS_EQUAL|OD_EQUAL|UL_EQUAL|ETHOD_C|L_COMMENT)|B(REAK|OOL(_CAST|EAN_(OR|AND))|AD_CHARACTER)|S(R(_EQUAL)?|T(RING(_(CAST|VARNAME))?|A(RT_HEREDOC|TIC))|WITCH|L(_EQUAL)?)|HALT_COMPILER|N(S_(SEPARATOR|C)|UM_STRING|EW|AMESPACE)|C(HARACTER|O(MMENT|N(ST(ANT_ENCAPSED_STRING)?|CAT_EQUAL|TINUE))|URLY_OPEN|L(O(SE_TAG|NE)|ASS(_C)?)|A(SE|TCH))|T(RY|HROW)|I(MPLEMENTS|S(SET|_(GREATER_OR_EQUAL|SMALLER_OR_EQUAL|NOT_(IDENTICAL|EQUAL)|IDENTICAL|EQUAL))|N(STANCEOF|C(LUDE(_ONCE)?)?|T(_CAST|ERFACE)|LINE_HTML)|F)|O(R_EQUAL|BJECT_(CAST|OPERATOR)|PEN_TAG(_WITH_ECHO)?|LD_FUNCTION)|D(NUMBER|I(R|V_EQUAL)|O(C_COMMENT|UBLE_(C(OLON|AST)|ARROW)|LLAR_OPEN_CURLY_BRACES)?|E(C(LARE)?|FAULT))|U(SE|NSET(_CAST)?)|P(R(I(NT|VATE)|OTECTED)|UBLIC|LUS_EQUAL|AAMAYIM_NEKUDOTAYIM)|E(X(TENDS|IT)|MPTY|N(CAPSED_AND_WHITESPACE|D(SWITCH|_HEREDOC|IF|DECLARE|FOR(EACH)?|WHILE))|CHO|VAL|LSE(IF)?)|VAR(IABLE)?|F(I(NAL|LE)|OR(EACH)?|UNC(_C|TION))|WHI(TESPACE|LE)|L(NUMBER|I(ST|NE)|OGICAL_(XOR|OR|AND))|A(RRAY(_CAST)?|BSTRACT|S|ND_EQUAL))\\b',
name: 'support.constant.parser-token.php'
},
{
match: '[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*',
name: 'constant.other.php'
}
]
}
]
},
'function-arguments': {
patterns: [
{include: '#comments'},
{
begin:
'(?ix)\n\t\t\t\t\t\t(?: # Optional\n\t\t\t\t\t\t\t(\\?)?\n\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t (array|bool|float|int|string|mixed|never|object) # scalar-type\n\t\t\t\t\t\t\t | (callable|iterable) # base-type-declaration\n\t\t\t\t\t\t\t | ([a-z_0-9\\\\]*[a-z_][a-z_0-9]*)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t(?:(&)\\s*)? # Reference\n\t\t\t\t\t\t((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name\n\t\t\t\t\t',
beginCaptures: {
1: {name: 'storage.modifier.nullable.php'},
2: {name: 'storage.type.$2.php'},
3: {name: 'storage.modifier.$3.php'},
4: {patterns: [{include: '#class-name'}]},
5: {name: 'storage.modifier.reference.php'},
6: {name: 'variable.other.php'},
7: {name: 'punctuation.definition.variable.php'}
},
end: '(?=,|\\)|/[/*]|\\#)',
name: 'meta.function.argment.php',
patterns: [
{
begin: '\\s*(=)',
beginCaptures: {1: {name: 'keyword.operator.assignment.php'}},
end: '(?=,|\\)|/[/*]|\\#)',
patterns: [{include: '#parameter-default-types'}]
},
{
match: '\\S',
name: 'invalid.illegal.character-not-allowed-here.php'
}
]
}
]
},
'function-call': {
patterns: [
{
begin: '(?i)(?=\\\\?[a-z_0-9\\\\]+\\\\[a-z_][a-z0-9_]*\\s*\\()',
end: '(?=\\s*\\()',
patterns: [{include: '#user-function-call'}]
},
{
match: '(?i)\\b(print|echo)\\b',
name: 'support.function.construct.php'
},
{
begin: '(?i)(\\\\)?(?=\\b[a-z_][a-z_0-9]*\\s*\\()',
beginCaptures: {1: {name: 'punctuation.separator.inheritance.php'}},
end: '(?=\\s*\\()',
patterns: [
{
match: '(?i)\\b(isset|unset|e(val|mpty)|list)(?=\\s*\\()',
name: 'support.function.construct.php'
},
{include: '#support'},
{include: '#user-function-call'}
]
}
]
},
heredoc: {
patterns: [
{
begin: '(?=<<<\\s*("?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$)',
end: '(?!\\G)',
injections: {'*': {patterns: [{include: '#interpolation'}]}},
name: 'string.unquoted.heredoc.php',
patterns: [{include: '#heredoc_interior'}]
},
{
begin: "(?=<<<\\s*('?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$)",
end: '(?!\\G)',
name: 'string.unquoted.heredoc.nowdoc.php',
patterns: [{include: '#heredoc_interior'}]
}
],
repository: {
heredoc_interior: {
patterns: [
{
begin: '(<<<)\\s*([\'"]?)(HTML)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'text.html',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
name: 'meta.embedded.html',
patterns: [{include: 'text.html.basic'}]
},
{
begin: '(<<<)\\s*([\'"]?)(XML)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'text.xml',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
name: 'meta.embedded.xml',
patterns: [{include: 'text.xml'}]
},
{
begin: '(<<<)\\s*([\'"]?)(SQL)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'source.sql',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
name: 'meta.embedded.sql',
patterns: [{include: 'source.sql'}]
},
{
begin: '(<<<)\\s*([\'"]?)(JAVASCRIPT)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'source.js',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
name: 'meta.embedded.js',
patterns: [{include: 'source.js'}]
},
{
begin: '(<<<)\\s*([\'"]?)(JSON)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'source.json',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
name: 'meta.embedded.json',
patterns: [{include: 'source.json'}]
},
{
begin: '(<<<)\\s*([\'"]?)(CSS)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'source.css',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
name: 'meta.embedded.css',
patterns: [{include: 'source.css'}]
},
{
begin: '(<<<)\\s*([\'"]?)(REGEX)(\\2)\\s*$\\n?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.php'},
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
contentName: 'string.regexp.heredoc.php',
end: '^\\s*(\\3)\\b',
endCaptures: {
0: {name: 'punctuation.section.embedded.end.php'},
1: {name: 'keyword.operator.heredoc.php'}
},
patterns: [
{
match: '(\\\\){1,2}[.$^\\[\\]{}]',
name: 'constant.character.escape.regex.php'
},
{
captures: {
1: {
name: 'punctuation.definition.arbitrary-repitition.php'
},
3: {name: 'punctuation.definition.arbitrary-repitition.php'}
},
match: '(\\{)\\d+(,\\d+)?(\\})',
name: 'string.regexp.arbitrary-repitition.php'
},
{
begin: '\\[(?:\\^?\\])?',
captures: {
0: {name: 'punctuation.definition.character-class.php'}
},
end: '\\]',
name: 'string.regexp.character-class.php',
patterns: [
{
match: "\\\\[\\\\'\\[\\]]",
name: 'constant.character.escape.php'
}
]
},
{match: '[$^+*]', name: 'keyword.operator.regexp.php'},
{
begin:
'(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)',
beginCaptures: {
1: {name: 'punctuation.definition.comment.php'}
},
end: '$\\n?',
endCaptures: {
0: {name: 'punctuation.definition.comment.php'}
},
name: 'comment.line.number-sign.php'
}
]
},
{
begin: '(<<<)\\s*([\'"]?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\2)',
beginCaptures: {
1: {name: 'punctuation.definition.string.php'},
3: {name: 'keyword.operator.heredoc.php'}
},
end: '^\\s*(\\3)\\b',
endCaptures: {1: {name: 'keyword.operator.heredoc.php'}}
}
]
}
}
},
instantiation: {
begin: '(?i)(new)\\s+',
beginCaptures: {1: {name: 'keyword.other.new.php'}},
end: '(?i)(?=[^$a-z0-9_\\\\])',
patterns: [
{match: '(parent|static|self)(?=[^a-z0-9_])', name: 'storage.type.php'},
{include: '#class-name'},
{include: '#variable-name'}
]
},
interpolation: {
patterns: [
{match: '\\\\[0-7]{1,3}', name: 'constant.numeric.octal.php'},
{match: '\\\\x[0-9A-Fa-f]{1,2}', name: 'constant.numeric.hex.php'},
{match: '\\\\[enrt\\\\\\$\\"]', name: 'constant.character.escape.php'},
{
begin: '(\\{)(?=\\$.*?\\})',
beginCaptures: {1: {name: 'punctuation.definition.variable.php'}},
end: '(\\})',
endCaptures: {1: {name: 'punctuation.definition.variable.php'}},
patterns: [{include: '#language'}]
},
{include: '#variable-name'}
]
},
'invoke-call': {
captures: {
1: {name: 'punctuation.definition.variable.php'},
2: {name: 'variable.other.php'}
},
match: '(?i)(\\$+)([a-z_][a-z_0-9]*)(?=\\s*\\()',
name: 'meta.function-call.invoke.php'
},
language: {
patterns: [
{include: '#comments'},
{match: '\\{', name: 'punctuation.section.scope.begin.php'},
{match: '\\}', name: 'punctuation.section.scope.end.php'},
{
begin: '(?i)^\\s*(interface)\\s+([a-z0-9_]+)\\s*(extends)?\\s*',
beginCaptures: {
1: {name: 'storage.type.interface.php'},
2: {name: 'entity.name.type.interface.php'},
3: {name: 'storage.modifier.extends.php'}
},
end: '((?:[a-zA-Z0-9_]+\\s*,\\s*)*)([a-zA-Z0-9_]+)?\\s*(?:(?=\\{)|$)',
endCaptures: {
1: {
patterns: [
{
match: '[a-zA-Z0-9_]+',
name: 'entity.other.inherited-class.php'
},
{match: ',', name: 'punctuation.separator.classes.php'}
]
},
2: {name: 'entity.other.inherited-class.php'}
},
name: 'meta.interface.php',
patterns: [{include: '#namespace'}]
},
{
begin: '(?i)^\\s*(enum)\\s+([a-z0-9_]+)\\s*(implements)?\\s*',
beginCaptures: {
1: {name: 'storage.type.enum.php'},
2: {name: 'entity.name.type.enum.php'},
3: {name: 'storage.modifier.extends.php'}
},
end: '((?:[a-zA-Z0-9_]+\\s*,\\s*)*)([a-zA-Z0-9_]+)?\\s*(?:(?=\\{)|$)',
endCaptures: {
1: {
patterns: [
{
match: '[a-zA-Z0-9_]+',
name: 'entity.other.inherited-class.php'
},
{match: ',', name: 'punctuation.separator.classes.php'}
]
},
2: {name: 'entity.other.inherited-class.php'}
},
name: 'meta.enum.php',
patterns: [{include: '#namespace'}]
},
{
begin:
'(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\b\\s+(?=([a-z0-9_\\\\]+\\s*($|[;{]|(\\/[\\/*])))|$)',
beginCaptures: {1: {name: 'keyword.other.namespace.php'}},
contentName: 'entity.name.type.namespace.php',
end: '(?i)(?=\\s*$|[^a-z0-9_\\\\])',
name: 'meta.namespace.php',
patterns: [
{match: '\\\\', name: 'punctuation.separator.inheritance.php'}
]
},
{
begin: '(?i)\\s*\\b(use)\\s+(?:((const)|(function))\\s+)?',
beginCaptures: {
1: {name: 'keyword.other.use.php'},
3: {name: 'storage.type.const.php'},
4: {name: 'storage.type.function.php'}
},
end: '(?=;|(?:^\\s*$))',
name: 'meta.use.php',
patterns: [
{include: '#comments'},
{
begin: '(?i)\\s*(?=[a-z_0-9\\\\])',
end: '(?xi)(?:\n \t\t\t (?:\\s*(as)\\b\\s*([a-z_0-9]*)\\s*(?=,|;|$))\n \t\t\t |(?=,|;|$)\n \t\t\t )',
endCaptures: {
1: {name: 'keyword.other.use-as.php'},
2: {name: 'support.other.namespace.use-as.php'}
},
patterns: [
{include: '#class-builtin'},
{
begin: '(?i)\\s*(?=[\\\\a-z_0-9])',
end: '$|(?=[\\s,;])',
name: 'support.other.namespace.use.php',
patterns: [
{
match: '\\\\',
name: 'punctuation.separator.inheritance.php'
}
]
}
]
},
{match: '\\s*,\\s*'}
]
},
{
begin: '(?i)^\\s*(trait)\\s+([a-zA-Z0-9_]+)',
beginCaptures: {
1: {name: 'storage.type.trait.php'},
2: {name: 'entity.name.type.trait.php'}
},
end: '(?=\\{)',
name: 'meta.trait.php'
},
{
begin: '(?i)^\\s*(abstract|final)?\\s*(class)\\s+([a-z0-9_]+)\\s*',
beginCaptures: {
1: {name: 'storage.modifier.abstract.php'},
2: {name: 'storage.type.class.php'},
3: {name: 'entity.name.type.class.php'}
},
end: '(?=[;{])',
name: 'meta.class.php',
patterns: [
{include: '#comments'},
{
begin: '(?i)(extends)\\s+',
beginCaptures: {1: {name: 'storage.modifier.extends.php'}},
contentName: 'meta.other.inherited-class.php',
end: '(?i)(?=[^a-z_0-9\\\\])',
patterns: [
{
begin: '(?i)(?=\\\\?[a-z_0-9]+\\\\)',
end: '(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])',
endCaptures: {1: {name: 'entity.other.inherited-class.php'}},
patterns: [{include: '#namespace'}]
},
{include: '#class-builtin'},
{include: '#namespace'},
{
match: '(?i)[a-z_][a-z_0-9]*',
name: 'entity.other.inherited-class.php'
}
]
},
{
begin: '(?i)(implements)\\s+',
beginCaptures: {1: {name: 'storage.modifier.implements.php'}},
end: '(?i)(?=[;{])',
patterns: [
{include: '#comments'},
{
begin: '(?i)(?=[a-z0-9_\\\\]+)',
contentName: 'meta.other.inherited-class.php',
end: '(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)',
patterns: [
{
begin: '(?i)(?=\\\\?[a-z_0-9]+\\\\)',
end: '(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])',
endCaptures: {
1: {name: 'entity.other.inherited-class.php'}
},
patterns: [{include: '#namespace'}]
},
{include: '#class-builtin'},
{include: '#namespace'},
{
match: '(?i)[a-z_][a-z_0-9]*',
name: 'entity.other.inherited-class.php'
}
]
}
]
}
]
},
{
captures: {1: {name: 'keyword.control.php'}},
match:
'\\s*\\b((break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|match|return|switch|use|while|yield))\\b'
},
{
begin: '(?i)\\b((?:require|include)(?:_once)?)\\b\\s*',
beginCaptures: {1: {name: 'keyword.control.import.include.php'}},
end: '(?=\\s|;|$)',
name: 'meta.include.php',
patterns: [{include: '#language'}]
},
{
begin: '\\b(catch)\\b\\s*\\(\\s*',
beginCaptures: {1: {name: 'keyword.control.exception.catch.php'}},
end: '([A-Za-z_][A-Za-z_0-9]*)\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)?\\s*\\)',
endCaptures: {
1: {name: 'support.class.exception.php'},
2: {name: 'variable.other.php'},
3: {name: 'punctuation.definition.variable.php'}
},
name: 'meta.catch.php',
patterns: [{include: '#namespace'}]
},
{
match: '\\b(catch|try|throw|exception|finally)\\b',
name: 'keyword.control.exception.php'
},
{
begin: '(?i)\\b(function)\\s*(&\\s*)?(?=\\()',
beginCaptures: {
1: {name: 'storage.type.function.php'},
2: {name: 'storage.modifier.reference.php'}
},
end: '\\{',
name: 'meta.function.closure.php',
patterns: [
{
begin: '(\\()',
beginCaptures: {
1: {name: 'punctuation.definition.parameters.begin.php'}
},
contentName: 'meta.function.arguments.php',
end: '(\\))',
endCaptures: {
1: {name: 'punctuation.definition.parameters.end.php'}
},
patterns: [{include: '#function-arguments'}]
},
{
begin: '(?i)(use)\\s*(\\()',
beginCaptures: {
1: {name: 'keyword.other.function.use.php'},
2: {name: 'punctuation.definition.parameters.begin.php'}
},
end: '(\\))',
endCaptures: {
1: {name: 'punctuation.definition.parameters.end.php'}
},
patterns: [
{
captures: {
1: {name: 'storage.modifier.reference.php'},
2: {name: 'variable.other.php'},
3: {name: 'punctuation.definition.variable.php'}
},
match:
'(?:\\s*(&))?\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))',
name: 'meta.function.closure.use.php'
}
]
}
]
},
{
begin:
'(?x)\\s*\n\t\t\t\t\t ((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n\t\t\t\t (function)\n\t\t\t\t (?:\\s+|(\\s*&\\s*))\n\t\t\t\t (?:\n\t\t\t\t (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n\t\t\t\t |([a-zA-Z0-9_]+)\n\t\t\t\t )\n\t\t\t\t \\s*\n\t\t\t\t (\\()',
beginCaptures: {
1: {
patterns: [
{
match: 'final|abstract|public|private|protected|static',
name: 'storage.modifier.php'
}
]
},
2: {name: 'storage.type.function.php'},
3: {name: 'storage.modifier.reference.php'},
4: {name: 'support.function.magic.php'},
5: {name: 'entity.name.function.php'},
6: {name: 'punctuation.definition.parameters.begin.php'}
},
contentName: 'meta.function.arguments.php',
end: '(?ix)\n\t\t\t\t\t\t(\\)) # Close arguments\n\t\t\t\t\t\t(?: # Optional return type\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t\t(\\?)?\n\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t (array|bool|float|int|string|mixed|never|object) # scalar-type\n\t\t\t\t\t\t\t | (callable|iterable) # base-type-declaration\n\t\t\t\t\t\t\t | (void)\n\t\t\t\t\t\t\t | (self|parent|static) # late static binding\n\t\t\t\t\t\t\t | ([a-z_0-9\\\\]*[a-z_][a-z_0-9]*) # qualified-name\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)?\n\t\t\t\t\t',
endCaptures: {
1: {name: 'punctuation.definition.parameters.end.php'},
2: {name: 'punctuation.separator.return-type.php'},
3: {name: 'storage.modifier.nullable.php'},
4: {name: 'storage.type.$4.php'},
5: {name: 'storage.modifier.$5.php'},
6: {name: 'storage.type.void.php'},
7: {name: 'storage.type.$7.php'},
8: {patterns: [{include: '#class-name'}]}
},
name: 'meta.function.php',
patterns: [{include: '#function-arguments'}]
},
{include: '#invoke-call'},
{
begin:
'(?xi)\\s*(?=\n\t\t\t\t [a-z_0-9$\\\\]+(::)\n (?:\n \t\t\t\t ([a-z_][a-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t |\n \t\t\t\t ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t)?\n\t\t\t\t )',
end: '(?x)(::)\n (?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t |\n \t\t\t\t ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t)?',
endCaptures: {
1: {name: 'keyword.operator.class.php'},
2: {name: 'meta.function-call.static.php'},
3: {name: 'variable.other.class.php'},
4: {name: 'punctuation.definition.variable.php'},
5: {name: 'constant.other.class.php'}
},
patterns: [
{match: '(self|static|parent)\\b', name: 'storage.type.php'},
{include: '#class-name'},
{include: '#variable-name'}
]
},
{include: '#variables'},
{include: '#strings'},
{
captures: {
1: {name: 'support.function.construct.php'},
2: {name: 'punctuation.definition.array.begin.php'},
3: {name: 'punctuation.definition.array.end.php'}
},
match: '(array)(\\()(\\))',
name: 'meta.array.empty.php'
},
{
begin: '(array)(\\()',
beginCaptures: {
1: {name: 'support.function.construct.php'},
2: {name: 'punctuation.definition.array.begin.php'}
},
end: '\\)',
endCaptures: {0: {name: 'punctuation.definition.array.end.php'}},
name: 'meta.array.php',
patterns: [{include: '#language'}]
},
{
captures: {1: {name: 'storage.type.php'}},
match:
'(?i)\\s*\\(\\s*(array|real|double|float|int(eger)?|bool(ean)?|string|object|binary|unset)\\s*\\)'
},
{
match:
'(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|mixed|never|object|class|clone|var|function|interface|parent|self|object)\\b',
name: 'storage.type.php'
},
{
match:
'(?i)\\b(global|abstract|const|extends|implements|final|p(r(ivate|otected)|ublic)|static)\\b',
name: 'storage.modifier.php'
},
{include: '#object'},
{match: ';', name: 'punctuation.terminator.expression.php'},
{include: '#heredoc'},
{match: '\\.=?', name: 'keyword.operator.string.php'},
{match: '=>', name: 'keyword.operator.key.php'},
{
captures: {
1: {name: 'keyword.operator.assignment.php'},
2: {name: 'storage.modifier.reference.php'},
3: {name: 'storage.modifier.reference.php'}
},
match: '(?:(\\=)(&))|(&(?=[$A-Za-z_]))'
},
{match: '(@)', name: 'keyword.operator.error-control.php'},
{
match: '(\\-\\-|\\+\\+)',
name: 'keyword.operator.increment-decrement.php'
},
{match: '(\\-|\\+|\\*|/|%)', name: 'keyword.operator.arithmetic.php'},
{
match: '(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b',
name: 'keyword.operator.logical.php'
},
{include: '#function-call'},
{match: '<<|>>|~|\\^|&|\\|', name: 'keyword.operator.bitwise.php'},
{
match: '(===|==|!==|!=|<=|>=|<>|<|>)',
name: 'keyword.operator.comparison.php'
},
{match: '=', name: 'keyword.operator.assignment.php'},
{
begin: '(?i)\\b(instanceof)\\b\\s+(?=[\\\\$a-z_])',
beginCaptures: {1: {name: 'keyword.operator.type.php'}},
end: '(?=[^\\\\$A-Za-z_0-9])',
patterns: [{include: '#class-name'}, {include: '#variable-name'}]
},
{include: '#numbers'},
{include: '#instantiation'},
{
captures: {
1: {name: 'keyword.control.goto.php'},
2: {name: 'support.other.php'}
},
match: '(?i)(goto)\\s+([a-z_][a-z_0-9]*)'
},
{
captures: {1: {name: 'entity.name.goto-label.php'}},
match: '(?i)^\\s*([a-z_][a-z_0-9]*)\\s*:'
},
{include: '#string-backtick'},
{
begin: '\\[',
beginCaptures: {0: {name: 'punctuation.section.array.begin.php'}},
end: '\\]',
endCaptures: {0: {name: 'punctuation.section.array.end.php'}},
patterns: [{include: '#language'}]
},
{include: '#constants'}
]
},
namespace: {
begin: '(?i)(?:(namespace)|[a-z0-9_]+)?(\\\\)(?=.*?([^a-z0-9_\\\\]|\\z))',
beginCaptures: {
1: {name: 'variable.language.namespace.php'},
2: {name: 'punctuation.separator.inheritance.php'}
},
end: '(?i)(?=[a-z0-9_]*([^a-z0-9_\\\\]|\\z))',
name: 'support.other.namespace.php',
patterns: [
{
captures: {1: {name: 'punctuation.separator.inheritance.php'}},
match: '(?i)(\\\\)'
}
]
},
numbers: {
match:
'\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b',
name: 'constant.numeric.php'
},
object: {
patterns: [
{
begin: '(->)(\\$?\\{)',
beginCaptures: {
1: {name: 'keyword.operator.class.php'},
2: {name: 'punctuation.definition.variable.php'}
},
end: '(\\})',
endCaptures: {1: {name: 'punctuation.definition.variable.php'}},
patterns: [{include: '#language'}]
},
{
captures: {
1: {name: 'keyword.operator.class.php'},
2: {name: 'meta.function-call.object.php'},
3: {name: 'variable.other.property.php'},
4: {name: 'punctuation.definition.variable.php'}
},
match:
'(?x)(\\??->)\n \t\t\t\t(?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t)?'
}
]
},
'parameter-default-types': {
patterns: [
{include: '#strings'},
{include: '#numbers'},
{include: '#string-backtick'},
{include: '#variables'},
{match: '=>', name: 'keyword.operator.key.php'},
{match: '=', name: 'keyword.operator.assignment.php'},
{match: '&(?=\\s*\\$)', name: 'storage.modifier.reference.php'},
{
begin: '(array)\\s*(\\()',
beginCaptures: {
1: {name: 'support.function.construct.php'},
2: {name: 'punctuation.definition.array.begin.php'}
},
end: '\\)',
endCaptures: {0: {name: 'punctuation.definition.array.end.php'}},
name: 'meta.array.php',
patterns: [{include: '#parameter-default-types'}]
},
{include: '#instantiation'},
{
begin:
'(?xi)\\s*(?=\n\t\t\t\t [a-z_0-9\\\\]+(::)\n \t\t\t\t ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n\t\t\t\t )',
end: '(?i)(::)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?',
endCaptures: {
1: {name: 'keyword.operator.class.php'},
2: {name: 'constant.other.class.php'}
},
patterns: [{include: '#class-name'}]
},
{include: '#constants'}
]
},
php_doc: {
patterns: [
{
match: '^(?!\\s*\\*).*$\\n?',
name: 'invalid.illegal.missing-asterisk.phpdoc.php'
},
{
captures: {
1: {name: 'keyword.other.phpdoc.php'},
3: {name: 'storage.modifier.php'},
4: {name: 'invalid.illegal.wrong-access-type.phpdoc.php'}
},
match:
'^\\s*\\*\\s*(@access)\\s+((public|private|protected)|(.+))\\s*$'
},
{
captures: {
1: {name: 'keyword.other.phpdoc.php'},
2: {name: 'markup.underline.link.php'}
},
match: '(@xlink)\\s+(.+)\\s*$'
},
{
match:
'\\@(a(bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final|ignore)\\b',
name: 'keyword.other.phpdoc.php'
},
{
captures: {1: {name: 'keyword.other.phpdoc.php'}},
match: '\\{(@(link)).+?\\}',
name: 'meta.tag.inline.phpdoc.php'