github-linguist 7.24.1 → 7.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/ext/linguist/lex.linguist_yy.c +14 -17
  3. data/ext/linguist/lex.linguist_yy.h +2 -2
  4. data/ext/linguist/tokenizer.l +0 -1
  5. data/grammars/govulncheck.json +1 -0
  6. data/grammars/inline.graphql.scala.json +1 -0
  7. data/grammars/liquid.injection.json +1 -1
  8. data/grammars/markdown.curry.codeblock.json +1 -1
  9. data/grammars/markdown.talon.codeblock.json +1 -0
  10. data/grammars/source.abap.json +1 -1
  11. data/grammars/source.abl.json +1 -1
  12. data/grammars/source.acucobol.json +1 -1
  13. data/grammars/source.apex.json +1 -0
  14. data/grammars/source.arr.json +1 -0
  15. data/grammars/source.astro.json +1 -1
  16. data/grammars/source.basic.json +1 -1
  17. data/grammars/source.bicep.json +1 -1
  18. data/grammars/source.brs.json +1 -1
  19. data/grammars/source.bsl.json +1 -1
  20. data/grammars/source.cds.json +1 -1
  21. data/grammars/source.chapel.json +1 -1
  22. data/grammars/source.circom.json +1 -0
  23. data/grammars/source.clar.json +1 -1
  24. data/grammars/source.cobol.json +1 -1
  25. data/grammars/source.cs.json +1 -1
  26. data/grammars/source.curlrc.json +1 -1
  27. data/grammars/source.d2.json +1 -0
  28. data/grammars/source.dart.json +1 -1
  29. data/grammars/source.denizenscript.json +1 -1
  30. data/grammars/source.did.json +1 -0
  31. data/grammars/source.dm.json +1 -1
  32. data/grammars/source.editorconfig.json +1 -1
  33. data/grammars/source.fsharp.json +1 -1
  34. data/grammars/source.gdscript.json +1 -1
  35. data/grammars/source.generic-config.json +1 -0
  36. data/grammars/source.gfm.blade.json +1 -1
  37. data/grammars/source.gitconfig.json +1 -1
  38. data/grammars/source.gleam.json +1 -1
  39. data/grammars/source.graphql.json +1 -1
  40. data/grammars/source.hocon.json +1 -1
  41. data/grammars/source.hosts.json +1 -1
  42. data/grammars/source.j.json +1 -1
  43. data/grammars/source.jflex.json +1 -1
  44. data/grammars/source.kerboscript.json +1 -0
  45. data/grammars/source.kickstart.json +1 -0
  46. data/grammars/source.kotlin.json +1 -1
  47. data/grammars/source.lolcode.json +1 -0
  48. data/grammars/source.m2.json +1 -1
  49. data/grammars/source.matlab.json +1 -1
  50. data/grammars/source.mdx.json +1 -0
  51. data/grammars/source.mermaid.flowchart.json +1 -1
  52. data/grammars/source.mermaid.json +1 -1
  53. data/grammars/source.mermaid.mindmap.json +1 -0
  54. data/grammars/source.mo.json +1 -1
  55. data/grammars/source.move.json +1 -1
  56. data/grammars/source.nasal.json +1 -0
  57. data/grammars/source.nim.json +1 -1
  58. data/grammars/source.nimcfg.json +1 -1
  59. data/grammars/source.nushell.json +1 -0
  60. data/grammars/source.pact.json +1 -0
  61. data/grammars/source.pddl.json +1 -1
  62. data/grammars/source.pnlgrp.json +1 -1
  63. data/grammars/source.polar.json +1 -1
  64. data/grammars/source.postscript.json +1 -1
  65. data/grammars/source.prisma.json +1 -1
  66. data/grammars/source.rascal.json +1 -1
  67. data/grammars/source.rbs.json +1 -0
  68. data/grammars/source.rescript.json +1 -1
  69. data/grammars/source.rmcobol.json +1 -0
  70. data/grammars/source.rpgle.json +1 -1
  71. data/grammars/source.rust.json +1 -1
  72. data/grammars/source.scala.json +1 -1
  73. data/grammars/source.scenic.json +1 -1
  74. data/grammars/source.singularity.json +1 -1
  75. data/grammars/source.smithy.json +1 -1
  76. data/grammars/source.soql.json +1 -0
  77. data/grammars/source.sqf.json +1 -1
  78. data/grammars/source.stan.json +1 -1
  79. data/grammars/source.svelte.json +1 -1
  80. data/grammars/source.sway.json +1 -0
  81. data/grammars/source.talon.json +1 -1
  82. data/grammars/source.tlverilog.json +1 -0
  83. data/grammars/source.toc.json +1 -1
  84. data/grammars/source.ts.json +1 -1
  85. data/grammars/source.tsql.json +1 -1
  86. data/grammars/source.tsx.json +1 -1
  87. data/grammars/source.v.json +1 -1
  88. data/grammars/source.vba.json +1 -0
  89. data/grammars/source.wgsl.json +1 -0
  90. data/grammars/source.wit.json +1 -0
  91. data/grammars/source.wwb.json +1 -0
  92. data/grammars/source.yara.json +1 -1
  93. data/grammars/text.adblock.json +1 -1
  94. data/grammars/text.checksums.json +1 -1
  95. data/grammars/text.haml.json +1 -1
  96. data/grammars/text.html.liquid.json +1 -1
  97. data/grammars/text.html.markdown.d2.json +1 -0
  98. data/grammars/text.marko.json +1 -1
  99. data/grammars/text.md.json +1 -0
  100. data/grammars/text.pseudoxml.json +1 -0
  101. data/grammars/text.restructuredtext.json +1 -1
  102. data/grammars/text.sfd.json +1 -1
  103. data/grammars/text.xml.svg.json +1 -1
  104. data/grammars/version +1 -1
  105. data/lib/linguist/VERSION +1 -1
  106. data/lib/linguist/generated.rb +8 -0
  107. data/lib/linguist/generic.yml +1 -0
  108. data/lib/linguist/heuristics.yml +104 -47
  109. data/lib/linguist/languages.json +1 -1
  110. data/lib/linguist/languages.yml +272 -35
  111. data/lib/linguist/samples.json +1 -1
  112. data/lib/linguist/vendor.yml +7 -1
  113. metadata +36 -10
  114. data/grammars/source.gfm.json +0 -1
  115. data/grammars/source.nim.comment.json +0 -1
  116. data/grammars/source.nim_filter.json +0 -1
@@ -1,23 +1,23 @@
1
1
  # A collection of simple regexp-based rules that can be applied to content
2
2
  # to disambiguate languages with the same file extension.
3
3
  #
4
- # There two top-level keys: disambiguations and named_patterns.
4
+ # There are two top-level keys: disambiguations and named_patterns.
5
5
  #
6
6
  # disambiguations - a list of disambiguation rules, one for each
7
7
  # extension or group of extensions.
8
8
  # extensions - an array of file extensions that this block applies to.
9
9
  # rules - list of rules that are applied in order to the content
10
- # of a file with matching extension. Rules are evaluated
10
+ # of a file with a matching extension. Rules are evaluated
11
11
  # until one of them matches. If none matches, no language
12
12
  # is returned.
13
13
  # language - Language to be returned if the rule matches.
14
14
  # pattern - Ruby-compatible regular expression that makes the rule
15
- # match. If no pattern is specified, the rule always match.
15
+ # match. If no pattern is specified, the rule always matches.
16
16
  # Pattern can be a string with a single regular expression
17
17
  # or an array of strings that will be merged in a single
18
18
  # regular expression (with union).
19
19
  # and - An and block merges multiple rules and checks that all of
20
- # of them must match.
20
+ # them must match.
21
21
  # negative_pattern - Same as pattern, but checks for absence of matches.
22
22
  # named_pattern - A pattern can be reused by specifying it in the
23
23
  # named_patterns section and referencing it here by its
@@ -58,19 +58,23 @@ disambiguations:
58
58
  # AL pattern source from https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage - keyword.other.applicationobject.al
59
59
  - language: AL
60
60
  and:
61
- - pattern: '\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN))\b'
61
+ - pattern: '\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN|REPORTEXTENSION|INTERFACE|PERMISSIONSET|PERMISSIONSETEXTENSION|ENTITLEMENT))\b'
62
62
  # Open-ended fallback to Perl AutoLoader
63
63
  - language: Perl
64
+ - extensions: ['.app']
65
+ rules:
66
+ - language: Erlang
67
+ pattern: '^\{\s*(?:application|''application'')\s*,\s*(?:[a-z]+[\w@]*|''[^'']+'')\s*,\s*\[(?:.|[\r\n])*\]\s*\}\.[ \t]*$'
64
68
  - extensions: ['.as']
65
69
  rules:
66
70
  - language: ActionScript
67
- pattern: '^\s*(?:package(?:\s+[\w.]+)?\s+(?:{|$)|import\s+[\w.*]+\s*;|(?=.*?(?:intrinsic|extends))(intrinsic\s+)?class\s+[\w<>.]+(?:\s+extends\s+[\w<>.]+)?|(?:(?:public|protected|private|static)\s+)*(?:(?:var|const|local)\s+\w+\s*:\s*[\w<>.]+(?:\s*=.*)?\s*;|function\s+\w+\s*\((?:\s*\w+\s*:\s*[\w<>.]+\s*(,\s*\w+\s*:\s*[\w<>.]+\s*)*)?\)))'
71
+ pattern: '^\s*(?:package(?:\s+[\w.]+)?\s+(?:\{|$)|import\s+[\w.*]+\s*;|(?=.*?(?:intrinsic|extends))(intrinsic\s+)?class\s+[\w<>.]+(?:\s+extends\s+[\w<>.]+)?|(?:(?:public|protected|private|static)\s+)*(?:(?:var|const|local)\s+\w+\s*:\s*[\w<>.]+(?:\s*=.*)?\s*;|function\s+\w+\s*\((?:\s*\w+\s*:\s*[\w<>.]+\s*(,\s*\w+\s*:\s*[\w<>.]+\s*)*)?\)))'
68
72
  - extensions: ['.asc']
69
73
  rules:
70
74
  - language: Public Key
71
75
  pattern: '^(----[- ]BEGIN|ssh-(rsa|dss)) '
72
76
  - language: AsciiDoc
73
- pattern: '^[=-]+(\s|\n)|{{[A-Za-z]'
77
+ pattern: '^[=-]+(\s|\n)|\{\{[A-Za-z]'
74
78
  - language: AGS Script
75
79
  pattern: '^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])'
76
80
  - extensions: ['.asm']
@@ -85,9 +89,15 @@ disambiguations:
85
89
  - extensions: ['.bas']
86
90
  rules:
87
91
  - language: FreeBasic
88
- pattern: '^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s'
92
+ pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)(?:$|\s)'
89
93
  - language: BASIC
90
- pattern: '^\s*\d+'
94
+ pattern: '\A\s*\d'
95
+ - language: VBA
96
+ and:
97
+ - named_pattern: vb-module
98
+ - named_pattern: vba
99
+ - language: Visual Basic 6.0
100
+ named_pattern: vb-module
91
101
  - extensions: ['.bb']
92
102
  rules:
93
103
  - language: BlitzBasic
@@ -109,7 +119,7 @@ disambiguations:
109
119
  - extensions: ['.bi']
110
120
  rules:
111
121
  - language: FreeBasic
112
- pattern: '^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s'
122
+ pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)(?:$|\s)'
113
123
  - extensions: ['.bs']
114
124
  rules:
115
125
  - language: Bikeshed
@@ -141,11 +151,11 @@ disambiguations:
141
151
  - language: Visual Basic 6.0
142
152
  and:
143
153
  - named_pattern: vb-class
144
- - pattern: '^\s*BEGIN\R\s*MultiUse\s*=.*\R\s*Persistable\s*='
154
+ - pattern: '^\s*BEGIN(?:\r?\n|\r)\s*MultiUse\s*=.*(?:\r?\n|\r)\s*Persistable\s*='
145
155
  - language: VBA
146
- named_pattern: vb-class
156
+ named_pattern: vb-class
147
157
  - language: TeX
148
- pattern: '^\s*\\(?:NeedsTeXFormat|ProvidesClass){'
158
+ pattern: '^\s*\\(?:NeedsTeXFormat|ProvidesClass)\{'
149
159
  - language: ObjectScript
150
160
  pattern: '^Class\s'
151
161
  - extensions: ['.cmp']
@@ -157,7 +167,7 @@ disambiguations:
157
167
  - language: Smalltalk
158
168
  pattern: '![\w\s]+methodsFor: '
159
169
  - language: 'C#'
160
- pattern: '^\s*(using\s+[A-Z][\s\w.]+;|namespace\s*[\w\.]+\s*({|;)|\/\/)'
170
+ pattern: '^\s*(using\s+[A-Z][\s\w.]+;|namespace\s*[\w\.]+\s*(\{|;)|\/\/)'
161
171
  - extensions: ['.csc']
162
172
  rules:
163
173
  - language: GSC
@@ -165,7 +175,7 @@ disambiguations:
165
175
  - extensions: ['.csl']
166
176
  rules:
167
177
  - language: XML
168
- pattern: '(?i:^\s*(\<\?xml|xmlns))'
178
+ pattern: '(?i:^\s*(<\?xml|xmlns))'
169
179
  - language: Kusto
170
180
  pattern: '(^\|\s*(where|extend|project|limit|summarize))|(^\.\w+)'
171
181
  - extensions: ['.d']
@@ -173,10 +183,10 @@ disambiguations:
173
183
  - language: D
174
184
  # see http://dlang.org/spec/grammar
175
185
  # ModuleDeclaration | ImportDeclaration | FuncDeclaration | unittest
176
- pattern: '^module\s+[\w.]*\s*;|import\s+[\w\s,.:]*;|\w+\s+\w+\s*\(.*\)(?:\(.*\))?\s*{[^}]*}|unittest\s*(?:\(.*\))?\s*{[^}]*}'
186
+ pattern: '^module\s+[\w.]*\s*;|import\s+[\w\s,.:]*;|\w+\s+\w+\s*\(.*\)(?:\(.*\))?\s*\{[^}]*\}|unittest\s*(?:\(.*\))?\s*\{[^}]*\}'
177
187
  - language: DTrace
178
188
  # see http://dtrace.org/guide/chp-prog.html, http://dtrace.org/guide/chp-profile.html, http://dtrace.org/guide/chp-opt.html
179
- pattern: '^(\w+:\w*:\w*:\w*|BEGIN|END|provider\s+|(tick|profile)-\w+\s+{[^}]*}|#pragma\s+D\s+(option|attributes|depends_on)\s|#pragma\s+ident\s)'
189
+ pattern: '^(\w+:\w*:\w*:\w*|BEGIN|END|provider\s+|(tick|profile)-\w+\s+\{[^}]*\}|#pragma\s+D\s+(option|attributes|depends_on)\s|#pragma\s+ident\s)'
180
190
  - language: Makefile
181
191
  # path/target : dependency \
182
192
  # target : \
@@ -194,8 +204,8 @@ disambiguations:
194
204
  - language: E
195
205
  pattern:
196
206
  - '^\s*(def|var)\s+(.+):='
197
- - '^\s*(def|to)\s+(\w+)(\(.+\))?\s+{'
198
- - '^\s*(when)\s+(\(.+\))\s+->\s+{'
207
+ - '^\s*(def|to)\s+(\w+)(\(.+\))?\s+\{'
208
+ - '^\s*(when)\s+(\(.+\))\s+->\s+\{'
199
209
  - language: Eiffel
200
210
  pattern:
201
211
  - '^\s*\w+\s*(?:,\s*\w+)*[:]\s*\w+\s'
@@ -214,7 +224,7 @@ disambiguations:
214
224
  - language: Erlang
215
225
  pattern: '^\s*(?:%%|main\s*\(.*?\)\s*->)'
216
226
  - language: JavaScript
217
- pattern: '(?m:\/\/|("|'')use strict\1|export\s+default\s|\/\*.*?\*\/)'
227
+ pattern: '\/\/|("|'')use strict\1|export\s+default\s|\/\*(?:.|[\r\n])*?\*\/'
218
228
  - extensions: ['.ex']
219
229
  rules:
220
230
  - language: Elixir
@@ -250,11 +260,11 @@ disambiguations:
250
260
  - language: VBA
251
261
  and:
252
262
  - named_pattern: vb-form
253
- - pattern: '^\s*Begin\s+{[0-9A-Z\-]*}\s?'
263
+ - pattern: '^\s*Begin\s+\{[0-9A-Z\-]*\}\s?'
254
264
  - language: Visual Basic 6.0
255
265
  and:
256
266
  - named_pattern: vb-form
257
- - pattern: '^\s*Begin\s+VB\.Form\s+'
267
+ - pattern: '^\s*Begin\s+VB\.Form\s+'
258
268
  - extensions: ['.fs']
259
269
  rules:
260
270
  - language: Forth
@@ -268,7 +278,7 @@ disambiguations:
268
278
  - extensions: ['.ftl']
269
279
  rules:
270
280
  - language: FreeMarker
271
- pattern: '^(?:<|[a-zA-Z-][a-zA-Z0-9_-]+[ \t]+\w)|\${\w+[^\n]*?}|^[ \t]*(?:<#--.*?-->|<#([a-z]+)(?=\s|>)[^>]*>.*?</#\1>|\[#--.*?--\]|\[#([a-z]+)(?=\s|\])[^\]]*\].*?\[#\2\])'
281
+ pattern: '^(?:<|[a-zA-Z-][a-zA-Z0-9_-]+[ \t]+\w)|\$\{\w+[^\n]*?\}|^[ \t]*(?:<#--.*?-->|<#([a-z]+)(?=\s|>)[^>]*>.*?</#\1>|\[#--.*?--\]|\[#([a-z]+)(?=\s|\])[^\]]*\].*?\[#\2\])'
272
282
  - language: Fluent
273
283
  pattern: '^-?[a-zA-Z][a-zA-Z0-9_-]* *=|\{\$-?[a-zA-Z][-\w]*(?:\.[a-zA-Z][-\w]*)?\}'
274
284
  - extensions: ['.g']
@@ -286,7 +296,7 @@ disambiguations:
286
296
  - extensions: ['.gml']
287
297
  rules:
288
298
  - language: XML
289
- pattern: '(?i:^\s*(\<\?xml|xmlns))'
299
+ pattern: '(?i:^\s*(<\?xml|xmlns))'
290
300
  - language: Graph Modeling Language
291
301
  pattern: '(?i:^\s*(graph|node)\s+\[$)'
292
302
  - language: Gerber Image
@@ -343,21 +353,21 @@ disambiguations:
343
353
  pattern: '^<\?(?:php)?'
344
354
  - language: SourcePawn
345
355
  pattern:
346
- - '^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*{)?)'
356
+ - '^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*\{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*\{)?)'
347
357
  - '^methodmap\s+\w+\s+<\s+\w+'
348
358
  - '^\s*MarkNativeAsOptional\s*\('
349
359
  - language: NASL
350
360
  pattern:
351
361
  - '^\s*include\s*\(\s*(?:"|'')[\\/\w\-\.:\s]+\.(?:nasl|inc)\s*(?:"|'')\s*\)\s*;'
352
362
  - '^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"'']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"'']+)?\s*)*+\s*;'
353
- - '^\s*namespace\s+\w+\s*{'
354
- - '^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*{'
355
- - '^\s*(?:public\s+|private\s+|\s*)function\s+\w+\s*\([\w\s,]*\)\s*{'
363
+ - '^\s*namespace\s+\w+\s*\{'
364
+ - '^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*\{'
365
+ - '^\s*(?:public\s+|private\s+|\s*)function\s+\w+\s*\([\w\s,]*\)\s*\{'
356
366
  - language: POV-Ray SDL
357
367
  pattern: '^\s*#(declare|local|macro|while)\s'
358
368
  - language: Pascal
359
369
  pattern:
360
- - '(?i:^\s*{\$(?:mode|ifdef|undef|define)[ ]+[a-z0-9_]+})'
370
+ - '(?i:^\s*\{\$(?:mode|ifdef|undef|define)[ ]+[a-z0-9_]+\})'
361
371
  - '^\s*end[.;]\s*$'
362
372
  - extensions: ['.json']
363
373
  rules:
@@ -379,7 +389,7 @@ disambiguations:
379
389
  - extensions: ['.ls']
380
390
  rules:
381
391
  - language: LoomScript
382
- pattern: '^\s*package\s*[\w\.\/\*\s]*\s*{'
392
+ pattern: '^\s*package\s*[\w\.\/\*\s]*\s*\{'
383
393
  - language: LiveScript
384
394
  - extensions: ['.lsp', '.lisp']
385
395
  rules:
@@ -404,7 +414,7 @@ disambiguations:
404
414
  - language: MATLAB
405
415
  pattern: '^\s*%'
406
416
  - language: Limbo
407
- pattern: '^\w+\s*:\s*module\s*{'
417
+ pattern: '^\w+\s*:\s*module\s*\{'
408
418
  - extensions: ['.m4']
409
419
  rules:
410
420
  - language: M4Sugar
@@ -474,6 +484,11 @@ disambiguations:
474
484
  - language: NL
475
485
  pattern: '^(b|g)[0-9]+ '
476
486
  - language: NewLisp
487
+ - extensions: ['.nu']
488
+ rules:
489
+ - language: Nushell
490
+ pattern: '^\s*(import|export|module|def|let|let-env) '
491
+ - language: Nu
477
492
  - extensions: ['.odin']
478
493
  rules:
479
494
  - language: Object Data Instance Notation
@@ -498,20 +513,28 @@ disambiguations:
498
513
  - language: Prolog
499
514
  pattern: '^[^#]*:-'
500
515
  - language: Perl
501
- named_pattern: perl5
516
+ and:
517
+ - negative_pattern: '^\s*use\s+v6\b'
518
+ - named_pattern: perl
502
519
  - language: Raku
503
- named_pattern: perl6
520
+ named_pattern: raku
504
521
  - extensions: ['.plist']
505
522
  rules:
506
523
  - language: XML Property List
507
524
  pattern: '^\s*(?:<\?xml\s|<!DOCTYPE\s+plist|<plist(?:\s+version\s*=\s*(["''])\d+(?:\.\d+)?\1)?\s*>\s*$)'
508
525
  - language: OpenStep Property List
526
+ - extensions: ['.plt']
527
+ rules:
528
+ - language: Prolog
529
+ pattern: '^\s*:-'
509
530
  - extensions: ['.pm']
510
531
  rules:
511
532
  - language: Perl
512
- named_pattern: perl5
533
+ and:
534
+ - negative_pattern: '^\s*use\s+v6\b'
535
+ - named_pattern: perl
513
536
  - language: Raku
514
- named_pattern: perl6
537
+ named_pattern: raku
515
538
  - language: X PixMap
516
539
  pattern: '^\s*\/\* XPM \*\/'
517
540
  - extensions: ['.pod']
@@ -556,7 +579,7 @@ disambiguations:
556
579
  - extensions: ['.q']
557
580
  rules:
558
581
  - language: q
559
- pattern: '((?i:[A-Z.][\w.]*:{)|(^|\n)\\(cd?|d|l|p|ts?) )'
582
+ pattern: '((?i:[A-Z.][\w.]*:\{)|(^|\n)\\(cd?|d|l|p|ts?) )'
560
583
  - language: HiveQL
561
584
  pattern: '(?i:SELECT\s+[\w*,]+\s+FROM|(CREATE|ALTER|DROP)\s(DATABASE|SCHEMA|TABLE))'
562
585
  - extensions: ['.qs']
@@ -577,7 +600,7 @@ disambiguations:
577
600
  pattern:
578
601
  - '^\s*module\s+type\s'
579
602
  - '^\s*(?:include|open)\s+\w+\s*;\s*$'
580
- - '^\s*let\s+(?:module\s\w+\s*=\s*{|\w+:\s+.*=.*;\s*$)'
603
+ - '^\s*let\s+(?:module\s\w+\s*=\s*\{|\w+:\s+.*=.*;\s*$)'
581
604
  - language: C++
582
605
  pattern:
583
606
  - '^\s*#(?:(?:if|ifdef|define|pragma)\s+\w|\s*include\s+<[^>]+>)'
@@ -597,7 +620,7 @@ disambiguations:
597
620
  - extensions: ['.rpy']
598
621
  rules:
599
622
  - language: Python
600
- pattern: '(?m:^(import|from|class|def)\s)'
623
+ pattern: '^(import|from|class|def)\s'
601
624
  - language: "Ren'Py"
602
625
  - extensions: ['.rs']
603
626
  rules:
@@ -654,7 +677,7 @@ disambiguations:
654
677
  - language: StringTemplate
655
678
  pattern: '\$\w+[($]|(.)!\s*.+?\s*!\1|<!\s*.+?\s*!>|\[!\s*.+?\s*!\]|\{!\s*.+?\s*!\}'
656
679
  - language: Smalltalk
657
- pattern: '\A\s*[\[{(^"''\w#]|[a-zA-Z_]\w*\s*:=\s*[a-zA-Z_]\w*|class\s*>>\s*[a-zA-Z_]\w*|^[a-zA-Z_]\w*\s+[a-zA-Z_]\w*:|^Class\s*{|if(?:True|False):\s*\['
680
+ pattern: '\A\s*[\[{(^"''\w#]|[a-zA-Z_]\w*\s*:=\s*[a-zA-Z_]\w*|class\s*>>\s*[a-zA-Z_]\w*|^[a-zA-Z_]\w*\s+[a-zA-Z_]\w*:|^Class\s*\{|if(?:True|False):\s*\['
658
681
  - extensions: ['.star']
659
682
  rules:
660
683
  - language: STAR
@@ -663,11 +686,19 @@ disambiguations:
663
686
  - extensions: ['.stl']
664
687
  rules:
665
688
  - language: STL
666
- pattern: '\A\s*solid(?=$|\s)(?m:.*?)\Rendsolid(?:$|\s)'
689
+ pattern: '\A\s*solid(?=$|\s)(?:.|[\r\n])*?^endsolid(?:$|\s)'
690
+ - extensions: ['.sw']
691
+ rules:
692
+ - language: Sway
693
+ pattern: '^\s*(?:(?:abi|dep|fn|impl|mod|pub|trait)\s|#\[)'
694
+ - language: XML
695
+ pattern: '^\s*<\?xml\s+version'
667
696
  - extensions: ['.t']
668
697
  rules:
669
698
  - language: Perl
670
- named_pattern: perl5
699
+ and:
700
+ - negative_pattern: '^\s*use\s+v6\b'
701
+ - named_pattern: perl
671
702
  - language: Raku
672
703
  pattern: '^\s*(?:use\s+v6\b|\bmodule\b|\bmy\s+class\b)'
673
704
  - language: Turing
@@ -676,6 +707,10 @@ disambiguations:
676
707
  rules:
677
708
  - language: Java Server Pages
678
709
  pattern: '<%[@!=\s]?\s*(taglib|tag|include|attribute|variable)\s'
710
+ - extensions: ['.tlv']
711
+ rules:
712
+ - language: TL-Verilog
713
+ pattern: '^\\.{0,10}TLV_version'
679
714
  - extensions: ['.toc']
680
715
  rules:
681
716
  - language: World of Warcraft Addon Data
@@ -732,7 +767,7 @@ disambiguations:
732
767
  - extensions: ['.url']
733
768
  rules:
734
769
  - language: INI
735
- pattern: '^\[InternetShortcut\]\R(?>[^\s\[][^\n]*\R)*URL='
770
+ pattern: '^\[InternetShortcut\](?:\r?\n|\r)(?>[^\s\[][^\n]*(?:\r?\n|\r))*URL='
736
771
  - extensions: ['.v']
737
772
  rules:
738
773
  - language: Coq
@@ -757,7 +792,7 @@ disambiguations:
757
792
  - language: DirectX 3D File
758
793
  pattern: '^xof 030(2|3)(?:txt|bin|tzip|bzip)\b'
759
794
  - language: RPC
760
- pattern: '\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\('
795
+ pattern: '\b(program|version)\s+\w+\s*\{|\bunion\s+\w+\s+switch\s*\('
761
796
  - language: Logos
762
797
  pattern: '^%(end|ctor|hook|group)\b'
763
798
  - language: Linker Script
@@ -811,7 +846,29 @@ named_patterns:
811
846
  mdoc-heading: '^[.''][ \t]*Sh +(?:[^"\s]|"[^"]+")'
812
847
  mdoc-title: '^[.''][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)'
813
848
  objectivec: '^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])'
814
- perl5: '\buse\s+(?:strict\b|v?5\.)'
815
- perl6: '^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)'
816
- vb-class: '^\s*VERSION\s+[0-9]\.[0-9]\s+CLASS'
817
- vb-form: '^\s*VERSION\s+[0-9]\.[0-9]{2}'
849
+ perl:
850
+ - '\buse\s+(?:strict\b|v?5\b)'
851
+ - '^\s*use\s+(?:constant|overload)\b'
852
+ - '^\s*(?:\*|(?:our\s*)?@)EXPORT\s*='
853
+ - '^\s*package\s+[^\W\d]\w*(?:::\w+)*\s*(?:[;{]|\sv?\d)'
854
+ - '[\s$][^\W\d]\w*(?::\w+)*->[a-zA-Z_\[({]'
855
+ raku: '^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)'
856
+ vb-class: '^[ ]*VERSION [0-9]\.[0-9] CLASS'
857
+ vb-form: '^[ ]*VERSION [0-9]\.[0-9]{2}'
858
+ vb-module: '^[ ]*Attribute VB_Name = '
859
+ vba:
860
+ - '\b(?:VBA|[vV]ba)(?:\b|[0-9A-Z_])'
861
+ # VBA7 new 64-bit features
862
+ - '^[ ]*(?:Public|Private)? Declare PtrSafe (?:Sub|Function)\b'
863
+ - '^[ ]*#If Win64\b'
864
+ - '^[ ]*(?:Dim|Const) [0-9a-zA-Z_]*[ ]*As Long(?:Ptr|Long)\b'
865
+ # Top module declarations unique to VBA
866
+ - '^[ ]*Option (?:Private Module|Compare Database)\b'
867
+ # General VBA libraries and objects
868
+ - '(?: |\()(?:Access|Excel|Outlook|PowerPoint|Visio|Word|VBIDE)\.\w'
869
+ - '\b(?:(?:Active)?VBProjects?|VBComponents?|Application\.(?:VBE|ScreenUpdating))\b'
870
+ # AutoCAD, Outlook, PowerPoint and Word objects
871
+ - '\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Find|Paragraphs))\b'
872
+ # Excel objects
873
+ - '\b(?:(?:This|Active)?Workbooks?|Worksheets?|Active(?:Sheet|Chart|Cell)|WorksheetFunction)\b'
874
+ - '\b(?:Range\(".*|Cells\([0-9a-zA-Z_]*, (?:[0-9a-zA-Z_]*|"[a-zA-Z]{1,3}"))\)'