github-linguist 7.6.0 → 7.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +5 -5
  2. data/bin/github-linguist +17 -4
  3. data/grammars/annotation.liquidhaskell.haskell.json +58 -11
  4. data/grammars/etc.json +472 -4
  5. data/grammars/hidden.manref.json +29 -0
  6. data/grammars/hidden.regexp.injection-shell.json +28 -0
  7. data/grammars/hint.haskell.json +58 -11
  8. data/grammars/hint.message.haskell.json +58 -11
  9. data/grammars/hint.type.haskell.json +58 -11
  10. data/grammars/injections.etc.json +601 -1
  11. data/grammars/markdown.plantuml.codeblock.json +26 -0
  12. data/grammars/source.4dm.json +1156 -0
  13. data/grammars/source.abap.json +7 -7
  14. data/grammars/source.abl.json +685 -83
  15. data/grammars/source.abnf.json +23 -1
  16. data/grammars/source.agda.json +33 -203
  17. data/grammars/source.ahk.json +9 -5
  18. data/grammars/source.angelscript.json +1 -1
  19. data/grammars/source.ballerina.json +55 -19
  20. data/grammars/source.c++.json +4 -4
  21. data/grammars/source.c.platform.json +584 -33
  22. data/grammars/source.chapel.json +7 -4
  23. data/grammars/source.csound.json +1 -1
  24. data/grammars/source.css.json +3 -3
  25. data/grammars/source.css.scss.json +164 -15
  26. data/grammars/source.curlrc.json +869 -65
  27. data/grammars/source.d.json +2 -2
  28. data/grammars/source.dart.json +58 -32
  29. data/grammars/source.dircolors.json +137 -0
  30. data/grammars/source.direct-x.json +135 -0
  31. data/grammars/source.ebnf.json +67 -39
  32. data/grammars/source.editorconfig.json +23 -5
  33. data/grammars/source.elixir.json +51 -0
  34. data/grammars/source.elm.json +1 -1
  35. data/grammars/source.emacs.lisp.json +10 -0
  36. data/grammars/source.faust.json +119 -0
  37. data/grammars/source.futhark.json +146 -0
  38. data/grammars/source.gcode.json +166 -8
  39. data/grammars/source.gedcom.json +196 -0
  40. data/grammars/source.generic-db.json +41 -0
  41. data/grammars/source.gfm.blade.json +15 -0
  42. data/grammars/source.gfm.json +1697 -1439
  43. data/grammars/source.gitconfig.json +1 -1
  44. data/grammars/source.hack.json +200 -98
  45. data/grammars/source.haskell.json +58 -11
  46. data/grammars/source.hlsl.json +9 -5
  47. data/grammars/source.hosts.json +40 -0
  48. data/grammars/source.hsig.json +58 -11
  49. data/grammars/source.httpspec.json +1 -1
  50. data/grammars/source.hx.json +9 -5
  51. data/grammars/source.hxml.json +2 -2
  52. data/grammars/source.idris.json +1 -1
  53. data/grammars/source.igor.json +46 -2
  54. data/grammars/source.ini.npmrc.json +311 -0
  55. data/grammars/source.inno.json +133 -0
  56. data/grammars/source.inputrc.json +500 -0
  57. data/grammars/source.isabelle.root.json +1 -1
  58. data/grammars/source.jison.json +3 -0
  59. data/grammars/source.jisonlex.json +3 -0
  60. data/grammars/source.js.json +4 -4
  61. data/grammars/source.julia.json +70 -24
  62. data/grammars/source.kotlin.json +17 -51
  63. data/grammars/source.lcov.json +398 -0
  64. data/grammars/source.lean.json +20 -4
  65. data/grammars/source.lean.markdown.json +2598 -0
  66. data/grammars/source.lex.json +4 -4
  67. data/grammars/source.m2.json +125 -0
  68. data/grammars/source.m4.json +141 -99
  69. data/grammars/source.man-conf.json +47 -35
  70. data/grammars/source.matlab.json +437 -184
  71. data/grammars/source.mcfunction-snapshot.json +21388 -561
  72. data/grammars/source.mcfunction.json +55 -5
  73. data/grammars/source.meson.json +1 -1
  74. data/grammars/source.mlir.json +37 -317
  75. data/grammars/source.modula-3.json +10 -0
  76. data/grammars/source.msl.json +755 -0
  77. data/grammars/source.nasl.json +155 -0
  78. data/grammars/source.neon.json +381 -0
  79. data/grammars/source.nextflow.json +2 -2
  80. data/grammars/source.objc.platform.json +493 -35
  81. data/grammars/source.odin-ehr.json +806 -0
  82. data/grammars/source.odin.json +402 -0
  83. data/grammars/source.openbsd-pkg.contents.json +128 -0
  84. data/grammars/source.opts.json +12 -2
  85. data/grammars/source.perl6fe.json +1 -1
  86. data/grammars/source.postscript.json +358 -103
  87. data/grammars/source.prisma.json +435 -0
  88. data/grammars/source.purescript.json +29 -2
  89. data/grammars/source.python.json +52 -0
  90. data/grammars/source.q.json +150 -63
  91. data/grammars/source.qasm.json +66 -0
  92. data/grammars/source.ql.json +1408 -0
  93. data/grammars/source.r.json +4 -4
  94. data/grammars/source.reason.json +28 -16
  95. data/grammars/source.rego.json +124 -0
  96. data/grammars/source.sass.json +158 -3
  97. data/grammars/source.scala.json +53 -18
  98. data/grammars/source.sieve.json +383 -0
  99. data/grammars/source.solidity.json +1 -1
  100. data/grammars/source.ssh-config.json +1 -14
  101. data/grammars/source.swift.json +162 -2
  102. data/grammars/source.sy.json +2088 -183
  103. data/grammars/source.tags.json +266 -0
  104. data/grammars/source.terraform.json +576 -132
  105. data/grammars/source.tnsaudit.json +256 -0
  106. data/grammars/source.ts.json +246 -70
  107. data/grammars/source.tsx.json +247 -71
  108. data/grammars/source.v.json +587 -761
  109. data/grammars/source.vim-snippet.json +645 -0
  110. data/grammars/source.viml.json +6 -6
  111. data/grammars/source.webassembly.json +10 -0
  112. data/grammars/source.webidl.json +8 -0
  113. data/grammars/source.wgetrc.json +1640 -0
  114. data/grammars/source.wsd.json +781 -0
  115. data/grammars/source.x86.json +7 -3
  116. data/grammars/source.zig.json +231 -360
  117. data/grammars/text.dfy.dafny.json +188 -0
  118. data/grammars/text.html.php.blade.json +535 -528
  119. data/grammars/text.html.riot.json +788 -0
  120. data/grammars/text.muse.json +1471 -0
  121. data/grammars/text.openbsd-pkg.desc.json +78 -0
  122. data/grammars/text.roff.json +49 -1
  123. data/grammars/text.sfd.json +21 -0
  124. data/grammars/text.tex.latex.haskell.json +58 -11
  125. data/grammars/text.vim-help.json +383 -0
  126. data/grammars/text.xml.svg.json +8 -2
  127. data/grammars/version +1 -1
  128. data/lib/linguist/VERSION +1 -1
  129. data/lib/linguist/blob_helper.rb +4 -2
  130. data/lib/linguist/file_blob.rb +1 -1
  131. data/lib/linguist/generated.rb +96 -28
  132. data/lib/linguist/heuristics.yml +64 -4
  133. data/lib/linguist/languages.json +1 -1
  134. data/lib/linguist/languages.yml +408 -49
  135. data/lib/linguist/lazy_blob.rb +10 -10
  136. data/lib/linguist/linguist.bundle +0 -0
  137. data/lib/linguist/samples.json +48129 -31562
  138. data/lib/linguist/shebang.rb +5 -3
  139. data/lib/linguist/vendor.yml +71 -60
  140. metadata +48 -17
  141. data/grammars/source.LS.json +0 -85
  142. data/grammars/source.MCPOST.json +0 -54
  143. data/grammars/source.MOD.json +0 -55
  144. data/grammars/source.apt.json +0 -18
  145. data/grammars/source.jlex.json +0 -322
  146. data/grammars/source.yaml-ext.json +0 -324
  147. data/grammars/text.html.abl.json +0 -70
@@ -0,0 +1,188 @@
1
+ {
2
+ "name": "Dafny",
3
+ "scopeName": "text.dfy.dafny",
4
+ "patterns": [
5
+ {
6
+ "name": "meta.class.identifier.dafny",
7
+ "begin": "(class)\\s*(\\w+)\\s*",
8
+ "end": "\\{",
9
+ "beginCaptures": {
10
+ "1": {
11
+ "name": "keyword.control.dafny"
12
+ },
13
+ "2": {
14
+ "name": "entity.name.function.dafny"
15
+ }
16
+ }
17
+ },
18
+ {
19
+ "name": "keyword.control.dafny",
20
+ "match": "\\b(class|trait|datatype|codatatype|type|newtype|function|ghost|var|const|method|constructor|colemma|abstract|module|import|export|lemma|as|opened|static|protected|twostate|refines|witness|extends|returns|break|then|else|if|label|return|while|print|where|new|in|fresh|allocated|match|case|assert|by|assume|expect|reveal|modify|predicate|inductive|copredicate|forall|exists|false|true|null|old|unchanged|calc|iterator|yields|yield)\\b"
21
+ },
22
+ {
23
+ "name": "meta.method.identifier.dafny",
24
+ "begin": "(\\w+)\\s*\\(",
25
+ "end": "\\)",
26
+ "patterns": [
27
+ {
28
+ "include": "#parameters"
29
+ }
30
+ ],
31
+ "beginCaptures": {
32
+ "1": {
33
+ "name": "entity.name.function.dafny"
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "include": "#code"
39
+ }
40
+ ],
41
+ "repository": {
42
+ "code": {
43
+ "patterns": [
44
+ {
45
+ "include": "#comments"
46
+ },
47
+ {
48
+ "include": "#comments-inline"
49
+ },
50
+ {
51
+ "include": "#keywords"
52
+ }
53
+ ]
54
+ },
55
+ "comments": {
56
+ "patterns": [
57
+ {
58
+ "name": "comment.block.empty.dafny",
59
+ "match": "/\\*\\*/",
60
+ "captures": {
61
+ "0": {
62
+ "name": "punctuation.definition.comment.dafny"
63
+ }
64
+ }
65
+ },
66
+ {
67
+ "include": "#comments-inline"
68
+ }
69
+ ]
70
+ },
71
+ "comments-inline": {
72
+ "patterns": [
73
+ {
74
+ "name": "comment.block.dafny",
75
+ "begin": "/\\*",
76
+ "end": "\\*/",
77
+ "captures": {
78
+ "0": {
79
+ "name": "punctuation.definition.comment.dafny"
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "match": "\\s*((//).*$\\n?)",
85
+ "captures": {
86
+ "1": {
87
+ "name": "comment.line.double-slash.dafny"
88
+ },
89
+ "2": {
90
+ "name": "punctuation.definition.comment.dafny"
91
+ }
92
+ }
93
+ }
94
+ ]
95
+ },
96
+ "generics": {
97
+ "patterns": [
98
+ {
99
+ "name": "meta.type.identifier.dafny",
100
+ "begin": "\u003c(\\w+)",
101
+ "end": "\u003e",
102
+ "beginCaptures": {
103
+ "1": {
104
+ "name": "storage.type.dafny"
105
+ }
106
+ }
107
+ }
108
+ ]
109
+ },
110
+ "keywords": {
111
+ "patterns": [
112
+ {
113
+ "name": "keyword.control.dafny",
114
+ "match": "\\b(class|trait|datatype|codatatype|type|newtype|function|include|ghost|var|const|method|constructor|colemma|abstract|module|import|export|lemma|as|opened|static|protected|twostate|refines|witness|extends|returns|break|then|else|if|label|return|while|print|where|new|in|fresh|allocated|match|case|assert|by|assume|reveal|modify|predicate|inductive|copredicate|forall|exists|false|true|null|old|unchanged|calc|iterator|yields|yield)\\b"
115
+ },
116
+ {
117
+ "name": "entity.name.function",
118
+ "match": "\\b(function)\\b"
119
+ },
120
+ {
121
+ "name": "punctuation.terminator.dafny",
122
+ "match": ";"
123
+ },
124
+ {
125
+ "name": "keyword.control.verify.dafny",
126
+ "match": "\\b(requires|ensures|modifies|reads|invariant|decreases|reveals|provides)\\b"
127
+ },
128
+ {
129
+ "name": "keyword.type.dafny",
130
+ "match": "\\b(bool|char|real|multiset|map|imap|nat|int|ORDINAL|object|string|set|iset|seq|array|array[1-9]\\d*|bv0|bv[1-9]\\d*)\\b"
131
+ },
132
+ {
133
+ "name": "storage.type.dafny",
134
+ "match": "this"
135
+ },
136
+ {
137
+ "name": "keyword.control.catch-exception.dafny",
138
+ "match": "\\b(try|catch|finally|throw)\\b"
139
+ },
140
+ {
141
+ "name": "keyword.control.dafny",
142
+ "match": "\\|:"
143
+ },
144
+ {
145
+ "name": "keyword.operator.comparison.dafny",
146
+ "match": "(==|!=|\u003c=|\u003e=|\u003c\u003e|\u003c|\u003e)"
147
+ },
148
+ {
149
+ "name": "keyword.operator.assignment.dafny",
150
+ "match": "(:=)"
151
+ },
152
+ {
153
+ "name": "keyword.operator.increment-decrement.dafny",
154
+ "match": "(\\-\\-|\\+\\+)"
155
+ },
156
+ {
157
+ "name": "keyword.operator.arithmetic.dafny",
158
+ "match": "(\\-|\\+|\\*|\\/|%)"
159
+ },
160
+ {
161
+ "name": "keyword.operator.logical.dafny",
162
+ "match": "(!|\u0026\u0026|\\|\\|)"
163
+ },
164
+ {
165
+ "name": "keyword.operator.dereference.dafny",
166
+ "match": "(?\u003c=\\S)\\.(?=\\S)"
167
+ }
168
+ ]
169
+ },
170
+ "parameters": {
171
+ "patterns": [
172
+ {
173
+ "name": "meta.type.identifier.dafny",
174
+ "begin": ":\\s*(\\w+)",
175
+ "end": "\\s*|,|\\)|\\}|requires|ensures|modifies",
176
+ "beginCaptures": {
177
+ "1": {
178
+ "name": "storage.type.dafny"
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "include": "#generics"
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ }
@@ -23,130 +23,471 @@
23
23
  }
24
24
  ]
25
25
  },
26
- "class-builtin": {
27
- "patterns": [
28
- {
29
- "name": "support.class.builtin.php",
30
- "match": "(?xi)\n(\\\\)?\\b\n((APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b",
31
- "captures": {
32
- "1": {
33
- "name": "punctuation.separator.inheritance.php"
34
- }
35
- }
36
- }
37
- ]
38
- },
39
- "class-name": {
26
+ "blade": {
40
27
  "patterns": [
41
28
  {
42
- "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
43
- "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
29
+ "name": "comment.block.blade",
30
+ "begin": "{{--",
31
+ "end": "--}}",
44
32
  "patterns": [
45
33
  {
46
- "include": "#namespace"
34
+ "name": "invalid.illegal.php-code-in-comment.blade",
35
+ "begin": "(^\\s*)(?=\u003c\\?(?![^?]*\\?\u003e))",
36
+ "end": "(?!\\G)(\\s*$\\n)?",
37
+ "patterns": [
38
+ {
39
+ "name": "meta.embedded.block.php",
40
+ "contentName": "source.php",
41
+ "begin": "\u003c\\?(?i:php|=)?",
42
+ "end": "(\\?)\u003e",
43
+ "patterns": [
44
+ {
45
+ "include": "#language"
46
+ }
47
+ ],
48
+ "beginCaptures": {
49
+ "0": {
50
+ "name": "punctuation.section.embedded.begin.php"
51
+ }
52
+ },
53
+ "endCaptures": {
54
+ "0": {
55
+ "name": "punctuation.section.embedded.end.php"
56
+ },
57
+ "1": {
58
+ "name": "source.php"
59
+ }
60
+ }
61
+ }
62
+ ],
63
+ "beginCaptures": {
64
+ "0": {
65
+ "name": "punctuation.whitespace.embedded.leading.php"
66
+ }
67
+ },
68
+ "endCaptures": {
69
+ "0": {
70
+ "name": "punctuation.whitespace.embedded.trailing.php"
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.block.php",
76
+ "contentName": "source.php",
77
+ "begin": "\u003c\\?(?i:php|=)?(?![^?]*\\?\u003e)",
78
+ "end": "(\\?)\u003e",
79
+ "patterns": [
80
+ {
81
+ "include": "#language"
82
+ }
83
+ ],
84
+ "beginCaptures": {
85
+ "0": {
86
+ "name": "punctuation.section.embedded.begin.php"
87
+ }
88
+ },
89
+ "endCaptures": {
90
+ "0": {
91
+ "name": "punctuation.section.embedded.end.php"
92
+ },
93
+ "1": {
94
+ "name": "source.php"
95
+ }
96
+ }
97
+ },
98
+ {
99
+ "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.line.php",
100
+ "begin": "\u003c\\?(?i:php|=)?",
101
+ "end": "\u003e",
102
+ "patterns": [
103
+ {
104
+ "name": "meta.special.empty-tag.php",
105
+ "match": "\\G(\\s*)((\\?))(?=\u003e)",
106
+ "captures": {
107
+ "1": {
108
+ "name": "source.php"
109
+ },
110
+ "2": {
111
+ "name": "punctuation.section.embedded.end.php"
112
+ },
113
+ "3": {
114
+ "name": "source.php"
115
+ }
116
+ }
117
+ },
118
+ {
119
+ "contentName": "source.php",
120
+ "begin": "\\G",
121
+ "end": "(\\?)(?=\u003e)",
122
+ "patterns": [
123
+ {
124
+ "include": "#language"
125
+ }
126
+ ],
127
+ "endCaptures": {
128
+ "0": {
129
+ "name": "punctuation.section.embedded.end.php"
130
+ },
131
+ "1": {
132
+ "name": "source.php"
133
+ }
134
+ }
135
+ }
136
+ ],
137
+ "beginCaptures": {
138
+ "0": {
139
+ "name": "punctuation.section.embedded.begin.php"
140
+ }
141
+ },
142
+ "endCaptures": {
143
+ "0": {
144
+ "name": "punctuation.section.embedded.end.php"
145
+ }
146
+ }
47
147
  }
48
148
  ],
149
+ "beginCaptures": {
150
+ "0": {
151
+ "name": "punctuation.definition.comment.begin.blade"
152
+ }
153
+ },
49
154
  "endCaptures": {
50
- "1": {
51
- "name": "support.class.php"
155
+ "0": {
156
+ "name": "punctuation.definition.comment.end.blade"
52
157
  }
53
158
  }
54
159
  },
55
160
  {
56
- "include": "#class-builtin"
161
+ "name": "comment.blade",
162
+ "match": "@(?={{{|{{|{!!|@\\w+(?:::\\w+)?)"
57
163
  },
58
164
  {
59
- "begin": "(?=[\\\\a-zA-Z_])",
60
- "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
165
+ "name": "meta.function.echo.blade",
166
+ "contentName": "source.php",
167
+ "begin": "(?\u003c!@){{{",
168
+ "end": "(})}}",
61
169
  "patterns": [
62
170
  {
63
- "include": "#namespace"
171
+ "include": "#language"
64
172
  }
65
173
  ],
174
+ "beginCaptures": {
175
+ "0": {
176
+ "name": "support.function.construct.begin.blade"
177
+ }
178
+ },
66
179
  "endCaptures": {
180
+ "0": {
181
+ "name": "support.function.construct.end.blade"
182
+ },
67
183
  "1": {
68
- "name": "support.class.php"
184
+ "name": "source.php"
69
185
  }
70
186
  }
71
- }
72
- ]
73
- },
74
- "comments": {
75
- "patterns": [
187
+ },
76
188
  {
77
- "name": "comment.block.documentation.phpdoc.php",
78
- "begin": "/\\*\\*(?=\\s)",
79
- "end": "\\*/",
189
+ "name": "meta.function.echo.blade",
190
+ "contentName": "source.php",
191
+ "begin": "(?\u003c![@{]){{",
192
+ "end": "(})}",
80
193
  "patterns": [
81
194
  {
82
- "include": "#php_doc"
195
+ "include": "#language"
83
196
  }
84
197
  ],
85
198
  "beginCaptures": {
86
199
  "0": {
87
- "name": "punctuation.definition.comment.php"
200
+ "name": "support.function.construct.begin.blade"
88
201
  }
89
202
  },
90
203
  "endCaptures": {
91
204
  "0": {
92
- "name": "punctuation.definition.comment.php"
205
+ "name": "support.function.construct.end.blade"
206
+ },
207
+ "1": {
208
+ "name": "source.php"
93
209
  }
94
210
  }
95
211
  },
96
212
  {
97
- "name": "comment.block.php",
98
- "begin": "/\\*",
99
- "end": "\\*/",
100
- "captures": {
213
+ "name": "meta.function.echo.blade",
214
+ "contentName": "source.php",
215
+ "begin": "(?\u003c!@){!!",
216
+ "end": "(!)!}",
217
+ "patterns": [
218
+ {
219
+ "include": "#language"
220
+ }
221
+ ],
222
+ "beginCaptures": {
101
223
  "0": {
102
- "name": "punctuation.definition.comment.php"
224
+ "name": "support.function.construct.begin.blade"
225
+ }
226
+ },
227
+ "endCaptures": {
228
+ "0": {
229
+ "name": "support.function.construct.end.blade"
230
+ },
231
+ "1": {
232
+ "name": "source.php"
103
233
  }
104
234
  }
105
235
  },
106
236
  {
107
- "begin": "(^\\s+)?(?=//)",
108
- "end": "(?!\\G)",
237
+ "name": "meta.directive.blade",
238
+ "contentName": "source.php",
239
+ "begin": "(?x)\n(?\u003c![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 |canany\n |cannot\n |case\n |choice\n |component\n |componentfirst\n |continue\n |dd\n |dump\n |each\n |elseauth\n |elsecan\n |elsecanany\n |elsecannot\n |elseguest\n |elseif\n |empty\n |env\n |error\n |extends\n |for\n |foreach\n |forelse\n |guest\n |hassection\n |if\n |include\n |includefirst\n |includeif\n |includeunless\n |includewhen\n |inject\n |isset\n |json\n |lang\n |method\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",
240
+ "end": "\\)",
109
241
  "patterns": [
110
242
  {
111
- "name": "comment.line.double-slash.php",
112
- "begin": "//",
113
- "end": "\\n|(?=\\?\u003e)",
114
- "beginCaptures": {
115
- "0": {
116
- "name": "punctuation.definition.comment.php"
117
- }
118
- }
243
+ "include": "#language"
119
244
  }
120
245
  ],
121
246
  "beginCaptures": {
122
247
  "1": {
123
- "name": "punctuation.whitespace.comment.leading.php"
248
+ "name": "keyword.blade"
249
+ },
250
+ "2": {
251
+ "name": "begin.bracket.round.blade.php"
252
+ }
253
+ },
254
+ "endCaptures": {
255
+ "0": {
256
+ "name": "end.bracket.round.blade.php"
124
257
  }
125
258
  }
126
259
  },
127
260
  {
128
- "begin": "(^\\s+)?(?=#)",
129
- "end": "(?!\\G)",
261
+ "name": "meta.directive.blade",
262
+ "contentName": "comment.blade",
263
+ "begin": "(?x)\n(?\u003c![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 append\n |csrf\n |default\n |else\n |endauth\n |endcan\n |endcanany\n |endcannot\n |endcomponent\n |endcomponentfirst\n |endempty\n |endenv\n |enderror\n |endfor\n |endforeach\n |endforelse\n |endguest\n |endif\n |endisset\n |endlang\n |endprepend\n |endproduction\n |endpush\n |endsection\n |endslot\n |endswitch\n |endunless\n |endwhile\n |overwrite\n |parent\n |production\n |show\n |stop\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
264
+ "end": "\\)",
130
265
  "patterns": [
131
266
  {
132
- "name": "comment.line.number-sign.php",
133
- "begin": "#",
134
- "end": "\\n|(?=\\?\u003e)",
135
- "beginCaptures": {
136
- "0": {
137
- "name": "punctuation.definition.comment.php"
138
- }
139
- }
267
+ "include": "#balance_brackets"
140
268
  }
141
269
  ],
142
270
  "beginCaptures": {
143
271
  "1": {
144
- "name": "punctuation.whitespace.comment.leading.php"
272
+ "name": "keyword.blade"
273
+ },
274
+ "2": {
275
+ "name": "begin.bracket.round.blade.php"
145
276
  }
146
- }
147
- }
148
- ]
149
- },
277
+ },
278
+ "endCaptures": {
279
+ "0": {
280
+ "name": "end.bracket.round.blade.php"
281
+ }
282
+ }
283
+ },
284
+ {
285
+ "name": "keyword.blade",
286
+ "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)append\n|(?i)auth\n|(?i)break\n|(?i)continue\n|(?i)csrf\n|(?i)default\n|(?i)else\n|(?i)elseauth\n|(?i)elseguest\n|(?i)empty\n|(?i)endauth\n|(?i)endcan\n|(?i)endcanany\n|(?i)endcannot\n|(?i)endcomponent\n|(?i)endcomponentfirst\n|(?i)endempty\n|(?i)endenv\n|(?i)enderror\n|(?i)endfor\n|(?i)endforeach\n|(?i)endforelse\n|(?i)endguest\n|(?i)endif\n|(?i)endisset\n|(?i)endlang\n|(?i)endprepend\n|(?i)endproduction\n|(?i)endpush\n|(?i)endsection\n|(?i)endslot\n|(?i)endswitch\n|(?i)endunless\n|endverbatim\n|(?i)endwhile\n|(?i)guest\n|(?i)lang\n|(?i)overwrite\n|(?i)parent\n|(?i)production\n|(?i)show\n|(?i)stop\n|verbatim\n)\n\\b"
287
+ },
288
+ {
289
+ "name": "meta.embedded.block.blade",
290
+ "contentName": "source.php",
291
+ "begin": "(?\u003c![A-Za-z0-9_@])@(?i:php)\\b",
292
+ "end": "(?\u003c![A-Za-z0-9_@])(?=@(?i:endphp)\\b)",
293
+ "patterns": [
294
+ {
295
+ "include": "#language"
296
+ }
297
+ ],
298
+ "beginCaptures": {
299
+ "0": {
300
+ "name": "keyword.begin.blade"
301
+ }
302
+ },
303
+ "endCaptures": {
304
+ "0": {
305
+ "name": "keyword.end.blade"
306
+ }
307
+ }
308
+ },
309
+ {
310
+ "name": "meta.directive.blade",
311
+ "contentName": "comment.blade",
312
+ "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i:\n endphp\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
313
+ "end": "\\)",
314
+ "patterns": [
315
+ {
316
+ "include": "#balance_brackets"
317
+ }
318
+ ],
319
+ "beginCaptures": {
320
+ "1": {
321
+ "name": "keyword.end.blade"
322
+ },
323
+ "2": {
324
+ "name": "begin.bracket.round.blade.php"
325
+ }
326
+ },
327
+ "endCaptures": {
328
+ "0": {
329
+ "name": "end.bracket.round.blade.php"
330
+ }
331
+ }
332
+ },
333
+ {
334
+ "name": "keyword.end.blade",
335
+ "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)endphp\n)\n\\b"
336
+ },
337
+ {
338
+ "name": "meta.directive.custom.blade",
339
+ "contentName": "source.php",
340
+ "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n \\w+(?:::\\w+)? # Any number/letter sequence, can also be postfixed by ::someOtherString\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
341
+ "end": "\\)",
342
+ "patterns": [
343
+ {
344
+ "include": "#language"
345
+ }
346
+ ],
347
+ "beginCaptures": {
348
+ "1": {
349
+ "name": "entity.name.function.blade"
350
+ },
351
+ "2": {
352
+ "name": "begin.bracket.round.blade.php"
353
+ }
354
+ },
355
+ "endCaptures": {
356
+ "0": {
357
+ "name": "end.bracket.round.blade.php"
358
+ }
359
+ }
360
+ },
361
+ {
362
+ "name": "entity.name.function.blade",
363
+ "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n\\w+(?:::\\w+)? # Any number/letter sequence, can also be postfixed by ::someOtherString\n\\b # Bounded by word boundary"
364
+ }
365
+ ]
366
+ },
367
+ "class-builtin": {
368
+ "patterns": [
369
+ {
370
+ "name": "support.class.builtin.php",
371
+ "match": "(?xi)\n(\\\\)?\\b\n((APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b",
372
+ "captures": {
373
+ "1": {
374
+ "name": "punctuation.separator.inheritance.php"
375
+ }
376
+ }
377
+ }
378
+ ]
379
+ },
380
+ "class-name": {
381
+ "patterns": [
382
+ {
383
+ "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
384
+ "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
385
+ "patterns": [
386
+ {
387
+ "include": "#namespace"
388
+ }
389
+ ],
390
+ "endCaptures": {
391
+ "1": {
392
+ "name": "support.class.php"
393
+ }
394
+ }
395
+ },
396
+ {
397
+ "include": "#class-builtin"
398
+ },
399
+ {
400
+ "begin": "(?=[\\\\a-zA-Z_])",
401
+ "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
402
+ "patterns": [
403
+ {
404
+ "include": "#namespace"
405
+ }
406
+ ],
407
+ "endCaptures": {
408
+ "1": {
409
+ "name": "support.class.php"
410
+ }
411
+ }
412
+ }
413
+ ]
414
+ },
415
+ "comments": {
416
+ "patterns": [
417
+ {
418
+ "name": "comment.block.documentation.phpdoc.php",
419
+ "begin": "/\\*\\*(?=\\s)",
420
+ "end": "\\*/",
421
+ "patterns": [
422
+ {
423
+ "include": "#php_doc"
424
+ }
425
+ ],
426
+ "beginCaptures": {
427
+ "0": {
428
+ "name": "punctuation.definition.comment.php"
429
+ }
430
+ },
431
+ "endCaptures": {
432
+ "0": {
433
+ "name": "punctuation.definition.comment.php"
434
+ }
435
+ }
436
+ },
437
+ {
438
+ "name": "comment.block.php",
439
+ "begin": "/\\*",
440
+ "end": "\\*/",
441
+ "captures": {
442
+ "0": {
443
+ "name": "punctuation.definition.comment.php"
444
+ }
445
+ }
446
+ },
447
+ {
448
+ "begin": "(^\\s+)?(?=//)",
449
+ "end": "(?!\\G)",
450
+ "patterns": [
451
+ {
452
+ "name": "comment.line.double-slash.php",
453
+ "begin": "//",
454
+ "end": "\\n|(?=\\?\u003e)",
455
+ "beginCaptures": {
456
+ "0": {
457
+ "name": "punctuation.definition.comment.php"
458
+ }
459
+ }
460
+ }
461
+ ],
462
+ "beginCaptures": {
463
+ "1": {
464
+ "name": "punctuation.whitespace.comment.leading.php"
465
+ }
466
+ }
467
+ },
468
+ {
469
+ "begin": "(^\\s+)?(?=#)",
470
+ "end": "(?!\\G)",
471
+ "patterns": [
472
+ {
473
+ "name": "comment.line.number-sign.php",
474
+ "begin": "#",
475
+ "end": "\\n|(?=\\?\u003e)",
476
+ "beginCaptures": {
477
+ "0": {
478
+ "name": "punctuation.definition.comment.php"
479
+ }
480
+ }
481
+ }
482
+ ],
483
+ "beginCaptures": {
484
+ "1": {
485
+ "name": "punctuation.whitespace.comment.leading.php"
486
+ }
487
+ }
488
+ }
489
+ ]
490
+ },
150
491
  "constants": {
151
492
  "patterns": [
152
493
  {
@@ -3183,528 +3524,194 @@
3183
3524
  "include": "#language"
3184
3525
  }
3185
3526
  ],
3186
- "beginCaptures": {
3187
- "0": {
3188
- "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php"
3189
- }
3190
- }
3191
- }
3192
- ],
3193
- "beginCaptures": {
3194
- "0": {
3195
- "name": "keyword.control.switch.php"
3196
- }
3197
- },
3198
- "endCaptures": {
3199
- "0": {
3200
- "name": "punctuation.definition.section.switch-block.end.bracket.curly.php"
3201
- }
3202
- }
3203
- }
3204
- ]
3205
- },
3206
- "use-inner": {
3207
- "patterns": [
3208
- {
3209
- "include": "#comments"
3210
- },
3211
- {
3212
- "begin": "(?i)\\b(as)\\s+",
3213
- "end": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*",
3214
- "beginCaptures": {
3215
- "1": {
3216
- "name": "keyword.other.use-as.php"
3217
- }
3218
- },
3219
- "endCaptures": {
3220
- "0": {
3221
- "name": "entity.other.alias.php"
3222
- }
3223
- }
3224
- },
3225
- {
3226
- "include": "#class-name"
3227
- },
3228
- {
3229
- "name": "punctuation.separator.delimiter.php",
3230
- "match": ","
3231
- }
3232
- ]
3233
- },
3234
- "var_basic": {
3235
- "patterns": [
3236
- {
3237
- "name": "variable.other.php",
3238
- "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\b",
3239
- "captures": {
3240
- "1": {
3241
- "name": "punctuation.definition.variable.php"
3242
- }
3243
- }
3244
- }
3245
- ]
3246
- },
3247
- "var_global": {
3248
- "name": "variable.other.global.php",
3249
- "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b",
3250
- "captures": {
3251
- "1": {
3252
- "name": "punctuation.definition.variable.php"
3253
- }
3254
- }
3255
- },
3256
- "var_global_safer": {
3257
- "name": "variable.other.global.safer.php",
3258
- "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))",
3259
- "captures": {
3260
- "1": {
3261
- "name": "punctuation.definition.variable.php"
3262
- }
3263
- }
3264
- },
3265
- "var_language": {
3266
- "name": "variable.language.this.php",
3267
- "match": "(\\$)this\\b",
3268
- "captures": {
3269
- "1": {
3270
- "name": "punctuation.definition.variable.php"
3271
- }
3272
- }
3273
- },
3274
- "variable-name": {
3275
- "patterns": [
3276
- {
3277
- "include": "#var_global"
3278
- },
3279
- {
3280
- "include": "#var_global_safer"
3281
- },
3282
- {
3283
- "match": "(?xi)\n((\\$)(?\u003cname\u003e[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (-\u003e)(\\g\u003cname\u003e)\n |\n (\\[)(?:(\\d+)|((\\$)\\g\u003cname\u003e)|([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))(\\])\n)?",
3284
- "captures": {
3285
- "1": {
3286
- "name": "variable.other.php"
3287
- },
3288
- "10": {
3289
- "name": "string.unquoted.index.php"
3290
- },
3291
- "11": {
3292
- "name": "punctuation.section.array.end.php"
3293
- },
3294
- "2": {
3295
- "name": "punctuation.definition.variable.php"
3296
- },
3297
- "4": {
3298
- "name": "keyword.operator.class.php"
3299
- },
3300
- "5": {
3301
- "name": "variable.other.property.php"
3302
- },
3303
- "6": {
3304
- "name": "punctuation.section.array.begin.php"
3305
- },
3306
- "7": {
3307
- "name": "constant.numeric.index.php"
3308
- },
3309
- "8": {
3310
- "name": "variable.other.index.php"
3311
- },
3312
- "9": {
3313
- "name": "punctuation.definition.variable.php"
3314
- }
3315
- }
3316
- },
3317
- {
3318
- "match": "(?i)((\\${)(?\u003cname\u003e[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(}))",
3319
- "captures": {
3320
- "1": {
3321
- "name": "variable.other.php"
3322
- },
3323
- "2": {
3324
- "name": "punctuation.definition.variable.php"
3325
- },
3326
- "4": {
3327
- "name": "punctuation.definition.variable.php"
3328
- }
3329
- }
3330
- }
3331
- ]
3332
- },
3333
- "variables": {
3334
- "patterns": [
3335
- {
3336
- "include": "#var_language"
3337
- },
3338
- {
3339
- "include": "#var_global"
3340
- },
3341
- {
3342
- "include": "#var_global_safer"
3343
- },
3344
- {
3345
- "include": "#var_basic"
3346
- },
3347
- {
3348
- "begin": "\\${(?=.*?})",
3349
- "end": "}",
3350
- "patterns": [
3351
- {
3352
- "include": "#language"
3353
- }
3354
- ],
3355
- "beginCaptures": {
3356
- "0": {
3357
- "name": "punctuation.definition.variable.php"
3358
- }
3359
- },
3360
- "endCaptures": {
3361
- "0": {
3362
- "name": "punctuation.definition.variable.php"
3363
- }
3364
- }
3365
- }
3366
- ]
3367
- }
3368
- },
3369
- "injections": {
3370
- "text.html.php.blade - (meta.embedded | meta.tag | comment.block.blade), L:(text.html.php.blade meta.tag - (comment.block.blade | meta.embedded.block.blade)), L:(source.js.embedded.html - (comment.block.blade | meta.embedded.block.blade))": {
3371
- "patterns": [
3372
- {
3373
- "name": "comment.block.blade",
3374
- "begin": "{{--",
3375
- "end": "--}}",
3376
- "patterns": [
3377
- {
3378
- "name": "invalid.illegal.php-code-in-comment.blade",
3379
- "begin": "(^\\s*)(?=\u003c\\?(?![^?]*\\?\u003e))",
3380
- "end": "(?!\\G)(\\s*$\\n)?",
3381
- "patterns": [
3382
- {
3383
- "name": "meta.embedded.block.php",
3384
- "contentName": "source.php",
3385
- "begin": "\u003c\\?(?i:php|=)?",
3386
- "end": "(\\?)\u003e",
3387
- "patterns": [
3388
- {
3389
- "include": "#language"
3390
- }
3391
- ],
3392
- "beginCaptures": {
3393
- "0": {
3394
- "name": "punctuation.section.embedded.begin.php"
3395
- }
3396
- },
3397
- "endCaptures": {
3398
- "0": {
3399
- "name": "punctuation.section.embedded.end.php"
3400
- },
3401
- "1": {
3402
- "name": "source.php"
3403
- }
3404
- }
3405
- }
3406
- ],
3407
- "beginCaptures": {
3408
- "0": {
3409
- "name": "punctuation.whitespace.embedded.leading.php"
3410
- }
3411
- },
3412
- "endCaptures": {
3413
- "0": {
3414
- "name": "punctuation.whitespace.embedded.trailing.php"
3415
- }
3416
- }
3417
- },
3418
- {
3419
- "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.block.php",
3420
- "contentName": "source.php",
3421
- "begin": "\u003c\\?(?i:php|=)?(?![^?]*\\?\u003e)",
3422
- "end": "(\\?)\u003e",
3423
- "patterns": [
3424
- {
3425
- "include": "#language"
3426
- }
3427
- ],
3428
- "beginCaptures": {
3429
- "0": {
3430
- "name": "punctuation.section.embedded.begin.php"
3431
- }
3432
- },
3433
- "endCaptures": {
3434
- "0": {
3435
- "name": "punctuation.section.embedded.end.php"
3436
- },
3437
- "1": {
3438
- "name": "source.php"
3439
- }
3440
- }
3441
- },
3442
- {
3443
- "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.line.php",
3444
- "begin": "\u003c\\?(?i:php|=)?",
3445
- "end": "\u003e",
3446
- "patterns": [
3447
- {
3448
- "name": "meta.special.empty-tag.php",
3449
- "match": "\\G(\\s*)((\\?))(?=\u003e)",
3450
- "captures": {
3451
- "1": {
3452
- "name": "source.php"
3453
- },
3454
- "2": {
3455
- "name": "punctuation.section.embedded.end.php"
3456
- },
3457
- "3": {
3458
- "name": "source.php"
3459
- }
3460
- }
3461
- },
3462
- {
3463
- "contentName": "source.php",
3464
- "begin": "\\G",
3465
- "end": "(\\?)(?=\u003e)",
3466
- "patterns": [
3467
- {
3468
- "include": "#language"
3469
- }
3470
- ],
3471
- "endCaptures": {
3472
- "0": {
3473
- "name": "punctuation.section.embedded.end.php"
3474
- },
3475
- "1": {
3476
- "name": "source.php"
3477
- }
3478
- }
3479
- }
3480
- ],
3481
- "beginCaptures": {
3482
- "0": {
3483
- "name": "punctuation.section.embedded.begin.php"
3484
- }
3485
- },
3486
- "endCaptures": {
3487
- "0": {
3488
- "name": "punctuation.section.embedded.end.php"
3489
- }
3490
- }
3491
- }
3492
- ],
3493
- "beginCaptures": {
3494
- "0": {
3495
- "name": "punctuation.definition.comment.begin.blade"
3496
- }
3497
- },
3498
- "endCaptures": {
3499
- "0": {
3500
- "name": "punctuation.definition.comment.end.blade"
3501
- }
3502
- }
3503
- },
3504
- {
3505
- "name": "comment.blade",
3506
- "match": "@(?={{{|{{|{!!|@\\w+(?:::\\w+)?)"
3507
- },
3508
- {
3509
- "name": "meta.function.echo.blade",
3510
- "contentName": "source.php",
3511
- "begin": "(?\u003c!@){{{",
3512
- "end": "(})}}",
3513
- "patterns": [
3514
- {
3515
- "include": "#language"
3527
+ "beginCaptures": {
3528
+ "0": {
3529
+ "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php"
3530
+ }
3531
+ }
3516
3532
  }
3517
3533
  ],
3518
3534
  "beginCaptures": {
3519
3535
  "0": {
3520
- "name": "support.function.construct.begin.blade"
3536
+ "name": "keyword.control.switch.php"
3521
3537
  }
3522
3538
  },
3523
3539
  "endCaptures": {
3524
3540
  "0": {
3525
- "name": "support.function.construct.end.blade"
3526
- },
3527
- "1": {
3528
- "name": "source.php"
3541
+ "name": "punctuation.definition.section.switch-block.end.bracket.curly.php"
3529
3542
  }
3530
3543
  }
3544
+ }
3545
+ ]
3546
+ },
3547
+ "use-inner": {
3548
+ "patterns": [
3549
+ {
3550
+ "include": "#comments"
3531
3551
  },
3532
3552
  {
3533
- "name": "meta.function.echo.blade",
3534
- "contentName": "source.php",
3535
- "begin": "(?\u003c![@{]){{",
3536
- "end": "(})}",
3537
- "patterns": [
3538
- {
3539
- "include": "#language"
3540
- }
3541
- ],
3553
+ "begin": "(?i)\\b(as)\\s+",
3554
+ "end": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*",
3542
3555
  "beginCaptures": {
3543
- "0": {
3544
- "name": "support.function.construct.begin.blade"
3556
+ "1": {
3557
+ "name": "keyword.other.use-as.php"
3545
3558
  }
3546
3559
  },
3547
3560
  "endCaptures": {
3548
3561
  "0": {
3549
- "name": "support.function.construct.end.blade"
3550
- },
3551
- "1": {
3552
- "name": "source.php"
3562
+ "name": "entity.other.alias.php"
3553
3563
  }
3554
3564
  }
3555
3565
  },
3556
3566
  {
3557
- "name": "meta.function.echo.blade",
3558
- "contentName": "source.php",
3559
- "begin": "(?\u003c!@){!!",
3560
- "end": "(!)!}",
3561
- "patterns": [
3562
- {
3563
- "include": "#language"
3564
- }
3565
- ],
3566
- "beginCaptures": {
3567
- "0": {
3568
- "name": "support.function.construct.begin.blade"
3569
- }
3570
- },
3571
- "endCaptures": {
3572
- "0": {
3573
- "name": "support.function.construct.end.blade"
3574
- },
3567
+ "include": "#class-name"
3568
+ },
3569
+ {
3570
+ "name": "punctuation.separator.delimiter.php",
3571
+ "match": ","
3572
+ }
3573
+ ]
3574
+ },
3575
+ "var_basic": {
3576
+ "patterns": [
3577
+ {
3578
+ "name": "variable.other.php",
3579
+ "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\b",
3580
+ "captures": {
3575
3581
  "1": {
3576
- "name": "source.php"
3582
+ "name": "punctuation.definition.variable.php"
3577
3583
  }
3578
3584
  }
3585
+ }
3586
+ ]
3587
+ },
3588
+ "var_global": {
3589
+ "name": "variable.other.global.php",
3590
+ "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b",
3591
+ "captures": {
3592
+ "1": {
3593
+ "name": "punctuation.definition.variable.php"
3594
+ }
3595
+ }
3596
+ },
3597
+ "var_global_safer": {
3598
+ "name": "variable.other.global.safer.php",
3599
+ "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))",
3600
+ "captures": {
3601
+ "1": {
3602
+ "name": "punctuation.definition.variable.php"
3603
+ }
3604
+ }
3605
+ },
3606
+ "var_language": {
3607
+ "name": "variable.language.this.php",
3608
+ "match": "(\\$)this\\b",
3609
+ "captures": {
3610
+ "1": {
3611
+ "name": "punctuation.definition.variable.php"
3612
+ }
3613
+ }
3614
+ },
3615
+ "variable-name": {
3616
+ "patterns": [
3617
+ {
3618
+ "include": "#var_global"
3579
3619
  },
3580
3620
  {
3581
- "name": "meta.directive.blade",
3582
- "contentName": "source.php",
3583
- "begin": "(?x)\n(?\u003c![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 |canany\n |cannot\n |case\n |choice\n |component\n |componentfirst\n |continue\n |dd\n |dump\n |each\n |elseauth\n |elsecan\n |elsecanany\n |elsecannot\n |elseguest\n |elseif\n |empty\n |error\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 |method\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",
3584
- "end": "\\)",
3585
- "patterns": [
3586
- {
3587
- "include": "#language"
3588
- }
3589
- ],
3590
- "beginCaptures": {
3621
+ "include": "#var_global_safer"
3622
+ },
3623
+ {
3624
+ "match": "(?xi)\n((\\$)(?\u003cname\u003e[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (-\u003e)(\\g\u003cname\u003e)\n |\n (\\[)(?:(\\d+)|((\\$)\\g\u003cname\u003e)|([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))(\\])\n)?",
3625
+ "captures": {
3591
3626
  "1": {
3592
- "name": "keyword.blade"
3627
+ "name": "variable.other.php"
3628
+ },
3629
+ "10": {
3630
+ "name": "string.unquoted.index.php"
3631
+ },
3632
+ "11": {
3633
+ "name": "punctuation.section.array.end.php"
3593
3634
  },
3594
3635
  "2": {
3595
- "name": "begin.bracket.round.blade.php"
3596
- }
3597
- },
3598
- "endCaptures": {
3599
- "0": {
3600
- "name": "end.bracket.round.blade.php"
3636
+ "name": "punctuation.definition.variable.php"
3637
+ },
3638
+ "4": {
3639
+ "name": "keyword.operator.class.php"
3640
+ },
3641
+ "5": {
3642
+ "name": "variable.other.property.php"
3643
+ },
3644
+ "6": {
3645
+ "name": "punctuation.section.array.begin.php"
3646
+ },
3647
+ "7": {
3648
+ "name": "constant.numeric.index.php"
3649
+ },
3650
+ "8": {
3651
+ "name": "variable.other.index.php"
3652
+ },
3653
+ "9": {
3654
+ "name": "punctuation.definition.variable.php"
3601
3655
  }
3602
3656
  }
3603
3657
  },
3604
3658
  {
3605
- "name": "meta.directive.blade",
3606
- "contentName": "comment.blade",
3607
- "begin": "(?x)\n(?\u003c![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 append\n |csrf\n |default\n |else\n |endauth\n |endcan\n |endcanany\n |endcannot\n |endcomponent\n |endcomponentfirst\n |endempty\n |enderror\n |endfor\n |endforeach\n |endforelse\n |endguest\n |endif\n |endisset\n |endlang\n |endprepend\n |endpush\n |endsection\n |endslot\n |endswitch\n |endunless\n |endwhile\n |overwrite\n |parent\n |show\n |stop\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3608
- "end": "\\)",
3609
- "patterns": [
3610
- {
3611
- "include": "#balance_brackets"
3612
- }
3613
- ],
3614
- "beginCaptures": {
3659
+ "match": "(?i)((\\${)(?\u003cname\u003e[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(}))",
3660
+ "captures": {
3615
3661
  "1": {
3616
- "name": "keyword.blade"
3662
+ "name": "variable.other.php"
3617
3663
  },
3618
3664
  "2": {
3619
- "name": "begin.bracket.round.blade.php"
3620
- }
3621
- },
3622
- "endCaptures": {
3623
- "0": {
3624
- "name": "end.bracket.round.blade.php"
3665
+ "name": "punctuation.definition.variable.php"
3666
+ },
3667
+ "4": {
3668
+ "name": "punctuation.definition.variable.php"
3625
3669
  }
3626
3670
  }
3627
- },
3671
+ }
3672
+ ]
3673
+ },
3674
+ "variables": {
3675
+ "patterns": [
3628
3676
  {
3629
- "name": "keyword.blade",
3630
- "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)append\n|(?i)auth\n|(?i)break\n|(?i)continue\n|(?i)csrf\n|(?i)default\n|(?i)else\n|(?i)elseauth\n|(?i)elseguest\n|(?i)empty\n|(?i)endauth\n|(?i)endcan\n|(?i)endcanany\n|(?i)endcannot\n|(?i)endcomponent\n|(?i)endcomponentfirst\n|(?i)endempty\n|(?i)enderror\n|(?i)endfor\n|(?i)endforeach\n|(?i)endforelse\n|(?i)endguest\n|(?i)endif\n|(?i)endisset\n|(?i)endlang\n|(?i)endprepend\n|(?i)endpush\n|(?i)endsection\n|(?i)endslot\n|(?i)endswitch\n|(?i)endunless\n|endverbatim\n|(?i)endwhile\n|(?i)guest\n|(?i)lang\n|(?i)overwrite\n|(?i)parent\n|(?i)show\n|(?i)stop\n|verbatim\n)\n\\b"
3677
+ "include": "#var_language"
3631
3678
  },
3632
3679
  {
3633
- "name": "meta.embedded.block.blade",
3634
- "contentName": "source.php",
3635
- "begin": "(?\u003c![A-Za-z0-9_@])@(?i:php)\\b",
3636
- "end": "(?\u003c![A-Za-z0-9_@])(?=@(?i:endphp)\\b)",
3637
- "patterns": [
3638
- {
3639
- "include": "#language"
3640
- }
3641
- ],
3642
- "beginCaptures": {
3643
- "0": {
3644
- "name": "keyword.begin.blade"
3645
- }
3646
- },
3647
- "endCaptures": {
3648
- "0": {
3649
- "name": "keyword.end.blade"
3650
- }
3651
- }
3680
+ "include": "#var_global"
3652
3681
  },
3653
3682
  {
3654
- "name": "meta.directive.blade",
3655
- "contentName": "comment.blade",
3656
- "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i:\n endphp\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3657
- "end": "\\)",
3658
- "patterns": [
3659
- {
3660
- "include": "#balance_brackets"
3661
- }
3662
- ],
3663
- "beginCaptures": {
3664
- "1": {
3665
- "name": "keyword.end.blade"
3666
- },
3667
- "2": {
3668
- "name": "begin.bracket.round.blade.php"
3669
- }
3670
- },
3671
- "endCaptures": {
3672
- "0": {
3673
- "name": "end.bracket.round.blade.php"
3674
- }
3675
- }
3683
+ "include": "#var_global_safer"
3676
3684
  },
3677
3685
  {
3678
- "name": "keyword.end.blade",
3679
- "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)endphp\n)\n\\b"
3686
+ "include": "#var_basic"
3680
3687
  },
3681
3688
  {
3682
- "name": "meta.directive.custom.blade",
3683
- "contentName": "source.php",
3684
- "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n \\w+(?:::\\w+)? # Any number/letter sequence, can also be postfixed by ::someOtherString\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3685
- "end": "\\)",
3689
+ "begin": "\\${(?=.*?})",
3690
+ "end": "}",
3686
3691
  "patterns": [
3687
3692
  {
3688
3693
  "include": "#language"
3689
3694
  }
3690
3695
  ],
3691
3696
  "beginCaptures": {
3692
- "1": {
3693
- "name": "entity.name.function.blade"
3694
- },
3695
- "2": {
3696
- "name": "begin.bracket.round.blade.php"
3697
+ "0": {
3698
+ "name": "punctuation.definition.variable.php"
3697
3699
  }
3698
3700
  },
3699
3701
  "endCaptures": {
3700
3702
  "0": {
3701
- "name": "end.bracket.round.blade.php"
3703
+ "name": "punctuation.definition.variable.php"
3702
3704
  }
3703
3705
  }
3704
- },
3706
+ }
3707
+ ]
3708
+ }
3709
+ },
3710
+ "injections": {
3711
+ "text.html.php.blade - (meta.embedded | meta.tag | comment.block.blade), L:(text.html.php.blade meta.tag - (comment.block.blade | meta.embedded.block.blade)), L:(source.js.embedded.html - (comment.block.blade | meta.embedded.block.blade))": {
3712
+ "patterns": [
3705
3713
  {
3706
- "name": "entity.name.function.blade",
3707
- "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n\\w+(?:::\\w+)? # Any number/letter sequence, can also be postfixed by ::someOtherString\n\\b # Bounded by word boundary"
3714
+ "include": "#blade"
3708
3715
  },
3709
3716
  {
3710
3717
  "begin": "(^\\s*)(?=\u003c\\?(?![^?]*\\?\u003e))",