github-linguist 5.0.10 → 5.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/source.batchfile.json +577 -76
  3. data/grammars/source.clojure.json +5 -18
  4. data/grammars/source.crystal.json +1 -1
  5. data/grammars/source.csound-document.json +80 -20
  6. data/grammars/source.css.json +1 -1
  7. data/grammars/source.css.less.json +5 -10
  8. data/grammars/source.d.json +4 -0
  9. data/grammars/source.dart.json +128 -478
  10. data/grammars/source.gfm.json +107 -86
  11. data/grammars/source.graphql.json +1 -0
  12. data/grammars/source.harbour.json +28 -16
  13. data/grammars/source.jison.json +5 -2
  14. data/grammars/source.jisonlex-injection.json +1 -1
  15. data/grammars/source.js.json +1 -1
  16. data/grammars/source.lua.json +117 -29
  17. data/grammars/source.modelica.json +4 -0
  18. data/grammars/source.nim.json +1 -1
  19. data/grammars/source.pep8.json +122 -0
  20. data/grammars/source.perl6fe.json +3 -3
  21. data/grammars/source.php.zephir.json +6 -6
  22. data/grammars/source.rust.json +60 -52
  23. data/grammars/source.shen.json +162 -0
  24. data/grammars/source.sqf.json +1 -1
  25. data/grammars/source.terraform.json +1 -1
  26. data/grammars/source.tla.json +1 -1
  27. data/grammars/source.yaml-ext.json +330 -0
  28. data/grammars/text.haml.json +42 -12
  29. data/grammars/text.html.basic.json +43 -1
  30. data/grammars/text.html.php.blade.json +10 -6
  31. data/grammars/text.html.php.json +18 -14
  32. data/grammars/text.html.soy.json +609 -0
  33. data/lib/linguist/generated.rb +4 -4
  34. data/lib/linguist/languages.json +1 -1
  35. data/lib/linguist/languages.yml +32 -4
  36. data/lib/linguist/samples.json +1336 -90
  37. data/lib/linguist/version.rb +1 -1
  38. metadata +6 -5
  39. data/grammars/source.pubspec.json +0 -13
  40. data/grammars/text.dart-analysis-output.json +0 -162
  41. data/grammars/text.dart-doccomments.json +0 -19
@@ -20,6 +20,9 @@
20
20
  }
21
21
  ]
22
22
  },
23
+ {
24
+ "include": "#continuation"
25
+ },
23
26
  {
24
27
  "match": "^(!!!)($|\\s.*)",
25
28
  "name": "meta.prolog.haml",
@@ -53,7 +56,7 @@
53
56
  },
54
57
  {
55
58
  "begin": "^(\\s*)(\\-\\#|\\/|\\-\\s*\\/\\*+)",
56
- "end": "^(?!\\1\\s+|\\n)",
59
+ "end": "^(?!\\1\\s+|$\\n?)",
57
60
  "name": "comment.line.slash.haml",
58
61
  "captures": {
59
62
  "2": {
@@ -97,14 +100,14 @@
97
100
  },
98
101
  {
99
102
  "begin": "(?<!\\#)\\{(?=.+(,|(do)|\\{|\\}|\\||(\\#.*))\\s*)",
100
- "end": "\\s*\\}(?!\\s*\\,)(?!\\s*\\|)(?!\\#\\{.*\\})",
103
+ "end": "\\s*\\}",
101
104
  "name": "meta.section.attributes.haml",
102
105
  "patterns": [
103
106
  {
104
- "include": "source.ruby.rails"
107
+ "include": "#continuation"
105
108
  },
106
109
  {
107
- "include": "#continuation"
110
+ "include": "source.ruby.rails"
108
111
  },
109
112
  {
110
113
  "include": "#rubyline"
@@ -166,10 +169,10 @@
166
169
  "name": "meta.section.object.haml",
167
170
  "patterns": [
168
171
  {
169
- "include": "source.ruby.rails"
172
+ "include": "#continuation"
170
173
  },
171
174
  {
172
- "include": "#continuation"
175
+ "include": "source.ruby.rails"
173
176
  },
174
177
  {
175
178
  "include": "#rubyline"
@@ -325,7 +328,7 @@
325
328
  ],
326
329
  "repository": {
327
330
  "continuation": {
328
- "match": "(\\|)\\s*\\n",
331
+ "match": "(\\|)\\s*$\\n?",
329
332
  "captures": {
330
333
  "1": {
331
334
  "name": "punctuation.separator.continuation.haml"
@@ -412,12 +415,12 @@
412
415
  },
413
416
  "rubyline": {
414
417
  "begin": "(&amp|!)?(=|-|~)",
415
- "end": "((do|\\{)( \\|[.*]+\\|)?)$|$|^(?!.*\\|\\s*$)\\n",
418
+ "end": "((do|\\{)( \\|[.*]+\\|)?)$|$|^(?!.*\\|\\s*)$\\n?",
416
419
  "name": "meta.line.ruby.haml",
417
420
  "contentName": "source.ruby.embedded.haml",
418
421
  "endCaptures": {
419
422
  "1": {
420
- "name": "source.ruby.embedded.html"
423
+ "name": "source.ruby.embedded.haml"
421
424
  },
422
425
  "2": {
423
426
  "name": "keyword.control.ruby.start-block"
@@ -461,14 +464,41 @@
461
464
  }
462
465
  },
463
466
  {
464
- "match": "(\\||,|<|do|\\{)\\s*(\\#.*)?$\\n",
465
- "name": "source.ruby",
467
+ "begin": "\"",
468
+ "beginCaptures": {
469
+ "0": {
470
+ "name": "punctuation.definition.string.end.ruby"
471
+ }
472
+ },
473
+ "end": "\"",
474
+ "endCaptures": {
475
+ "0": {
476
+ "name": "punctuation.definition.string.end.ruby"
477
+ }
478
+ },
479
+ "name": "string.quoted.double.ruby",
466
480
  "patterns": [
467
481
  {
468
- "include": "#rubyline"
482
+ "include": "source.ruby#interpolated_ruby"
483
+ },
484
+ {
485
+ "include": "source.ruby#escaped_char"
469
486
  }
470
487
  ]
471
488
  },
489
+ {
490
+ "match": "(\\||,|<|do|\\{)\\s*(\\#.*)?$\\n?",
491
+ "name": "source.ruby",
492
+ "captures": {
493
+ "0": {
494
+ "patterns": [
495
+ {
496
+ "include": "#rubyline"
497
+ }
498
+ ]
499
+ }
500
+ }
501
+ },
472
502
  {
473
503
  "match": "#.*$",
474
504
  "name": "comment.line.number-sign.ruby"
@@ -339,7 +339,7 @@
339
339
  },
340
340
  {
341
341
  "begin": "\\G",
342
- "end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript))\\b))",
342
+ "end": "(?i:(?=/?>|type(?=[\\s=])(?!\\s*=\\s*('|\"|)(text/(javascript|ecmascript|babel)|application/((x-)?javascript|ecmascript|babel)|module)[\\s\"'>])))",
343
343
  "name": "meta.tag.metadata.script.html",
344
344
  "patterns": [
345
345
  {
@@ -347,6 +347,48 @@
347
347
  }
348
348
  ]
349
349
  },
350
+ {
351
+ "begin": "(?=(?i:type\\s*=\\s*('|\"|)(text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\\s\"'>])))",
352
+ "end": "((<))(?=/(?i:script))",
353
+ "endCaptures": {
354
+ "0": {
355
+ "name": "meta.tag.metadata.script.html"
356
+ },
357
+ "1": {
358
+ "name": "punctuation.definition.tag.begin.html"
359
+ },
360
+ "2": {
361
+ "name": "text.html.basic"
362
+ }
363
+ },
364
+ "patterns": [
365
+ {
366
+ "begin": "\\G",
367
+ "end": "(>)|(?=/>)",
368
+ "endCaptures": {
369
+ "1": {
370
+ "name": "punctuation.definition.tag.end.html"
371
+ }
372
+ },
373
+ "name": "meta.tag.metadata.script.html",
374
+ "patterns": [
375
+ {
376
+ "include": "#tag-stuff"
377
+ }
378
+ ]
379
+ },
380
+ {
381
+ "begin": "(?!\\G)",
382
+ "end": "(?=</(?i:script))",
383
+ "name": "text.html.basic",
384
+ "patterns": [
385
+ {
386
+ "include": "text.html.basic"
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ },
350
392
  {
351
393
  "begin": "(?=(?i:type))",
352
394
  "end": "(<)(?=/(?i:script))",
@@ -215,7 +215,7 @@
215
215
  ]
216
216
  },
217
217
  {
218
- "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?i: # Ordering not important as we everything will be matched up to opening parentheses\n break\n|can\n|cannot\n|choice\n|component\n|continue\n|each\n|elsecan\n|elsecannot\n|elseif\n|extends\n|for\n|foreach\n|forelse\n|hassection\n|if\n|include\n|includeif\n|includewhen\n|inject\n|isset\n|lang\n|php\n|prepend\n|push\n|section\n|slot\n|stack\n|unless\n|unset\n|while\n|yield\n)\n[\\t ]* # Whitespace between name and parentheses, consumed\n(?=\\() # Followed by opening parentheses, not consumed",
218
+ "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?i: # Ordering not important as we everything will be matched up to opening parentheses\n break\n|can\n|cannot\n|choice\n|component\n|continue\n|each\n|elsecan\n|elsecannot\n|elseif\n|empty\n|extends\n|for\n|foreach\n|forelse\n|hassection\n|if\n|include\n|includeif\n|includewhen\n|inject\n|isset\n|lang\n|php\n|prepend\n|push\n|section\n|slot\n|stack\n|unless\n|unset\n|while\n|yield\n)\n[\\t ]* # Whitespace between name and parentheses, consumed\n(?=\\() # Followed by opening parentheses, not consumed",
219
219
  "beginCaptures": {
220
220
  "0": {
221
221
  "name": "keyword.blade"
@@ -463,14 +463,18 @@
463
463
  "comments": {
464
464
  "patterns": [
465
465
  {
466
- "begin": "/\\*\\*(?:#@\\+)?\\s*$",
467
- "captures": {
466
+ "begin": "/\\*\\*(?=\\s)",
467
+ "beginCaptures": {
468
468
  "0": {
469
469
  "name": "punctuation.definition.comment.php"
470
470
  }
471
471
  },
472
- "comment": "This now only highlights a docblock if the first line contains only /**\n\t\t\t\t\t\t\t\t- this is to stop highlighting everything as invalid when people do comment banners with /******** ...\n\t\t\t\t\t\t\t\t- Now matches /**#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate",
473
472
  "end": "\\*/",
473
+ "endCaptures": {
474
+ "0": {
475
+ "name": "punctuation.definition.comment.php"
476
+ }
477
+ },
474
478
  "name": "comment.block.documentation.phpdoc.php",
475
479
  "patterns": [
476
480
  {
@@ -956,7 +960,7 @@
956
960
  ]
957
961
  },
958
962
  {
959
- "begin": "(<<<)\\s*(\"?)(JAVASCRIPT)(\\2)(\\s*)$",
963
+ "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$",
960
964
  "beginCaptures": {
961
965
  "0": {
962
966
  "name": "punctuation.section.embedded.begin.php"
@@ -1277,7 +1281,7 @@
1277
1281
  ]
1278
1282
  },
1279
1283
  {
1280
- "begin": "(<<<)\\s*'(JAVASCRIPT)'(\\s*)$",
1284
+ "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$",
1281
1285
  "beginCaptures": {
1282
1286
  "0": {
1283
1287
  "name": "punctuation.section.embedded.begin.php"
@@ -10,11 +10,11 @@
10
10
  "aw",
11
11
  "ctp"
12
12
  ],
13
- "firstLineMatch": "^#!.*(?<!-)php[0-9]{0,1}\\b",
13
+ "firstLineMatch": "^#!.*(?<!-)php[0-9]{0,1}\\b|<\\?php",
14
14
  "foldingStartMarker": "(/\\*|\\{\\s*$|<<<HTML)",
15
15
  "foldingStopMarker": "(\\*/|^\\s*\\}|^HTML;)",
16
16
  "injections": {
17
- "text.html.php - (meta.embedded | meta.tag), L:text.html.php meta.tag, L:source.js.embedded.html": {
17
+ "^text.html - (meta.embedded | meta.tag), L:^text.html meta.tag, L:text.html.php source.js": {
18
18
  "patterns": [
19
19
  {
20
20
  "begin": "(^\\s*)(?=<\\?(?![^?]*\\?>))",
@@ -149,7 +149,7 @@
149
149
  "name": "punctuation.separator.inheritance.php"
150
150
  }
151
151
  },
152
- "match": "(?i)(\\\\)?\\b(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|Binary|Serializable|Timestamp|ObjectID|U(nserializable|TCDatetime)|Javascript)|Driver\\\\(ReadPreference|Manager|BulkWrite|Server|C(ommand|ursor(Id)?)|Query|Write(Result|Concern(Error)?|E(rror|xception)))))?|eleteBatch|ate)|UpdateBatch|Pool|Write(Batch|ConcernException)|Log)?|u(tex|ltipleIterator)|e(ssageFormatter|mcache(d)?))|Bad(MethodCallException|FunctionCallException)|tidy(Node)?|S(ync(ReaderWriter|Mutex|Semaphore|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)|ttp(Re(sponse|quest(Pool)?)|Message|InflateStream|DeflateStream|QueryString)|aru(Image|Outline|D(oc|estination)|Page|Encoder|Font|Annotation))|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)|O(CI-(Collection|Lob)|ut(erIterator|Of(RangeException|BoundsException))|verflowException)|D(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)|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|PCIterator|rray(Iterator|Object|Access)))\\b",
152
+ "match": "(?i)(\\\\)?\\b(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))|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)))\\b",
153
153
  "name": "support.class.builtin.php"
154
154
  }
155
155
  ]
@@ -2053,6 +2053,10 @@
2053
2053
  "match": "(?i)\\bapc_(s(tore|ma_info)|c(ompile_file|lear_cache|a(s|che_info))|inc|de(c|fine_constants|lete(_file)?)|exists|fetch|load_constants|add|bin_(dump(file)?|load(file)?))\\b",
2054
2054
  "name": "support.function.apc.php"
2055
2055
  },
2056
+ {
2057
+ "match": "(?i)\\bapcu_(s(tore|ma_info)|c(lear_cache|a(s|che_info))|inc|de(c|lete)|e(ntry|xists)|fetch|add)\\b",
2058
+ "name": "support.function.apcu.php"
2059
+ },
2056
2060
  {
2057
2061
  "match": "(?i)\\b(s(huffle|izeof|ort)|n(ext|at(sort|casesort))|c(o(unt|mpact)|urrent)|in_array|u(sort|ksort|asort)|p(os|rev)|e(nd|ach|xtract)|k(sort|ey(_exists)?|rsort)|list|a(sort|r(sort|ray(_(s(hift|um|plice|earch|lice)|c(h(unk|ange_key_case)|o(unt_values|lumn|mbine))|intersect(_(u(key|assoc)|key|assoc))?|diff(_(u(key|assoc)|key|assoc))?|u(n(shift|ique)|intersect(_(uassoc|assoc))?|diff(_(uassoc|assoc))?)|p(op|ush|ad|roduct)|values|key(s|_exists)|f(il(ter|l(_keys)?)|lip)|walk(_recursive)?|r(e(duce|place(_recursive)?|verse)|and)|m(ultisort|erge(_recursive)?|ap)))?))|r(sort|eset|ange))\\b",
2058
2062
  "name": "support.function.array.php"
@@ -2070,7 +2074,7 @@
2070
2074
  "name": "support.function.blenc.php"
2071
2075
  },
2072
2076
  {
2073
- "match": "(?i)\\bBSON\\\\(to(JSON|Array)|from(JSON|Array))\\b",
2077
+ "match": "(?i)\\bMongoDB\\BSON\\(to(JSON|PHP)|from(JSON|PHP))\\b",
2074
2078
  "name": "support.function.bson.php"
2075
2079
  },
2076
2080
  {
@@ -2177,10 +2181,6 @@
2177
2181
  "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(stream|file))?|pbkdf2|equals|fi(nal|le)|algos))?\\b",
2178
2182
  "name": "support.function.hash.php"
2179
2183
  },
2180
- {
2181
- "match": "(?i)\\b(http_(s(upport|end_(st(atus|ream)|content_(type|disposition)|data|file|last_modified))|head|negotiate_(c(harset|ontent_type)|language)|c(hunked_decode|ache_(etag|last_modified))|throttle|inflate|d(eflate|ate)|p(ost_(data|fields)|ut_(stream|data|file)|ersistent_handles_(c(ount|lean)|ident)|arse_(headers|cookie|params|message))|re(direct|quest(_(method_(name|unregister|exists|register)|body_encode))?)|get(_request_(headers|body(_stream)?))?|match_(etag|request_header|modified)|build_(str|cookie|url))|ob_(inflatehandler|deflatehandler|etaghandler))\\b",
2182
- "name": "support.function.http.php"
2183
- },
2184
2184
  {
2185
2185
  "match": "(?i)\\b(iconv(_(s(tr(pos|len|rpos)|ubstr|et_encoding)|get_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b",
2186
2186
  "name": "support.function.iconv.php"
@@ -2190,7 +2190,7 @@
2190
2190
  "name": "support.function.iisfunc.php"
2191
2191
  },
2192
2192
  {
2193
- "match": "(?i)\\b(i(ptc(parse|embed)|mage(s(y|cale|tring(up)?|et(style|t(hickness|ile)|interpolation|pixel|brush)|avealpha|x)|c(har(up)?|o(nvolution|py(res(ized|ampled)|merge(gray)?)?|lor(s(total|et|forindex)|closest(hwb|alpha)?|transparent|deallocate|exact(alpha)?|a(t|llocate(alpha)?)|resolve(alpha)?|match))|r(op(auto)?|eate(truecolor|from(string|jpeg|png|w(ebp|bmp)|g(if|d(2(part)?)?)|x(pm|bm)))?))|t(ypes|tf(text|bbox)|ruecolortopalette)|i(struecolor|nterlace)|2wbmp|d(estroy|ashedline)|jpeg|_type_to_(extension|mime_type)|p(s(slantfont|text|e(ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alette(copy|totruecolor))|ellipse|f(t(text|bbox)|il(ter|l(toborder|ed(polygon|ellipse|arc|rectangle))?)|ont(height|width)|lip)|w(ebp|bmp)|l(ine|oadfont|ayereffect)|a(ntialias|ffine(matrix(concat|get))?|lphablending|rc)|r(otate|ectangle)|g(if|d(2)?|ammacorrect|rab(screen|window))|xbm))|jpeg2wbmp|png2wbmp|g(d_info|etimagesize(fromstring)?))\\b",
2193
+ "match": "(?i)\\b(i(ptc(parse|embed)|mage(s(y|cale|tring(up)?|et(style|clip|t(hickness|ile)|interpolation|pixel|brush)|avealpha|x)|c(har(up)?|o(nvolution|py(res(ized|ampled)|merge(gray)?)?|lor(s(total|et|forindex)|closest(hwb|alpha)?|transparent|deallocate|exact(alpha)?|a(t|llocate(alpha)?)|resolve(alpha)?|match))|r(op(auto)?|eate(truecolor|from(string|jpeg|png|w(ebp|bmp)|g(if|d(2(part)?)?)|x(pm|bm)|bmp))?))|t(ypes|tf(text|bbox)|ruecolortopalette)|i(struecolor|nterlace)|2wbmp|openpolygon|d(estroy|ashedline)|jpeg|_type_to_(extension|mime_type)|p(s(slantfont|text|e(ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alette(copy|totruecolor))|ellipse|f(t(text|bbox)|il(ter|l(toborder|ed(polygon|ellipse|arc|rectangle))?)|ont(height|width)|lip)|w(ebp|bmp)|l(ine|oadfont|ayereffect)|a(ntialias|ffine(matrix(concat|get))?|lphablending|rc)|r(otate|e(solution|ctangle))|g(if|d(2)?|etclip|ammacorrect|rab(screen|window))|xbm|bmp))|jpeg2wbmp|png2wbmp|g(d_info|etimagesize(fromstring)?))\\b",
2194
2194
  "name": "support.function.image.php"
2195
2195
  },
2196
2196
  {
@@ -2202,7 +2202,7 @@
2202
2202
  "name": "support.function.interbase.php"
2203
2203
  },
2204
2204
  {
2205
- "match": "(?i)\\b(n(ormalizer_(normalize|is_normalized)|umfmt_(set_(symbol|text_attribute|pattern|attribute)|create|parse(_currency)?|format(_currency)?|get_(symbol|text_attribute|pattern|error_(code|message)|locale|attribute)))|collator_(s(ort(_with_sort_keys)?|et_(strength|attribute))|c(ompare|reate)|asort|get_(s(trength|ort_key)|error_(code|message)|locale|attribute))|transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|i(ntl(cal_get_error_(code|message)|tz_get_error_(code|message)|_(is_failure|error_name|get_error_(code|message)))|dn_to_(u(nicode|tf8)|ascii))|datefmt_(set_(calendar|timezone(_id)?|pattern|lenient)|create|is_lenient|parse|format(_object)?|localtime|get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|locale_(set_default|c(ompose|anonicalize)|parse|filter_matches|lookup|accept_from_http|get_(script|d(isplay_(script|name|variant|language|region)|efault)|primary_language|keywords|all_variants|region))|resourcebundle_(c(ount|reate)|locales|get(_error_(code|message))?)|grapheme_(s(tr(str|i(str|pos)|pos|len|r(ipos|pos))|ubstr)|extract)|msgfmt_(set_pattern|create|parse(_message)?|format(_message)?|get_(pattern|error_(code|message)|locale)))\\b",
2205
+ "match": "(?i)\\b(n(ormalizer_(normalize|is_normalized)|umfmt_(set_(symbol|text_attribute|pattern|attribute)|create|parse(_currency)?|format(_currency)?|get_(symbol|text_attribute|pattern|error_(code|message)|locale|attribute)))|collator_(s(ort(_with_sort_keys)?|et_(strength|attribute))|c(ompare|reate)|asort|get_(s(trength|ort_key)|error_(code|message)|locale|attribute))|transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|i(ntl(cal_get_error_(code|message)|tz_get_error_(code|message)|_(is_failure|error_name|get_error_(code|message)))|dn_to_(utf8|ascii))|datefmt_(set_(calendar|timezone(_id)?|pattern|lenient)|create|is_lenient|parse|format(_object)?|localtime|get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|locale_(set_default|c(ompose|anonicalize)|parse|filter_matches|lookup|accept_from_http|get_(script|d(isplay_(script|name|variant|language|region)|efault)|primary_language|keywords|all_variants|region))|resourcebundle_(c(ount|reate)|locales|get(_error_(code|message))?)|grapheme_(s(tr(str|i(str|pos)|pos|len|r(ipos|pos))|ubstr)|extract)|msgfmt_(set_pattern|create|parse(_message)?|format(_message)?|get_(pattern|error_(code|message)|locale)))\\b",
2206
2206
  "name": "support.function.intl.php"
2207
2207
  },
2208
2208
  {
@@ -2298,7 +2298,7 @@
2298
2298
  "name": "support.function.password.php"
2299
2299
  },
2300
2300
  {
2301
- "match": "(?i)\\bpcntl_(s(trerror|ig(nal(_dispatch)?|timedwait|procmask|waitinfo)|etpriority)|e(rrno|xec)|fork|w(stopsig|termsig|if(s(topped|ignaled)|exited)|exitstatus|ait(pid)?)|alarm|get(_last_error|priority))\\b",
2301
+ "match": "(?i)\\bpcntl_(s(trerror|ig(nal(_(dispatch|get_handler))?|timedwait|procmask|waitinfo)|etpriority)|e(rrno|xec)|fork|w(stopsig|termsig|if(s(topped|ignaled)|exited)|exitstatus|ait(pid)?)|alarm|get(_last_error|priority))\\b",
2302
2302
  "name": "support.function.pcntl.php"
2303
2303
  },
2304
2304
  {
@@ -2370,7 +2370,7 @@
2370
2370
  "name": "support.function.sem.php"
2371
2371
  },
2372
2372
  {
2373
- "match": "(?i)\\bsession_(s(ta(tus|rt)|et_(save_handler|cookie_params)|ave_path)|name|c(ommit|ache_(expire|limiter))|i(s_registered|d)|de(stroy|code)|un(set|register)|encode|write_close|abort|re(set|g(ister(_shutdown)?|enerate_id))|get_cookie_params|module_name)\\b",
2373
+ "match": "(?i)\\bsession_(s(ta(tus|rt)|et_(save_handler|cookie_params)|ave_path)|name|c(ommit|ache_(expire|limiter)|reate_id)|i(s_registered|d)|de(stroy|code)|un(set|register)|encode|write_close|abort|re(set|g(ister(_shutdown)?|enerate_id))|g(c|et_cookie_params)|module_name)\\b",
2374
2374
  "name": "support.function.session.php"
2375
2375
  },
2376
2376
  {
@@ -2390,7 +2390,7 @@
2390
2390
  "name": "support.function.soap.php"
2391
2391
  },
2392
2392
  {
2393
- "match": "(?i)\\bsocket_(s(hutdown|trerror|e(nd(to|msg)?|t_(nonblock|option|block)|lect))|c(onnect|l(ose|ear_error)|reate(_(pair|listen))?|msg_space)|import_stream|write|l(isten|ast_error)|accept|re(cv(from|msg)?|ad)|get(sockname|_option|peername)|bind)\\b",
2393
+ "match": "(?i)\\bsocket_(s(hutdown|trerror|e(nd(to|msg)?|t(opt|_(nonblock|option|block))|lect))|c(onnect|l(ose|ear_error)|reate(_(pair|listen))?|msg_space)|import_stream|write|l(isten|ast_error)|accept|re(cv(from|msg)?|ad)|get(sockname|opt|_option|peername)|bind)\\b",
2394
2394
  "name": "support.function.sockets.php"
2395
2395
  },
2396
2396
  {
@@ -2433,6 +2433,10 @@
2433
2433
  "match": "(?i)\\btrader_(s(t(och(f|rsi)?|ddev)|in(h)?|u(m|b)|et_(compat|unstable_period)|qrt|ar(ext)?|ma)|ht_(sine|trend(line|mode)|dcp(hase|eriod)|phasor)|natr|c(ci|o(s(h)?|rrel)|dl(s(ho(otingstar|rtline)|t(icksandwich|alledpattern)|pinningtop|eparatinglines)|h(i(kkake(mod)?|ghwave)|omingpigeon|a(ngingman|rami(cross)?|mmer))|c(o(ncealbabyswall|unterattack)|losingmarubozu)|t(hrusting|a(sukigap|kuri)|ristar)|i(n(neck|vertedhammer)|dentical3crows)|2crows|onneck|d(oji(star)?|arkcloudcover|ragonflydoji)|u(nique3river|psidegap2crows)|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|piercing|e(ngulfing|vening(star|dojistar))|kicking(bylength)?|l(ongl(ine|eggeddoji)|adderbottom)|a(dvanceblock|bandonedbaby)|ri(sefall3methods|ckshawman)|g(apsidesidewhite|ravestonedoji)|xsidegap3methods|m(orning(star|dojistar)|a(t(hold|chinglow)|rubozu))|b(elthold|reakaway))|eil|mo)|t(sf|ypprice|3|ema|an(h)?|r(i(x|ma)|ange))|obv|d(iv|ema|x)|ultosc|p(po|lus_d(i|m))|e(rrno|xp|ma)|var|kama|floor|w(clprice|illr|ma)|l(n|inearreg(_(slope|intercept|angle))?|og10)|a(sin|cos|t(an|r)|d(osc|d|x(r)?)?|po|vgprice|roon(osc)?)|r(si|oc(p|r(100)?)?)|get_(compat|unstable_period)|m(i(n(index|us_d(i|m)|max(index)?)?|dp(oint|rice))|om|ult|edprice|fi|a(cd(ext|fix)?|vp|x(index)?|ma)?)|b(op|eta|bands))\\b",
2434
2434
  "name": "support.function.trader.php"
2435
2435
  },
2436
+ {
2437
+ "match": "(?i)\\bUI\\(Draw\\Text\\Font\\fontFamilies|quit|run)\\b",
2438
+ "name": "support.function.ui.php"
2439
+ },
2436
2440
  {
2437
2441
  "match": "(?i)\\buopz_(co(py|mpose)|implement|overload|delete|undefine|extend|f(unction|lags)|re(store|name|define)|backup)\\b",
2438
2442
  "name": "support.function.uopz.php"
@@ -2466,7 +2470,7 @@
2466
2470
  "name": "support.function.xmlwriter.php"
2467
2471
  },
2468
2472
  {
2469
- "match": "(?i)\\b(zlib_(decode|encode|get_coding_type)|readgzfile|gz(seek|c(ompress|lose)|tell|inflate|open|de(code|flate)|uncompress|p(uts|assthru)|e(ncode|of)|file|write|re(wind|ad)|get(s(s)?|c)))\\b",
2473
+ "match": "(?i)\\b(inflate_(init|add)|zlib_(decode|encode|get_coding_type)|deflate_(init|add)|readgzfile|gz(seek|c(ompress|lose)|tell|inflate|open|de(code|flate)|uncompress|p(uts|assthru)|e(ncode|of)|file|write|re(wind|ad)|get(s(s)?|c)))\\b",
2470
2474
  "name": "support.function.zlib.php"
2471
2475
  },
2472
2476
  {
@@ -0,0 +1,609 @@
1
+ {
2
+ "fileTypes": [
3
+ "soy"
4
+ ],
5
+ "injections": {
6
+ "meta.tag": {
7
+ "patterns": [
8
+ {
9
+ "include": "#body"
10
+ }
11
+ ]
12
+ }
13
+ },
14
+ "name": "Closure Templates",
15
+ "patterns": [
16
+ {
17
+ "include": "#alias"
18
+ },
19
+ {
20
+ "include": "#delpackage"
21
+ },
22
+ {
23
+ "include": "#namespace"
24
+ },
25
+ {
26
+ "include": "#template"
27
+ },
28
+ {
29
+ "include": "#comment"
30
+ }
31
+ ],
32
+ "repository": {
33
+ "alias": {
34
+ "match": "{(alias)\\s+([\\w\\.]+)(?:\\s+(as)\\s+(\\w+))?}",
35
+ "captures": {
36
+ "1": {
37
+ "name": "storage.type.soy"
38
+ },
39
+ "2": {
40
+ "name": "entity.name.type.soy"
41
+ },
42
+ "3": {
43
+ "name": "storage.type.soy"
44
+ },
45
+ "4": {
46
+ "name": "entity.name.type.soy"
47
+ }
48
+ }
49
+ },
50
+ "attribute": {
51
+ "match": "(\\w+)=(\"(?:\\\\?.)*?\")",
52
+ "captures": {
53
+ "1": {
54
+ "name": "storage.other.attribute.soy"
55
+ },
56
+ "2": {
57
+ "name": "string.double.quoted.soy"
58
+ }
59
+ }
60
+ },
61
+ "variant": {
62
+ "begin": "(variant)=(\")",
63
+ "beginCaptures": {
64
+ "1": {
65
+ "name": "storage.other.attribute.soy"
66
+ },
67
+ "2": {
68
+ "name": "string.double.quoted.soy"
69
+ }
70
+ },
71
+ "contentName": "string.double.quoted.soy",
72
+ "end": "(\")",
73
+ "endCaptures": {
74
+ "1": {
75
+ "name": "string.double.quoted.soy"
76
+ }
77
+ },
78
+ "patterns": [
79
+ {
80
+ "include": "#expression"
81
+ }
82
+ ]
83
+ },
84
+ "boolean": {
85
+ "match": "true|false",
86
+ "name": "language.constant.boolean.soy"
87
+ },
88
+ "body": {
89
+ "patterns": [
90
+ {
91
+ "include": "#comment"
92
+ },
93
+ {
94
+ "include": "#let"
95
+ },
96
+ {
97
+ "include": "#call"
98
+ },
99
+ {
100
+ "include": "#css"
101
+ },
102
+ {
103
+ "include": "#xid"
104
+ },
105
+ {
106
+ "include": "#condition"
107
+ },
108
+ {
109
+ "include": "#condition-control"
110
+ },
111
+ {
112
+ "include": "#for"
113
+ },
114
+ {
115
+ "include": "#literal"
116
+ },
117
+ {
118
+ "include": "#msg"
119
+ },
120
+ {
121
+ "include": "#special-character"
122
+ },
123
+ {
124
+ "include": "#print"
125
+ },
126
+ {
127
+ "include": "text.html.basic"
128
+ }
129
+ ]
130
+ },
131
+ "call": {
132
+ "patterns": [
133
+ {
134
+ "begin": "{((?:del)?call)\\s+([\\w\\.]+)(?=[^/]*?})",
135
+ "beginCaptures": {
136
+ "1": {
137
+ "name": "storage.type.function.soy"
138
+ },
139
+ "2": {
140
+ "name": "entity.name.function.soy"
141
+ }
142
+ },
143
+ "end": "{/(\\1)}",
144
+ "endCaptures": {
145
+ "1": {
146
+ "name": "storage.type.function.soy"
147
+ }
148
+ },
149
+ "patterns": [
150
+ {
151
+ "include": "#comment"
152
+ },
153
+ {
154
+ "include": "#variant"
155
+ },
156
+ {
157
+ "include": "#attribute"
158
+ },
159
+ {
160
+ "include": "#param"
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "begin": "{((?:del)?call)(\\s+[\\w\\.]+)",
166
+ "beginCaptures": {
167
+ "1": {
168
+ "name": "storage.type.function.soy"
169
+ },
170
+ "2": {
171
+ "name": "entity.name.function.soy"
172
+ }
173
+ },
174
+ "end": "/}",
175
+ "patterns": [
176
+ {
177
+ "include": "#variant"
178
+ },
179
+ {
180
+ "include": "#attribute"
181
+ }
182
+ ]
183
+ }
184
+ ]
185
+ },
186
+ "comment": {
187
+ "patterns": [
188
+ {
189
+ "begin": "/\\*",
190
+ "end": "\\*/",
191
+ "name": "comment.block.documentation.soy",
192
+ "patterns": [
193
+ {
194
+ "match": "(@param\\??)\\s+(\\S+)",
195
+ "captures": {
196
+ "1": {
197
+ "name": "keyword.parameter.soy"
198
+ },
199
+ "2": {
200
+ "name": "variable.parameter.soy"
201
+ }
202
+ }
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "match": "^\\s*(\\/\\/.*)$",
208
+ "name": "comment.line.double-slash.soy"
209
+ }
210
+ ]
211
+ },
212
+ "css": {
213
+ "begin": "{(css)\\s+",
214
+ "beginCaptures": {
215
+ "1": {
216
+ "name": "keyword.other.soy"
217
+ }
218
+ },
219
+ "end": "}",
220
+ "patterns": [
221
+ {
222
+ "include": "#expression"
223
+ }
224
+ ]
225
+ },
226
+ "delpackage": {
227
+ "match": "{(delpackage)\\s+([\\w\\.]+)}",
228
+ "captures": {
229
+ "1": {
230
+ "name": "storage.type.soy"
231
+ },
232
+ "2": {
233
+ "name": "entity.name.type.soy"
234
+ }
235
+ }
236
+ },
237
+ "expression": {
238
+ "patterns": [
239
+ {
240
+ "include": "#boolean"
241
+ },
242
+ {
243
+ "include": "#number"
244
+ },
245
+ {
246
+ "include": "#function"
247
+ },
248
+ {
249
+ "include": "#null"
250
+ },
251
+ {
252
+ "include": "#string"
253
+ },
254
+ {
255
+ "include": "#variable-ref"
256
+ },
257
+ {
258
+ "include": "#operator"
259
+ }
260
+ ]
261
+ },
262
+ "for": {
263
+ "begin": "{/?(foreach|for)(?=\\s|})",
264
+ "beginCaptures": {
265
+ "1": {
266
+ "name": "keyword.control.soy"
267
+ }
268
+ },
269
+ "end": "}",
270
+ "patterns": [
271
+ {
272
+ "match": "in",
273
+ "name": "keyword.control.soy"
274
+ },
275
+ {
276
+ "include": "#expression"
277
+ },
278
+ {
279
+ "include": "#body"
280
+ }
281
+ ]
282
+ },
283
+ "function": {
284
+ "begin": "(\\w+)\\(",
285
+ "beginCaptures": {
286
+ "1": {
287
+ "name": "support.function.soy"
288
+ }
289
+ },
290
+ "end": "\\)",
291
+ "patterns": [
292
+ {
293
+ "include": "#expression"
294
+ }
295
+ ]
296
+ },
297
+ "condition": {
298
+ "begin": "{/?(if|elseif|switch|case)\\s*",
299
+ "beginCaptures": {
300
+ "1": {
301
+ "name": "keyword.control.soy"
302
+ }
303
+ },
304
+ "end": "}",
305
+ "patterns": [
306
+ {
307
+ "include": "#attribute"
308
+ },
309
+ {
310
+ "include": "#expression"
311
+ }
312
+ ]
313
+ },
314
+ "condition-control": {
315
+ "match": "{(else|ifempty|default)}",
316
+ "captures": {
317
+ "1": {
318
+ "name": "keyword.control.soy"
319
+ }
320
+ }
321
+ },
322
+ "literal": {
323
+ "begin": "{(literal)}",
324
+ "beginCaptures": {
325
+ "1": {
326
+ "name": "keyword.other.soy"
327
+ }
328
+ },
329
+ "end": "{/(\\1)}",
330
+ "endCaptures": {
331
+ "1": {
332
+ "name": "keyword.other.soy"
333
+ }
334
+ },
335
+ "name": "meta.literal"
336
+ },
337
+ "namespace": {
338
+ "match": "{(namespace)\\s+([\\w\\.]+)}",
339
+ "captures": {
340
+ "1": {
341
+ "name": "storage.type.soy"
342
+ },
343
+ "2": {
344
+ "name": "entity.name.type.soy"
345
+ }
346
+ }
347
+ },
348
+ "number": {
349
+ "match": "-?\\.?\\d+|\\d[\\.\\d]*",
350
+ "name": "language.constant.numeric"
351
+ },
352
+ "null": {
353
+ "match": "null",
354
+ "name": "language.constant.null.soy"
355
+ },
356
+ "param": {
357
+ "patterns": [
358
+ {
359
+ "begin": "{(param)\\s+(\\w+\\:)",
360
+ "beginCaptures": {
361
+ "1": {
362
+ "name": "storage.type.soy"
363
+ },
364
+ "2": {
365
+ "name": "variable.parameter.soy"
366
+ }
367
+ },
368
+ "end": "/}",
369
+ "patterns": [
370
+ {
371
+ "include": "#expression"
372
+ }
373
+ ]
374
+ },
375
+ {
376
+ "begin": "{(param)\\s+(\\w+)",
377
+ "beginCaptures": {
378
+ "1": {
379
+ "name": "storage.type.soy"
380
+ },
381
+ "2": {
382
+ "name": "variable.parameter.soy"
383
+ }
384
+ },
385
+ "end": "{/(\\1)}",
386
+ "endCaptures": {
387
+ "1": {
388
+ "name": "storage.type.soy"
389
+ }
390
+ },
391
+ "patterns": [
392
+ {
393
+ "include": "#attribute"
394
+ },
395
+ {
396
+ "include": "#body"
397
+ }
398
+ ]
399
+ }
400
+ ]
401
+ },
402
+ "string": {
403
+ "begin": "'",
404
+ "end": "'",
405
+ "name": "string.quoted.single.soy",
406
+ "patterns": [
407
+ {
408
+ "match": "\\\\(?:[\\\\'\"nrtbf]|u[0-9a-fA-F]{4})",
409
+ "name": "constant.character.escape.soy"
410
+ }
411
+ ]
412
+ },
413
+ "template": {
414
+ "begin": "{(template|deltemplate)\\s([\\w\\.]+)",
415
+ "beginCaptures": {
416
+ "1": {
417
+ "name": "storage.type.soy"
418
+ },
419
+ "2": {
420
+ "name": "entity.name.function.soy"
421
+ }
422
+ },
423
+ "end": "{(/\\1)}",
424
+ "endCaptures": {
425
+ "1": {
426
+ "name": "storage.type.soy"
427
+ }
428
+ },
429
+ "patterns": [
430
+ {
431
+ "begin": "{(@param)(\\??)\\s+(\\S+:)",
432
+ "beginCaptures": {
433
+ "1": {
434
+ "name": "keyword.parameter.soy"
435
+ },
436
+ "2": {
437
+ "name": "storage.modifier.keyword.operator.soy"
438
+ },
439
+ "3": {
440
+ "name": "variable.parameter.soy"
441
+ }
442
+ },
443
+ "end": "}",
444
+ "name": "meta.parameter.soy",
445
+ "patterns": [
446
+ {
447
+ "include": "#type"
448
+ }
449
+ ]
450
+ },
451
+ {
452
+ "include": "#variant"
453
+ },
454
+ {
455
+ "include": "#body"
456
+ },
457
+ {
458
+ "include": "#attribute"
459
+ }
460
+ ]
461
+ },
462
+ "let": {
463
+ "patterns": [
464
+ {
465
+ "begin": "{(let)\\s+(\\$\\w+:)",
466
+ "beginCaptures": {
467
+ "1": {
468
+ "name": "storage.type.soy"
469
+ },
470
+ "2": {
471
+ "name": "variable.soy"
472
+ }
473
+ },
474
+ "end": "/}",
475
+ "patterns": [
476
+ {
477
+ "include": "#comment"
478
+ },
479
+ {
480
+ "include": "#expression"
481
+ }
482
+ ]
483
+ },
484
+ {
485
+ "begin": "{(let)\\s+(\\$\\w+)",
486
+ "beginCaptures": {
487
+ "1": {
488
+ "name": "storage.type.soy"
489
+ },
490
+ "2": {
491
+ "name": "variable.soy"
492
+ }
493
+ },
494
+ "end": "{/(\\1)}",
495
+ "endCaptures": {
496
+ "1": {
497
+ "name": "storage.type.soy"
498
+ }
499
+ },
500
+ "patterns": [
501
+ {
502
+ "include": "#attribute"
503
+ },
504
+ {
505
+ "include": "#body"
506
+ }
507
+ ]
508
+ }
509
+ ]
510
+ },
511
+ "msg": {
512
+ "match": "{/?(msg|fallbackmsg)",
513
+ "captures": {
514
+ "1": {
515
+ "name": "keyword.other.soy"
516
+ }
517
+ },
518
+ "end": "}",
519
+ "patterns": [
520
+ {
521
+ "include": "#attribute"
522
+ }
523
+ ]
524
+ },
525
+ "operator": {
526
+ "match": "-|not|\\*|\\/|%|\\+|<=|>=|<|>|==|!=|and|or|\\?:|\\?|:",
527
+ "name": "keyword.operator.soy"
528
+ },
529
+ "print": {
530
+ "begin": "{(print)?\\s*",
531
+ "beginCaptures": {
532
+ "1": {
533
+ "name": "keyword.other.soy"
534
+ }
535
+ },
536
+ "end": "}",
537
+ "patterns": [
538
+ {
539
+ "match": "\\|\\s*(changeNewlineToBr|truncate|bidiSpanWrap|bidiUnicodeWrap)",
540
+ "captures": {
541
+ "1": {
542
+ "name": "support.function.soy"
543
+ }
544
+ }
545
+ },
546
+ {
547
+ "include": "#expression"
548
+ }
549
+ ]
550
+ },
551
+ "special-character": {
552
+ "match": "{(sp|nil|\\\\r|\\\\n|\\\\t|lb|rb)}",
553
+ "captures": {
554
+ "1": {
555
+ "name": "language.support.constant"
556
+ }
557
+ }
558
+ },
559
+ "type": {
560
+ "patterns": [
561
+ {
562
+ "match": "any|null|\\?|string|bool|int|float|number|html|uri|js|css|attributes",
563
+ "name": "support.type.soy"
564
+ },
565
+ {
566
+ "begin": "(list|map)(<)",
567
+ "beginCaptures": {
568
+ "1": {
569
+ "name": "support.type.soy"
570
+ },
571
+ "2": {
572
+ "name": "support.type.punctuation.soy"
573
+ }
574
+ },
575
+ "end": "(>)",
576
+ "endCaptures": {
577
+ "1": {
578
+ "name": "support.type.modifier.soy"
579
+ }
580
+ },
581
+ "patterns": [
582
+ {
583
+ "include": "#type"
584
+ }
585
+ ]
586
+ }
587
+ ]
588
+ },
589
+ "xid": {
590
+ "begin": "{(xid)\\s+",
591
+ "beginCaptures": {
592
+ "1": {
593
+ "name": "keyword.other.soy"
594
+ }
595
+ },
596
+ "end": "}",
597
+ "patterns": [
598
+ {
599
+ "include": "#expression"
600
+ }
601
+ ]
602
+ },
603
+ "variable-ref": {
604
+ "match": "\\$[\\a-zA-Z_][\\w\\.]*",
605
+ "name": "variable.other.soy"
606
+ }
607
+ },
608
+ "scopeName": "text.html.soy"
609
+ }