github-linguist 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +1445 -0
  3. data/grammars/hint.haskell.json +134 -17
  4. data/grammars/hint.message.haskell.json +134 -17
  5. data/grammars/hint.type.haskell.json +134 -17
  6. data/grammars/source.abl.json +48 -48
  7. data/grammars/source.afm.json +8 -1
  8. data/grammars/source.angelscript.json +195 -0
  9. data/grammars/source.ats.json +128 -58
  10. data/grammars/source.awk.json +138 -138
  11. data/grammars/source.ballerina.json +434 -0
  12. data/grammars/source.chapel.json +1 -1
  13. data/grammars/source.clips.json +20 -20
  14. data/grammars/source.cobol.json +4 -3
  15. data/grammars/source.coffee.json +556 -109
  16. data/grammars/source.cs.json +10 -5
  17. data/grammars/source.csound-document.json +1 -1
  18. data/grammars/source.csound-score.json +9 -9
  19. data/grammars/source.csound.json +23 -28
  20. data/grammars/source.css.json +6 -5
  21. data/grammars/source.data-weave.json +1584 -0
  22. data/grammars/source.elixir.json +3 -61
  23. data/grammars/source.elm.json +88 -88
  24. data/grammars/source.emacs.lisp.json +12 -1
  25. data/grammars/source.haskell.json +134 -17
  26. data/grammars/source.hsig.json +1376 -0
  27. data/grammars/source.httpspec.json +128 -128
  28. data/grammars/source.jison.json +6 -14
  29. data/grammars/source.jisonlex.json +1 -9
  30. data/grammars/source.js.json +1 -0
  31. data/grammars/source.js.regexp.json +0 -4
  32. data/grammars/source.js.regexp.replacement.json +0 -4
  33. data/grammars/source.jsdoc.json +3 -3
  34. data/grammars/source.lsl.json +146 -53
  35. data/grammars/source.mercury.json +166 -166
  36. data/grammars/source.ne.json +108 -0
  37. data/grammars/source.nim_filter.json +51 -51
  38. data/grammars/source.nut.json +266 -0
  39. data/grammars/source.opal.json +112 -112
  40. data/grammars/source.opalsysdefs.json +16 -16
  41. data/grammars/source.pan.json +1 -1
  42. data/grammars/source.papyrus.skyrim.json +720 -720
  43. data/grammars/source.pawn.json +2 -2
  44. data/grammars/source.prolog.eclipse.json +42 -42
  45. data/grammars/source.prolog.json +41 -41
  46. data/grammars/source.purescript.json +41 -25
  47. data/grammars/source.python.json +47 -34
  48. data/grammars/source.racket.json +54 -54
  49. data/grammars/source.reason.json +37 -3
  50. data/grammars/source.regexp.python.json +31 -0
  51. data/grammars/source.ruby.gemfile.json +27 -0
  52. data/grammars/source.ruby.json +1057 -356
  53. data/grammars/source.rust.json +1 -1
  54. data/grammars/source.sbt.json +13 -3
  55. data/grammars/source.scala.json +74 -55
  56. data/grammars/source.shaderlab.json +1 -1
  57. data/grammars/source.shell.json +26 -21
  58. data/grammars/source.shen.json +91 -91
  59. data/grammars/source.sqf.json +1 -1
  60. data/grammars/source.supercollider.json +1 -1
  61. data/grammars/source.swift.json +4 -0
  62. data/grammars/source.terra.json +36 -37
  63. data/grammars/source.terraform.json +98 -98
  64. data/grammars/source.ts.json +2231 -1677
  65. data/grammars/source.tsx.json +142 -3520
  66. data/grammars/source.vbnet.json +201 -263
  67. data/grammars/source.viml.json +2 -2
  68. data/grammars/source.wdl.json +200 -0
  69. data/grammars/source.yaml.json +34 -16
  70. data/grammars/text.find-refs.json +3 -3
  71. data/grammars/text.haml.json +1 -1
  72. data/grammars/text.html.abl.json +6 -6
  73. data/grammars/text.html.erb.json +8 -11
  74. data/grammars/text.html.php.blade.json +256 -220
  75. data/grammars/text.html.vue.json +1 -1
  76. data/grammars/text.slim.json +31 -17
  77. data/grammars/text.tex.latex.haskell.json +150 -33
  78. data/lib/linguist/heuristics.rb +8 -0
  79. data/lib/linguist/languages.json +1 -1
  80. data/lib/linguist/languages.yml +82 -26
  81. data/lib/linguist/samples.json +134512 -132868
  82. data/lib/linguist/vendor.yml +3 -0
  83. data/lib/linguist/version.rb +1 -1
  84. metadata +13 -4
@@ -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 @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n auth\n |break\n |can\n |cannot\n |case\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 |guest\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 |switch\n |unless\n |unset\n |while\n |yield\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
218
+ "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n auth\n |break\n |can\n |cannot\n |case\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 |guest\n |hassection\n |if\n |include\n |includefirst\n |includeif\n |includewhen\n |inject\n |isset\n |json\n |lang\n |php\n |prepend\n |push\n |section\n |slot\n |stack\n |switch\n |unless\n |unset\n |while\n |yield\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
219
219
  "beginCaptures": {
220
220
  "1": {
221
221
  "name": "keyword.blade"
@@ -478,128 +478,7 @@
478
478
  ]
479
479
  },
480
480
  {
481
- "match": "[^\\(\\)]+"
482
- }
483
- ]
484
- },
485
- "class-body": {
486
- "patterns": [
487
- {
488
- "match": "(?xi)\n\\b(use)\\s+\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n((?:\\s*,\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*)\n(?=\\s*;)",
489
- "name": "meta.use.php",
490
- "captures": {
491
- "1": {
492
- "name": "keyword.other.use.php"
493
- },
494
- "2": {
495
- "name": "support.class.php"
496
- },
497
- "3": {
498
- "patterns": [
499
- {
500
- "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*",
501
- "name": "support.class.php"
502
- },
503
- {
504
- "match": ",",
505
- "name": "punctuation.separator.delimiter.php"
506
- }
507
- ]
508
- }
509
- }
510
- },
511
- {
512
- "begin": "(?i)\\buse\\b",
513
- "beginCaptures": {
514
- "0": {
515
- "name": "keyword.other.use.php"
516
- }
517
- },
518
- "end": "}",
519
- "endCaptures": {
520
- "0": {
521
- "name": "punctuation.definition.use.end.bracket.curly.php"
522
- }
523
- },
524
- "name": "meta.use.php",
525
- "patterns": [
526
- {
527
- "match": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n((?:\\s*,\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*)",
528
- "captures": {
529
- "1": {
530
- "name": "support.class.php"
531
- },
532
- "2": {
533
- "patterns": [
534
- {
535
- "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*",
536
- "name": "support.class.php"
537
- },
538
- {
539
- "match": ",",
540
- "name": "punctuation.separator.delimiter.php"
541
- }
542
- ]
543
- }
544
- }
545
- },
546
- {
547
- "begin": "{",
548
- "beginCaptures": {
549
- "0": {
550
- "name": "punctuation.definition.use.begin.bracket.curly.php"
551
- }
552
- },
553
- "end": "(?=})",
554
- "contentName": "meta.use.body.php",
555
- "patterns": [
556
- {
557
- "include": "#scope-resolution"
558
- },
559
- {
560
- "match": "(?xi)\n\\b(as)\\s+\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\b # Visibility modifier OR alias\n(?:\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))? # alias",
561
- "captures": {
562
- "1": {
563
- "name": "keyword.other.use-as.php"
564
- },
565
- "2": {
566
- "patterns": [
567
- {
568
- "match": "\\b(final|abstract|public|private|protected|static)\\b",
569
- "name": "storage.modifier.php"
570
- },
571
- {
572
- "match": "[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*",
573
- "name": "entity.other.alias.php"
574
- }
575
- ]
576
- },
577
- "3": {
578
- "name": "entity.other.alias.php"
579
- }
580
- }
581
- },
582
- {
583
- "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)",
584
- "captures": {
585
- "1": {
586
- "name": "keyword.other.use-insteadof.php"
587
- },
588
- "2": {
589
- "name": "support.class.php"
590
- }
591
- }
592
- },
593
- {
594
- "match": ";",
595
- "name": "punctuation.terminator.expression.php"
596
- }
597
- ]
598
- }
599
- ]
600
- },
601
- {
602
- "include": "#language"
481
+ "match": "[^()]+"
603
482
  }
604
483
  ]
605
484
  },
@@ -983,7 +862,7 @@
983
862
  "function-call": {
984
863
  "patterns": [
985
864
  {
986
- "begin": "(?i)(\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()",
865
+ "begin": "(?xi)\n(\n \\\\?\\b # Optional root namespace\n [a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]* # First namespace\n (?:\\\\[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)+ # Additional namespaces\n)\\s*(\\()",
987
866
  "beginCaptures": {
988
867
  "1": {
989
868
  "patterns": [
@@ -1000,7 +879,7 @@
1000
879
  "name": "punctuation.definition.arguments.begin.bracket.round.php"
1001
880
  }
1002
881
  },
1003
- "end": "\\)",
882
+ "end": "\\)|(?=\\?>)",
1004
883
  "endCaptures": {
1005
884
  "0": {
1006
885
  "name": "punctuation.definition.arguments.end.bracket.round.php"
@@ -1017,7 +896,11 @@
1017
896
  "begin": "(?i)(\\\\)?\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()",
1018
897
  "beginCaptures": {
1019
898
  "1": {
1020
- "name": "punctuation.separator.inheritance.php"
899
+ "patterns": [
900
+ {
901
+ "include": "#namespace"
902
+ }
903
+ ]
1021
904
  },
1022
905
  "2": {
1023
906
  "patterns": [
@@ -1034,7 +917,7 @@
1034
917
  "name": "punctuation.definition.arguments.begin.bracket.round.php"
1035
918
  }
1036
919
  },
1037
- "end": "\\)",
920
+ "end": "\\)|(?=\\?>)",
1038
921
  "endCaptures": {
1039
922
  "0": {
1040
923
  "name": "punctuation.definition.arguments.end.bracket.round.php"
@@ -1732,14 +1615,18 @@
1732
1615
  "patterns": [
1733
1616
  {
1734
1617
  "match": "\\\\[0-7]{1,3}",
1735
- "name": "constant.numeric.octal.php"
1618
+ "name": "constant.character.escape.octal.php"
1736
1619
  },
1737
1620
  {
1738
1621
  "match": "\\\\x[0-9A-Fa-f]{1,2}",
1739
- "name": "constant.numeric.hex.php"
1622
+ "name": "constant.character.escape.hex.php"
1740
1623
  },
1741
1624
  {
1742
- "match": "\\\\[enrt\\\\\\$\\\"]",
1625
+ "match": "\\\\u{[0-9A-Fa-f]+}",
1626
+ "name": "constant.character.escape.unicode.php"
1627
+ },
1628
+ {
1629
+ "match": "\\\\[nrtvef$\"\\\\]",
1743
1630
  "name": "constant.character.escape.php"
1744
1631
  },
1745
1632
  {
@@ -1783,14 +1670,6 @@
1783
1670
  {
1784
1671
  "include": "#comments"
1785
1672
  },
1786
- {
1787
- "match": "{",
1788
- "name": "punctuation.section.scope.begin.php"
1789
- },
1790
- {
1791
- "match": "}",
1792
- "name": "punctuation.section.scope.end.php"
1793
- },
1794
1673
  {
1795
1674
  "begin": "(?i)^\\s*(interface)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(extends)?\\s*",
1796
1675
  "beginCaptures": {
@@ -1848,68 +1727,165 @@
1848
1727
  ]
1849
1728
  },
1850
1729
  {
1851
- "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\b\\s+(?=([a-z0-9_\\x{7f}-\\x{ff}\\\\]+\\s*($|[;{]|(/[/*])))|$)",
1730
+ "match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{ff}\\\\]+)(?=\\s*;)",
1731
+ "name": "meta.namespace.php",
1732
+ "captures": {
1733
+ "1": {
1734
+ "name": "keyword.other.namespace.php"
1735
+ },
1736
+ "2": {
1737
+ "name": "entity.name.type.namespace.php",
1738
+ "patterns": [
1739
+ {
1740
+ "match": "\\\\",
1741
+ "name": "punctuation.separator.inheritance.php"
1742
+ }
1743
+ ]
1744
+ }
1745
+ }
1746
+ },
1747
+ {
1748
+ "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+",
1852
1749
  "beginCaptures": {
1853
1750
  "1": {
1854
1751
  "name": "keyword.other.namespace.php"
1855
1752
  }
1856
1753
  },
1857
- "contentName": "entity.name.type.namespace.php",
1858
- "end": "(?i)(?=\\s*$|[^a-z0-9_\\x{7f}-\\x{ff}\\\\])",
1754
+ "end": "(?<=})|(?=\\?>)",
1859
1755
  "name": "meta.namespace.php",
1860
1756
  "patterns": [
1861
1757
  {
1862
- "match": "\\\\",
1863
- "name": "punctuation.separator.inheritance.php"
1758
+ "include": "#comments"
1759
+ },
1760
+ {
1761
+ "match": "(?i)[a-z0-9_\\x{7f}-\\x{ff}\\\\]+",
1762
+ "name": "entity.name.type.namespace.php",
1763
+ "captures": {
1764
+ "0": {
1765
+ "patterns": [
1766
+ {
1767
+ "match": "\\\\",
1768
+ "name": "punctuation.separator.inheritance.php"
1769
+ }
1770
+ ]
1771
+ }
1772
+ }
1773
+ },
1774
+ {
1775
+ "begin": "{",
1776
+ "beginCaptures": {
1777
+ "0": {
1778
+ "name": "punctuation.definition.namespace.begin.bracket.curly.php"
1779
+ }
1780
+ },
1781
+ "end": "}|(?=\\?>)",
1782
+ "endCaptures": {
1783
+ "0": {
1784
+ "name": "punctuation.definition.namespace.end.bracket.curly.php"
1785
+ }
1786
+ },
1787
+ "patterns": [
1788
+ {
1789
+ "include": "#language"
1790
+ }
1791
+ ]
1792
+ },
1793
+ {
1794
+ "match": "[^\\s]+",
1795
+ "name": "invalid.illegal.identifier.php"
1864
1796
  }
1865
1797
  ]
1866
1798
  },
1867
1799
  {
1868
- "begin": "(?i)\\b(use)\\s+(?:(const|function)\\s+)?",
1800
+ "match": "\\s+(?=use\\b)"
1801
+ },
1802
+ {
1803
+ "begin": "(?i)\\buse\\b",
1869
1804
  "beginCaptures": {
1870
- "1": {
1805
+ "0": {
1871
1806
  "name": "keyword.other.use.php"
1872
- },
1873
- "2": {
1874
- "name": "storage.type.${2:/downcase}.php"
1875
1807
  }
1876
1808
  },
1877
- "end": "(?=;|(?:^\\s*$))",
1809
+ "end": "(?<=})|(?=;)",
1878
1810
  "name": "meta.use.php",
1879
1811
  "patterns": [
1880
1812
  {
1881
- "include": "#comments"
1813
+ "match": "\\b(const|function)\\b",
1814
+ "name": "storage.type.${1:/downcase}.php"
1882
1815
  },
1883
1816
  {
1884
- "begin": "(?i)\\s*(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\])",
1885
- "end": "(?i)(?:\\s*(as)\\s+([a-z0-9_\\x{7f}-\\x{ff}]*))?\\s*(?=,|;|$)",
1817
+ "begin": "{",
1818
+ "beginCaptures": {
1819
+ "0": {
1820
+ "name": "punctuation.definition.use.begin.bracket.curly.php"
1821
+ }
1822
+ },
1823
+ "end": "}",
1886
1824
  "endCaptures": {
1887
- "1": {
1888
- "name": "keyword.other.use-as.php"
1889
- },
1890
- "2": {
1891
- "name": "support.other.namespace.use-as.php"
1825
+ "0": {
1826
+ "name": "punctuation.definition.use.end.bracket.curly.php"
1892
1827
  }
1893
1828
  },
1894
1829
  "patterns": [
1895
1830
  {
1896
- "include": "#class-builtin"
1831
+ "include": "#scope-resolution"
1897
1832
  },
1898
1833
  {
1899
- "begin": "(?i)\\s*(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\])",
1900
- "end": "$|(?=[\\s,;])",
1901
- "name": "support.other.namespace.use.php",
1902
- "patterns": [
1903
- {
1904
- "match": "\\\\",
1905
- "name": "punctuation.separator.inheritance.php"
1834
+ "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b",
1835
+ "captures": {
1836
+ "1": {
1837
+ "name": "keyword.other.use-as.php"
1838
+ },
1839
+ "2": {
1840
+ "name": "storage.modifier.php"
1841
+ },
1842
+ "3": {
1843
+ "name": "entity.other.alias.php"
1906
1844
  }
1907
- ]
1845
+ }
1846
+ },
1847
+ {
1848
+ "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b",
1849
+ "captures": {
1850
+ "1": {
1851
+ "name": "keyword.other.use-as.php"
1852
+ },
1853
+ "2": {
1854
+ "patterns": [
1855
+ {
1856
+ "match": "^(?:final|abstract|public|private|protected|static)$",
1857
+ "name": "storage.modifier.php"
1858
+ },
1859
+ {
1860
+ "match": ".+",
1861
+ "name": "entity.other.alias.php"
1862
+ }
1863
+ ]
1864
+ }
1865
+ }
1866
+ },
1867
+ {
1868
+ "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)",
1869
+ "captures": {
1870
+ "1": {
1871
+ "name": "keyword.other.use-insteadof.php"
1872
+ },
1873
+ "2": {
1874
+ "name": "support.class.php"
1875
+ }
1876
+ }
1877
+ },
1878
+ {
1879
+ "match": ";",
1880
+ "name": "punctuation.terminator.expression.php"
1881
+ },
1882
+ {
1883
+ "include": "#use-inner"
1908
1884
  }
1909
1885
  ]
1910
1886
  },
1911
1887
  {
1912
- "match": "\\s*,\\s*"
1888
+ "include": "#use-inner"
1913
1889
  }
1914
1890
  ]
1915
1891
  },
@@ -1926,7 +1902,7 @@
1926
1902
  "name": "entity.name.type.class.php"
1927
1903
  }
1928
1904
  },
1929
- "end": "}",
1905
+ "end": "}|(?=\\?>)",
1930
1906
  "endCaptures": {
1931
1907
  "0": {
1932
1908
  "name": "punctuation.definition.class.end.bracket.curly.php"
@@ -2025,11 +2001,11 @@
2025
2001
  "name": "punctuation.definition.class.begin.bracket.curly.php"
2026
2002
  }
2027
2003
  },
2028
- "end": "(?=})",
2004
+ "end": "(?=}|\\?>)",
2029
2005
  "contentName": "meta.class.body.php",
2030
2006
  "patterns": [
2031
2007
  {
2032
- "include": "#class-body"
2008
+ "include": "#language"
2033
2009
  }
2034
2010
  ]
2035
2011
  }
@@ -2039,8 +2015,12 @@
2039
2015
  "include": "#switch_statement"
2040
2016
  },
2041
2017
  {
2042
- "match": "(?x)\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b",
2043
- "name": "keyword.control.php"
2018
+ "match": "(?x)\n\\s*\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b",
2019
+ "captures": {
2020
+ "1": {
2021
+ "name": "keyword.control.${1:/downcase}.php"
2022
+ }
2023
+ }
2044
2024
  },
2045
2025
  {
2046
2026
  "begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+",
@@ -2257,7 +2237,7 @@
2257
2237
  "name": "punctuation.definition.array.begin.bracket.round.php"
2258
2238
  }
2259
2239
  },
2260
- "end": "\\)",
2240
+ "end": "\\)|(?=\\?>)",
2261
2241
  "endCaptures": {
2262
2242
  "0": {
2263
2243
  "name": "punctuation.definition.array.end.bracket.round.php"
@@ -2285,7 +2265,7 @@
2285
2265
  }
2286
2266
  },
2287
2267
  {
2288
- "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|trait|parent|self|object)\\b",
2268
+ "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object)\\b",
2289
2269
  "name": "storage.type.php"
2290
2270
  },
2291
2271
  {
@@ -2299,9 +2279,20 @@
2299
2279
  "match": ";",
2300
2280
  "name": "punctuation.terminator.expression.php"
2301
2281
  },
2282
+ {
2283
+ "match": ":",
2284
+ "name": "punctuation.terminator.statement.php"
2285
+ },
2302
2286
  {
2303
2287
  "include": "#heredoc"
2304
2288
  },
2289
+ {
2290
+ "include": "#numbers"
2291
+ },
2292
+ {
2293
+ "match": "(?i)\\bclone\\b",
2294
+ "name": "keyword.other.clone.php"
2295
+ },
2305
2296
  {
2306
2297
  "match": "\\.=?",
2307
2298
  "name": "keyword.operator.string.php"
@@ -2376,9 +2367,6 @@
2376
2367
  }
2377
2368
  ]
2378
2369
  },
2379
- {
2380
- "include": "#numbers"
2381
- },
2382
2370
  {
2383
2371
  "include": "#instantiation"
2384
2372
  },
@@ -2404,6 +2392,25 @@
2404
2392
  {
2405
2393
  "include": "#string-backtick"
2406
2394
  },
2395
+ {
2396
+ "begin": "{",
2397
+ "beginCaptures": {
2398
+ "0": {
2399
+ "name": "punctuation.definition.begin.bracket.curly.php"
2400
+ }
2401
+ },
2402
+ "end": "}|(?=\\?>)",
2403
+ "endCaptures": {
2404
+ "0": {
2405
+ "name": "punctuation.definition.end.bracket.curly.php"
2406
+ }
2407
+ },
2408
+ "patterns": [
2409
+ {
2410
+ "include": "#language"
2411
+ }
2412
+ ]
2413
+ },
2407
2414
  {
2408
2415
  "begin": "\\[",
2409
2416
  "beginCaptures": {
@@ -2411,7 +2418,7 @@
2411
2418
  "name": "punctuation.section.array.begin.php"
2412
2419
  }
2413
2420
  },
2414
- "end": "\\]",
2421
+ "end": "\\]|(?=\\?>)",
2415
2422
  "endCaptures": {
2416
2423
  "0": {
2417
2424
  "name": "punctuation.section.array.end.php"
@@ -2430,7 +2437,7 @@
2430
2437
  "name": "punctuation.definition.begin.bracket.round.php"
2431
2438
  }
2432
2439
  },
2433
- "end": "\\)",
2440
+ "end": "\\)|(?=\\?>)",
2434
2441
  "endCaptures": {
2435
2442
  "0": {
2436
2443
  "name": "punctuation.definition.end.bracket.round.php"
@@ -2471,8 +2478,36 @@
2471
2478
  ]
2472
2479
  },
2473
2480
  "numbers": {
2474
- "match": "(?i)\\b((0x[0-9a-f]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))(e(\\+|-)?[0-9]+)?)\\b",
2475
- "name": "constant.numeric.php"
2481
+ "patterns": [
2482
+ {
2483
+ "match": "0[xX][0-9a-fA-F]+",
2484
+ "name": "constant.numeric.hex.php"
2485
+ },
2486
+ {
2487
+ "match": "0[bB][01]+",
2488
+ "name": "constant.numeric.binary.php"
2489
+ },
2490
+ {
2491
+ "match": "0[0-7]+",
2492
+ "name": "constant.numeric.octal.php"
2493
+ },
2494
+ {
2495
+ "match": "(?x)\n(?:\n [0-9]*(\\.)[0-9]+(?:[eE][+-]?[0-9]+)?|\n [0-9]+(\\.)[0-9]*(?:[eE][+-]?[0-9]+)?|\n [0-9]+[eE][+-]?[0-9]+\n)",
2496
+ "name": "constant.numeric.decimal.php",
2497
+ "captures": {
2498
+ "1": {
2499
+ "name": "punctuation.separator.decimal.period.php"
2500
+ },
2501
+ "2": {
2502
+ "name": "punctuation.separator.decimal.period.php"
2503
+ }
2504
+ }
2505
+ },
2506
+ {
2507
+ "match": "0|[1-9][0-9]*",
2508
+ "name": "constant.numeric.decimal.php"
2509
+ }
2510
+ ]
2476
2511
  },
2477
2512
  "object": {
2478
2513
  "patterns": [
@@ -2511,7 +2546,7 @@
2511
2546
  "name": "punctuation.definition.arguments.begin.bracket.round.php"
2512
2547
  }
2513
2548
  },
2514
- "end": "\\)",
2549
+ "end": "\\)|(?=\\?>)",
2515
2550
  "endCaptures": {
2516
2551
  "0": {
2517
2552
  "name": "punctuation.definition.arguments.end.bracket.round.php"
@@ -2646,7 +2681,7 @@
2646
2681
  "match": "(@xlink)\\s+(.+)\\s*$"
2647
2682
  },
2648
2683
  {
2649
- "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[A-Za-z_\\x{7f}-\\x{ff}]|\\()",
2684
+ "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[A-Za-z_\\x{7f}-\\x{ff}\\\\]|\\()",
2650
2685
  "beginCaptures": {
2651
2686
  "1": {
2652
2687
  "name": "keyword.other.phpdoc.php"
@@ -2682,7 +2717,7 @@
2682
2717
  ]
2683
2718
  },
2684
2719
  "php_doc_types": {
2685
- "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*(\\|[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*",
2720
+ "match": "(?i)[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*(\\|[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)*",
2686
2721
  "captures": {
2687
2722
  "0": {
2688
2723
  "patterns": [
@@ -2708,7 +2743,7 @@
2708
2743
  "name": "punctuation.definition.type.begin.bracket.round.phpdoc.php"
2709
2744
  }
2710
2745
  },
2711
- "end": "(\\))(\\[\\])",
2746
+ "end": "(\\))(\\[\\])|(?=\\*/)",
2712
2747
  "endCaptures": {
2713
2748
  "1": {
2714
2749
  "name": "punctuation.definition.type.end.bracket.round.phpdoc.php"
@@ -2734,7 +2769,7 @@
2734
2769
  ]
2735
2770
  },
2736
2771
  "php_doc_types_array_single": {
2737
- "match": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(\\[\\])",
2772
+ "match": "(?i)([a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)(\\[\\])",
2738
2773
  "captures": {
2739
2774
  "1": {
2740
2775
  "patterns": [
@@ -2883,7 +2918,7 @@
2883
2918
  "name": "punctuation.definition.arguments.begin.bracket.round.php"
2884
2919
  }
2885
2920
  },
2886
- "end": "\\)",
2921
+ "end": "\\)|(?=\\?>)",
2887
2922
  "endCaptures": {
2888
2923
  "0": {
2889
2924
  "name": "punctuation.definition.arguments.end.bracket.round.php"
@@ -3572,6 +3607,9 @@
3572
3607
  },
3573
3608
  "switch_statement": {
3574
3609
  "patterns": [
3610
+ {
3611
+ "match": "\\s+(?=switch\\b)"
3612
+ },
3575
3613
  {
3576
3614
  "begin": "\\bswitch\\b(?!\\s*\\(.*\\)\\s*:)",
3577
3615
  "beginCaptures": {
@@ -3579,7 +3617,7 @@
3579
3617
  "name": "keyword.control.switch.php"
3580
3618
  }
3581
3619
  },
3582
- "end": "}",
3620
+ "end": "}|(?=\\?>)",
3583
3621
  "endCaptures": {
3584
3622
  "0": {
3585
3623
  "name": "punctuation.definition.section.switch-block.end.bracket.curly.php"
@@ -3594,7 +3632,7 @@
3594
3632
  "name": "punctuation.definition.switch-expression.begin.bracket.round.php"
3595
3633
  }
3596
3634
  },
3597
- "end": "\\)",
3635
+ "end": "\\)|(?=\\?>)",
3598
3636
  "endCaptures": {
3599
3637
  "0": {
3600
3638
  "name": "punctuation.definition.switch-expression.end.bracket.round.php"
@@ -3613,38 +3651,8 @@
3613
3651
  "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php"
3614
3652
  }
3615
3653
  },
3616
- "end": "(?=})",
3654
+ "end": "(?=}|\\?>)",
3617
3655
  "patterns": [
3618
- {
3619
- "begin": "\\bcase\\b",
3620
- "beginCaptures": {
3621
- "0": {
3622
- "name": "keyword.control.case.php"
3623
- }
3624
- },
3625
- "end": ":",
3626
- "endCaptures": {
3627
- "0": {
3628
- "name": "punctuation.terminator.statement.php"
3629
- }
3630
- },
3631
- "patterns": [
3632
- {
3633
- "include": "#language"
3634
- }
3635
- ]
3636
- },
3637
- {
3638
- "match": "(?:^\\s*)?\\b(default)\\s*(:)",
3639
- "captures": {
3640
- "1": {
3641
- "name": "keyword.control.default.php"
3642
- },
3643
- "2": {
3644
- "name": "punctuation.terminator.statement.php"
3645
- }
3646
- }
3647
- },
3648
3656
  {
3649
3657
  "include": "#language"
3650
3658
  }
@@ -3654,6 +3662,34 @@
3654
3662
  }
3655
3663
  ]
3656
3664
  },
3665
+ "use-inner": {
3666
+ "patterns": [
3667
+ {
3668
+ "include": "#comments"
3669
+ },
3670
+ {
3671
+ "begin": "(?i)\\b(as)\\s+",
3672
+ "beginCaptures": {
3673
+ "1": {
3674
+ "name": "keyword.other.use-as.php"
3675
+ }
3676
+ },
3677
+ "end": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*",
3678
+ "endCaptures": {
3679
+ "0": {
3680
+ "name": "entity.other.alias.php"
3681
+ }
3682
+ }
3683
+ },
3684
+ {
3685
+ "include": "#class-name"
3686
+ },
3687
+ {
3688
+ "match": ",",
3689
+ "name": "punctuation.separator.delimiter.php"
3690
+ }
3691
+ ]
3692
+ },
3657
3693
  "var_basic": {
3658
3694
  "patterns": [
3659
3695
  {