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.
- checksums.yaml +5 -5
- data/bin/github-linguist +17 -4
- data/grammars/annotation.liquidhaskell.haskell.json +58 -11
- data/grammars/etc.json +472 -4
- data/grammars/hidden.manref.json +29 -0
- data/grammars/hidden.regexp.injection-shell.json +28 -0
- data/grammars/hint.haskell.json +58 -11
- data/grammars/hint.message.haskell.json +58 -11
- data/grammars/hint.type.haskell.json +58 -11
- data/grammars/injections.etc.json +601 -1
- data/grammars/markdown.plantuml.codeblock.json +26 -0
- data/grammars/source.4dm.json +1156 -0
- data/grammars/source.abap.json +7 -7
- data/grammars/source.abl.json +685 -83
- data/grammars/source.abnf.json +23 -1
- data/grammars/source.agda.json +33 -203
- data/grammars/source.ahk.json +9 -5
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.ballerina.json +55 -19
- data/grammars/source.c++.json +4 -4
- data/grammars/source.c.platform.json +584 -33
- data/grammars/source.chapel.json +7 -4
- data/grammars/source.csound.json +1 -1
- data/grammars/source.css.json +3 -3
- data/grammars/source.css.scss.json +164 -15
- data/grammars/source.curlrc.json +869 -65
- data/grammars/source.d.json +2 -2
- data/grammars/source.dart.json +58 -32
- data/grammars/source.dircolors.json +137 -0
- data/grammars/source.direct-x.json +135 -0
- data/grammars/source.ebnf.json +67 -39
- data/grammars/source.editorconfig.json +23 -5
- data/grammars/source.elixir.json +51 -0
- data/grammars/source.elm.json +1 -1
- data/grammars/source.emacs.lisp.json +10 -0
- data/grammars/source.faust.json +119 -0
- data/grammars/source.futhark.json +146 -0
- data/grammars/source.gcode.json +166 -8
- data/grammars/source.gedcom.json +196 -0
- data/grammars/source.generic-db.json +41 -0
- data/grammars/source.gfm.blade.json +15 -0
- data/grammars/source.gfm.json +1697 -1439
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.hack.json +200 -98
- data/grammars/source.haskell.json +58 -11
- data/grammars/source.hlsl.json +9 -5
- data/grammars/source.hosts.json +40 -0
- data/grammars/source.hsig.json +58 -11
- data/grammars/source.httpspec.json +1 -1
- data/grammars/source.hx.json +9 -5
- data/grammars/source.hxml.json +2 -2
- data/grammars/source.idris.json +1 -1
- data/grammars/source.igor.json +46 -2
- data/grammars/source.ini.npmrc.json +311 -0
- data/grammars/source.inno.json +133 -0
- data/grammars/source.inputrc.json +500 -0
- data/grammars/source.isabelle.root.json +1 -1
- data/grammars/source.jison.json +3 -0
- data/grammars/source.jisonlex.json +3 -0
- data/grammars/source.js.json +4 -4
- data/grammars/source.julia.json +70 -24
- data/grammars/source.kotlin.json +17 -51
- data/grammars/source.lcov.json +398 -0
- data/grammars/source.lean.json +20 -4
- data/grammars/source.lean.markdown.json +2598 -0
- data/grammars/source.lex.json +4 -4
- data/grammars/source.m2.json +125 -0
- data/grammars/source.m4.json +141 -99
- data/grammars/source.man-conf.json +47 -35
- data/grammars/source.matlab.json +437 -184
- data/grammars/source.mcfunction-snapshot.json +21388 -561
- data/grammars/source.mcfunction.json +55 -5
- data/grammars/source.meson.json +1 -1
- data/grammars/source.mlir.json +37 -317
- data/grammars/source.modula-3.json +10 -0
- data/grammars/source.msl.json +755 -0
- data/grammars/source.nasl.json +155 -0
- data/grammars/source.neon.json +381 -0
- data/grammars/source.nextflow.json +2 -2
- data/grammars/source.objc.platform.json +493 -35
- data/grammars/source.odin-ehr.json +806 -0
- data/grammars/source.odin.json +402 -0
- data/grammars/source.openbsd-pkg.contents.json +128 -0
- data/grammars/source.opts.json +12 -2
- data/grammars/source.perl6fe.json +1 -1
- data/grammars/source.postscript.json +358 -103
- data/grammars/source.prisma.json +435 -0
- data/grammars/source.purescript.json +29 -2
- data/grammars/source.python.json +52 -0
- data/grammars/source.q.json +150 -63
- data/grammars/source.qasm.json +66 -0
- data/grammars/source.ql.json +1408 -0
- data/grammars/source.r.json +4 -4
- data/grammars/source.reason.json +28 -16
- data/grammars/source.rego.json +124 -0
- data/grammars/source.sass.json +158 -3
- data/grammars/source.scala.json +53 -18
- data/grammars/source.sieve.json +383 -0
- data/grammars/source.solidity.json +1 -1
- data/grammars/source.ssh-config.json +1 -14
- data/grammars/source.swift.json +162 -2
- data/grammars/source.sy.json +2088 -183
- data/grammars/source.tags.json +266 -0
- data/grammars/source.terraform.json +576 -132
- data/grammars/source.tnsaudit.json +256 -0
- data/grammars/source.ts.json +246 -70
- data/grammars/source.tsx.json +247 -71
- data/grammars/source.v.json +587 -761
- data/grammars/source.vim-snippet.json +645 -0
- data/grammars/source.viml.json +6 -6
- data/grammars/source.webassembly.json +10 -0
- data/grammars/source.webidl.json +8 -0
- data/grammars/source.wgetrc.json +1640 -0
- data/grammars/source.wsd.json +781 -0
- data/grammars/source.x86.json +7 -3
- data/grammars/source.zig.json +231 -360
- data/grammars/text.dfy.dafny.json +188 -0
- data/grammars/text.html.php.blade.json +535 -528
- data/grammars/text.html.riot.json +788 -0
- data/grammars/text.muse.json +1471 -0
- data/grammars/text.openbsd-pkg.desc.json +78 -0
- data/grammars/text.roff.json +49 -1
- data/grammars/text.sfd.json +21 -0
- data/grammars/text.tex.latex.haskell.json +58 -11
- data/grammars/text.vim-help.json +383 -0
- data/grammars/text.xml.svg.json +8 -2
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +4 -2
- data/lib/linguist/file_blob.rb +1 -1
- data/lib/linguist/generated.rb +96 -28
- data/lib/linguist/heuristics.yml +64 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +408 -49
- data/lib/linguist/lazy_blob.rb +10 -10
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +48129 -31562
- data/lib/linguist/shebang.rb +5 -3
- data/lib/linguist/vendor.yml +71 -60
- metadata +48 -17
- data/grammars/source.LS.json +0 -85
- data/grammars/source.MCPOST.json +0 -54
- data/grammars/source.MOD.json +0 -55
- data/grammars/source.apt.json +0 -18
- data/grammars/source.jlex.json +0 -322
- data/grammars/source.yaml-ext.json +0 -324
- data/grammars/text.html.abl.json +0 -70
data/grammars/text.xml.svg.json
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
},
|
51
51
|
"attrValueCSS": {
|
52
52
|
"begin": "(?i)(?\u003c=style)\\G\\s*(=)",
|
53
|
-
"end": "(?=\\s*(?:[%?/]?\u003e))|([
|
53
|
+
"end": "(?=\\s*(?:[%?/]?\u003e))|(?\u003c=[\"'])([^\\s\u003e]*)|(?:\\G|^)\\s*([^\\s\"'\u003e]+)",
|
54
54
|
"patterns": [
|
55
55
|
{
|
56
56
|
"match": "(?:\\G|^)\\s+(?!/?\u003e)"
|
@@ -129,6 +129,9 @@
|
|
129
129
|
},
|
130
130
|
"endCaptures": {
|
131
131
|
"1": {
|
132
|
+
"name": "invalid.illegal.syntax.xml.svg"
|
133
|
+
},
|
134
|
+
"2": {
|
132
135
|
"name": "string.unquoted.xml.svg",
|
133
136
|
"patterns": [
|
134
137
|
{
|
@@ -140,7 +143,7 @@
|
|
140
143
|
},
|
141
144
|
"attrValuePlain": {
|
142
145
|
"begin": "\\s*(=)",
|
143
|
-
"end": "(?=\\s*(?:[%?/]?\u003e))|([
|
146
|
+
"end": "(?=\\s*(?:[%?/]?\u003e))|(?\u003c=[\"'])([^\\s\u003e]*)|(?:\\G|^)\\s*([^\\s\"'\u003e]+)",
|
144
147
|
"patterns": [
|
145
148
|
{
|
146
149
|
"match": "(?:\\G|^)\\s+(?!/?\u003e)"
|
@@ -193,6 +196,9 @@
|
|
193
196
|
},
|
194
197
|
"endCaptures": {
|
195
198
|
"1": {
|
199
|
+
"name": "invalid.illegal.syntax.xml.svg"
|
200
|
+
},
|
201
|
+
"2": {
|
196
202
|
"name": "string.unquoted.xml.svg"
|
197
203
|
}
|
198
204
|
}
|
data/grammars/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.
|
1
|
+
7.10.0
|
data/lib/linguist/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.
|
1
|
+
7.10.0
|
data/lib/linguist/blob_helper.rb
CHANGED
@@ -270,8 +270,10 @@ module Linguist
|
|
270
270
|
# also--importantly--without having to duplicate many (potentially
|
271
271
|
# large) strings.
|
272
272
|
begin
|
273
|
-
|
274
|
-
|
273
|
+
# `data` is split after having its last `\n` removed by
|
274
|
+
# chomp (if any). This prevents the creation of an empty
|
275
|
+
# element after the final `\n` character on POSIX files.
|
276
|
+
data.chomp.split(encoded_newlines_re, -1)
|
275
277
|
rescue Encoding::ConverterNotFoundError
|
276
278
|
# The data is not splittable in the detected encoding. Assume it's
|
277
279
|
# one big line.
|
data/lib/linguist/file_blob.rb
CHANGED
data/lib/linguist/generated.rb
CHANGED
@@ -62,7 +62,9 @@ module Linguist
|
|
62
62
|
node_modules? ||
|
63
63
|
go_vendor? ||
|
64
64
|
go_lock? ||
|
65
|
+
esy_lock? ||
|
65
66
|
npm_shrinkwrap_or_package_lock? ||
|
67
|
+
generated_yarn_plugnplay? ||
|
66
68
|
godeps? ||
|
67
69
|
generated_by_zephir? ||
|
68
70
|
minified_files? ||
|
@@ -91,7 +93,11 @@ module Linguist
|
|
91
93
|
generated_grpc_cpp? ||
|
92
94
|
generated_dart? ||
|
93
95
|
generated_perl_ppport_header? ||
|
94
|
-
generated_gamemakerstudio?
|
96
|
+
generated_gamemakerstudio? ||
|
97
|
+
generated_gimp? ||
|
98
|
+
generated_visualstudio6? ||
|
99
|
+
generated_haxe? ||
|
100
|
+
generated_jooq?
|
95
101
|
end
|
96
102
|
|
97
103
|
# Internal: Is the blob an Xcode file?
|
@@ -118,7 +124,14 @@ module Linguist
|
|
118
124
|
!!name.match(/(^|\/)Carthage\/Build\//)
|
119
125
|
end
|
120
126
|
|
121
|
-
# Internal:
|
127
|
+
# Internal: Does extname indicate a filetype which is commonly minified?
|
128
|
+
#
|
129
|
+
# Returns true or false.
|
130
|
+
def maybe_minified?
|
131
|
+
['.js', '.css'].include? extname.downcase
|
132
|
+
end
|
133
|
+
|
134
|
+
# Internal: Is the blob a minified file?
|
122
135
|
#
|
123
136
|
# Consider a file minified if the average line length is
|
124
137
|
# greater then 110c.
|
@@ -127,32 +140,29 @@ module Linguist
|
|
127
140
|
#
|
128
141
|
# Returns true or false.
|
129
142
|
def minified_files?
|
130
|
-
|
131
|
-
if lines.any?
|
143
|
+
if maybe_minified? and lines.any?
|
132
144
|
(lines.inject(0) { |n, l| n += l.length } / lines.length) > 110
|
133
145
|
else
|
134
146
|
false
|
135
147
|
end
|
136
148
|
end
|
137
149
|
|
138
|
-
# Internal: Does the blob contain a source
|
150
|
+
# Internal: Does the blob contain a source-map reference?
|
139
151
|
#
|
140
|
-
# We assume that if one of the last 2 lines starts with a source
|
152
|
+
# We assume that if one of the last 2 lines starts with a source-map
|
141
153
|
# reference, then the current file was generated from other files.
|
142
154
|
#
|
143
155
|
# We use the last 2 lines because the last line might be empty.
|
144
156
|
#
|
145
|
-
# We only handle JavaScript, no CSS support yet.
|
146
|
-
#
|
147
157
|
# Returns true or false.
|
148
158
|
def has_source_map?
|
149
|
-
return false unless
|
150
|
-
lines.last(2).any? { |
|
159
|
+
return false unless maybe_minified?
|
160
|
+
lines.last(2).any? { |l| l.match(/^\/[*\/][\#@] source(?:Mapping)?URL|sourceURL=/) }
|
151
161
|
end
|
152
162
|
|
153
|
-
# Internal: Is the blob a generated source
|
163
|
+
# Internal: Is the blob a generated source-map?
|
154
164
|
#
|
155
|
-
# Source
|
165
|
+
# Source-maps usually have .css.map or .js.map extensions. In case they
|
156
166
|
# are not following the name convention, detect them based on the content.
|
157
167
|
#
|
158
168
|
# Returns true or false.
|
@@ -293,10 +303,10 @@ module Linguist
|
|
293
303
|
return false unless extname == '.go'
|
294
304
|
return false unless lines.count > 1
|
295
305
|
|
296
|
-
return lines
|
306
|
+
return lines.first(40).any? { |l| l.include? "Code generated by" }
|
297
307
|
end
|
298
308
|
|
299
|
-
PROTOBUF_EXTENSIONS = ['.py', '.java', '.h', '.cc', '.cpp', '.m', '.rb']
|
309
|
+
PROTOBUF_EXTENSIONS = ['.py', '.java', '.h', '.cc', '.cpp', '.m', '.rb', '.php']
|
300
310
|
|
301
311
|
# Internal: Is the blob a C++, Java or Python source file generated by the
|
302
312
|
# Protocol Buffer compiler?
|
@@ -306,7 +316,7 @@ module Linguist
|
|
306
316
|
return false unless PROTOBUF_EXTENSIONS.include?(extname)
|
307
317
|
return false unless lines.count > 1
|
308
318
|
|
309
|
-
return lines
|
319
|
+
return lines.first(3).any? { |l| l.include?("Generated by the protocol buffer compiler. DO NOT EDIT!") }
|
310
320
|
end
|
311
321
|
|
312
322
|
# Internal: Is the blob a Javascript source file generated by the
|
@@ -363,11 +373,25 @@ module Linguist
|
|
363
373
|
!!name.match(/(Gopkg|glide)\.lock/)
|
364
374
|
end
|
365
375
|
|
376
|
+
# Internal: Is the blob a generated esy lock file?
|
377
|
+
#
|
378
|
+
# Returns true or false.
|
379
|
+
def esy_lock?
|
380
|
+
!!name.match(/(^|\/)(\w+\.)?esy.lock$/)
|
381
|
+
end
|
382
|
+
|
366
383
|
# Internal: Is the blob a generated npm shrinkwrap or package lock file?
|
367
384
|
#
|
368
385
|
# Returns true or false.
|
369
386
|
def npm_shrinkwrap_or_package_lock?
|
370
|
-
name.match(/npm-shrinkwrap\.json/) || name.match(/package-lock\.json/)
|
387
|
+
!!name.match(/npm-shrinkwrap\.json/) || !!name.match(/package-lock\.json/)
|
388
|
+
end
|
389
|
+
|
390
|
+
# Internal: Is the blob a generated Yarn Plug'n'Play?
|
391
|
+
#
|
392
|
+
# Returns true or false.
|
393
|
+
def generated_yarn_plugnplay?
|
394
|
+
!!name.match(/(^|\/)\.pnp\.(c|m)?js$/)
|
371
395
|
end
|
372
396
|
|
373
397
|
# Internal: Is the blob part of Godeps/,
|
@@ -426,7 +450,7 @@ module Linguist
|
|
426
450
|
#
|
427
451
|
# Returns true or false.
|
428
452
|
def pipenv_lock?
|
429
|
-
name.match(/Pipfile\.lock/)
|
453
|
+
!!name.match(/Pipfile\.lock/)
|
430
454
|
end
|
431
455
|
|
432
456
|
# Internal: Is it a KiCAD or GFortran module file?
|
@@ -591,6 +615,38 @@ module Linguist
|
|
591
615
|
lines[0] =~ /^\d\.\d\.\d.+\|\{/
|
592
616
|
end
|
593
617
|
|
618
|
+
# Internal: Is this a generated GIMP C image file?
|
619
|
+
#
|
620
|
+
# GIMP saves C sources with one of two comment forms:
|
621
|
+
# * `/* GIMP RGB C-Source image dump (<filename>.c) */` (C source export)
|
622
|
+
# * `/* GIMP header image file format (RGB): <filename>.h */` (Header export)
|
623
|
+
#
|
624
|
+
# Return true or false
|
625
|
+
def generated_gimp?
|
626
|
+
return false unless ['.c', '.h'].include? extname
|
627
|
+
return false unless lines.count > 0
|
628
|
+
return lines[0].match(/\/\* GIMP [a-zA-Z0-9\- ]+ C\-Source image dump \(.+?\.c\) \*\//) ||
|
629
|
+
lines[0].match(/\/\* GIMP header image file format \([a-zA-Z0-9\- ]+\)\: .+?\.h \*\//)
|
630
|
+
end
|
631
|
+
|
632
|
+
# Internal: Is this a generated Microsoft Visual Studio 6.0 build file?
|
633
|
+
#
|
634
|
+
# Return true or false
|
635
|
+
def generated_visualstudio6?
|
636
|
+
return false unless extname.downcase == '.dsp'
|
637
|
+
lines.first(3).any? { |l| l.include? '# Microsoft Developer Studio Generated Build File' }
|
638
|
+
end
|
639
|
+
|
640
|
+
HAXE_EXTENSIONS = ['.js', '.py', '.lua', '.cpp', '.h', '.java', '.cs', '.php']
|
641
|
+
|
642
|
+
# Internal: Is this a generated Haxe-generated source file?
|
643
|
+
#
|
644
|
+
# Return true or false
|
645
|
+
def generated_haxe?
|
646
|
+
return false unless HAXE_EXTENSIONS.include?(extname)
|
647
|
+
return lines.first(3).any? { |l| l.include?("Generated by Haxe") }
|
648
|
+
end
|
649
|
+
|
594
650
|
# Internal: Is this a generated HTML file?
|
595
651
|
#
|
596
652
|
# HTML documents generated by authoring tools often include a
|
@@ -621,23 +677,35 @@ module Linguist
|
|
621
677
|
return false if matches.empty?
|
622
678
|
return matches.map {|x| extract_html_meta(x) }.any? do |attr|
|
623
679
|
attr["name"].to_s.downcase == 'generator' &&
|
624
|
-
attr["content"].
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
680
|
+
[attr["content"], attr["value"]].any? do |cv|
|
681
|
+
!cv.nil? &&
|
682
|
+
cv.match(/^
|
683
|
+
( org \s+ mode
|
684
|
+
| j?latex2html
|
685
|
+
| groff
|
686
|
+
| makeinfo
|
687
|
+
| texi2html
|
688
|
+
| ronn
|
689
|
+
) \b
|
690
|
+
/ix)
|
691
|
+
end
|
632
692
|
end
|
633
693
|
end
|
634
694
|
|
695
|
+
# Internal: Is this a generated jOOQ file?
|
696
|
+
#
|
697
|
+
# Return true or false
|
698
|
+
def generated_jooq?
|
699
|
+
return false unless extname.downcase == '.java'
|
700
|
+
lines.first(2).any? { |l| l.include? 'This file is generated by jOOQ.' }
|
701
|
+
end
|
702
|
+
|
635
703
|
# Internal: Extract a Hash of name/content pairs from an HTML <meta> tag
|
636
704
|
def extract_html_meta(match)
|
637
705
|
(match.last.sub(/\/\Z/, "").strip.scan(/
|
638
|
-
(?<=^|\s)
|
639
|
-
(name|content) # Attribute names we're interested in
|
640
|
-
\s* = \s*
|
706
|
+
(?<=^|\s) # Check for preceding whitespace
|
707
|
+
(name|content|value) # Attribute names we're interested in
|
708
|
+
\s* = \s* # Key-value separator
|
641
709
|
|
642
710
|
# Attribute value
|
643
711
|
( "[^"]+" # name="value"
|
data/lib/linguist/heuristics.yml
CHANGED
@@ -58,6 +58,10 @@ disambiguations:
|
|
58
58
|
pattern: '^[=-]+(\s|\n)|{{[A-Za-z]'
|
59
59
|
- language: AGS Script
|
60
60
|
pattern: '^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])'
|
61
|
+
- extensions: ['.asm']
|
62
|
+
rules:
|
63
|
+
- language: Motorola 68K Assembly
|
64
|
+
named_pattern: m68k
|
61
65
|
- extensions: ['.asy']
|
62
66
|
rules:
|
63
67
|
- language: LTspice Symbol
|
@@ -113,6 +117,12 @@ disambiguations:
|
|
113
117
|
# : dependency
|
114
118
|
# path/file.ext1 : some/path/../file.ext2
|
115
119
|
pattern: '([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)'
|
120
|
+
- extensions: ['.dsp']
|
121
|
+
rules:
|
122
|
+
- language: Microsoft Developer Studio Project
|
123
|
+
pattern: '# Microsoft Developer Studio Generated Build File'
|
124
|
+
- language: Faust
|
125
|
+
pattern: '\bprocess\s*[(=]|\b(library|import)\s*\(\s*"|\bdeclare\s+(name|version|author|copyright|license)\s+"'
|
116
126
|
- extensions: ['.ecl']
|
117
127
|
rules:
|
118
128
|
- language: ECLiPSe
|
@@ -173,6 +183,8 @@ disambiguations:
|
|
173
183
|
- language: Game Maker Language
|
174
184
|
- extensions: ['.gs']
|
175
185
|
rules:
|
186
|
+
- language: GLSL
|
187
|
+
pattern: '^#version\s+[0-9]+\b'
|
176
188
|
- language: Gosu
|
177
189
|
pattern: '^uses java\.'
|
178
190
|
- extensions: ['.h']
|
@@ -185,6 +197,12 @@ disambiguations:
|
|
185
197
|
rules:
|
186
198
|
- language: Hack
|
187
199
|
pattern: '<\?hh'
|
200
|
+
- extensions: ['.i']
|
201
|
+
rules:
|
202
|
+
- language: Motorola 68K Assembly
|
203
|
+
named_pattern: m68k
|
204
|
+
- language: SWIG
|
205
|
+
pattern: '^[ \t]*%[a-z_]+\b|^%[{}]$'
|
188
206
|
- extensions: ['.ice']
|
189
207
|
rules:
|
190
208
|
- language: JSON
|
@@ -192,10 +210,19 @@ disambiguations:
|
|
192
210
|
- language: Slice
|
193
211
|
- extensions: ['.inc']
|
194
212
|
rules:
|
213
|
+
- language: Motorola 68K Assembly
|
214
|
+
named_pattern: m68k
|
195
215
|
- language: PHP
|
196
216
|
pattern: '^<\?(?:php)?'
|
197
217
|
- language: SourcePawn
|
198
218
|
pattern: '^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*{)?)'
|
219
|
+
- language: NASL
|
220
|
+
pattern:
|
221
|
+
- '^\s*include\s*\(\s*(?:"|'')[\\/\w\-\.:\s]+\.(?:nasl|inc)\s*(?:"|'')\s*\)\s*;'
|
222
|
+
- '^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"'']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"'']+)?\s*)*+\s*;'
|
223
|
+
- '^\s*namespace\s+\w+\s*{'
|
224
|
+
- '^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*{'
|
225
|
+
- '^\s*(?:public\s+|private\s+|\s*)function\s+\w+\s*\([\w\s,]*\)\s*{'
|
199
226
|
- language: POV-Ray SDL
|
200
227
|
pattern: '^\s*#(declare|local|macro|while)\s'
|
201
228
|
- extensions: ['.l']
|
@@ -237,6 +264,10 @@ disambiguations:
|
|
237
264
|
pattern: '^\s*%'
|
238
265
|
- language: Limbo
|
239
266
|
pattern: '^\w+\s*:\s*module\s*{'
|
267
|
+
- extensions: ['.mask']
|
268
|
+
rules:
|
269
|
+
- language: Unity3d Asset
|
270
|
+
pattern: 'tag:unity3d.com'
|
240
271
|
- extensions: ['.md']
|
241
272
|
rules:
|
242
273
|
- language: Markdown
|
@@ -285,6 +316,19 @@ disambiguations:
|
|
285
316
|
- language: NL
|
286
317
|
pattern: '^(b|g)[0-9]+ '
|
287
318
|
- language: NewLisp
|
319
|
+
- extensions: ['.odin']
|
320
|
+
rules:
|
321
|
+
- language: Object Data Instance Notation
|
322
|
+
pattern: '(?:^|<)\s*[A-Za-z0-9_]+\s*=\s*<'
|
323
|
+
- language: Odin
|
324
|
+
pattern: 'package\s+\w+|\b(?:im|ex)port\s*"[\w:./]+"|\w+\s*::\s*(?:proc|struct)\s*\(|^\s*//\s'
|
325
|
+
- extensions: ['.p']
|
326
|
+
rules:
|
327
|
+
- language: Gnuplot
|
328
|
+
pattern:
|
329
|
+
- '^s?plot\b'
|
330
|
+
- '^set\s+(term|terminal|out|output|[xy]tics|[xy]label|[xy]range|style)\b'
|
331
|
+
- language: OpenEdge ABL
|
288
332
|
- extensions: ['.php']
|
289
333
|
rules:
|
290
334
|
- language: Hack
|
@@ -297,7 +341,7 @@ disambiguations:
|
|
297
341
|
pattern: '^[^#]*:-'
|
298
342
|
- language: Perl
|
299
343
|
named_pattern: perl5
|
300
|
-
- language:
|
344
|
+
- language: Raku
|
301
345
|
named_pattern: perl6
|
302
346
|
- extensions: ['.plist']
|
303
347
|
rules:
|
@@ -308,7 +352,7 @@ disambiguations:
|
|
308
352
|
rules:
|
309
353
|
- language: Perl
|
310
354
|
named_pattern: perl5
|
311
|
-
- language:
|
355
|
+
- language: Raku
|
312
356
|
named_pattern: perl6
|
313
357
|
- language: X PixMap
|
314
358
|
pattern: '^\s*\/\* XPM \*\/'
|
@@ -325,6 +369,8 @@ disambiguations:
|
|
325
369
|
pattern: '^\s+\w+\s+=>\s'
|
326
370
|
- extensions: ['.pro']
|
327
371
|
rules:
|
372
|
+
- language: Proguard
|
373
|
+
pattern: '^-(include\b.*\.pro$|keep\b|keepclassmembers\b|keepattributes\b)'
|
328
374
|
- language: Prolog
|
329
375
|
pattern: '^[^\[#]+:-'
|
330
376
|
- language: INI
|
@@ -384,6 +430,10 @@ disambiguations:
|
|
384
430
|
pattern: '^(use |fn |mod |pub |macro_rules|impl|#!?\[)'
|
385
431
|
- language: RenderScript
|
386
432
|
pattern: '#include|#pragma\s+(rs|version)|__attribute__'
|
433
|
+
- extensions: ['.s']
|
434
|
+
rules:
|
435
|
+
- language: Motorola 68K Assembly
|
436
|
+
named_pattern: m68k
|
387
437
|
- extensions: ['.sc']
|
388
438
|
rules:
|
389
439
|
- language: SuperCollider
|
@@ -417,7 +467,7 @@ disambiguations:
|
|
417
467
|
rules:
|
418
468
|
- language: Perl
|
419
469
|
named_pattern: perl5
|
420
|
-
- language:
|
470
|
+
- language: Raku
|
421
471
|
named_pattern: perl6
|
422
472
|
- language: Turing
|
423
473
|
pattern: '^\s*%[ \t]+|^\s*var\s+\w+(\s*:\s*\w+)?\s*:=\s*\w+'
|
@@ -456,7 +506,7 @@ disambiguations:
|
|
456
506
|
rules:
|
457
507
|
- language: Vim script
|
458
508
|
pattern: '^UseVimball'
|
459
|
-
- language:
|
509
|
+
- language: VBA
|
460
510
|
- extensions: ['.w']
|
461
511
|
rules:
|
462
512
|
- language: OpenEdge ABL
|
@@ -465,6 +515,8 @@ disambiguations:
|
|
465
515
|
pattern: '^@(<|\w+\.)'
|
466
516
|
- extensions: ['.x']
|
467
517
|
rules:
|
518
|
+
- language: DirectX 3D File
|
519
|
+
pattern: '^xof 030(2|3)(?:txt|bin|tzip|bzip)\b'
|
468
520
|
- language: RPC
|
469
521
|
pattern: '\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\('
|
470
522
|
- language: Logos
|
@@ -487,6 +539,14 @@ named_patterns:
|
|
487
539
|
- 'std::\w+'
|
488
540
|
fortran: '^(?i:[c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)'
|
489
541
|
key_equals_value: '^[^#!;][^=]*='
|
542
|
+
m68k:
|
543
|
+
- '(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b'
|
544
|
+
- '(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+'
|
545
|
+
- '(?im)^\s*move\.[bwl]\s+.*\b[ad]\d'
|
546
|
+
- '(?im)^\s*movem\.[bwl]\b'
|
547
|
+
- '(?im)^\s*move[mp](?:\.[wl])?\b'
|
548
|
+
- '(?im)^\s*btst\b'
|
549
|
+
- '(?im)^\s*dbra\b'
|
490
550
|
objectivec: '^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])'
|
491
551
|
perl5: '\buse\s+(?:strict\b|v?5\.)'
|
492
552
|
perl6: '^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)'
|