github-linguist 7.25.0 → 7.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) 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/inline.graphql.scala.json +1 -0
  6. data/grammars/markdown.curry.codeblock.json +1 -1
  7. data/grammars/markdown.talon.codeblock.json +1 -0
  8. data/grammars/source.abap.json +1 -1
  9. data/grammars/source.abl.json +1 -1
  10. data/grammars/source.acucobol.json +1 -1
  11. data/grammars/source.apex.json +1 -0
  12. data/grammars/source.astro.json +1 -1
  13. data/grammars/source.bicep.json +1 -1
  14. data/grammars/source.brs.json +1 -1
  15. data/grammars/source.bsl.json +1 -1
  16. data/grammars/source.cds.json +1 -1
  17. data/grammars/source.clar.json +1 -1
  18. data/grammars/source.cobol.json +1 -1
  19. data/grammars/source.cs.json +1 -1
  20. data/grammars/source.d2.json +1 -0
  21. data/grammars/source.dart.json +1 -1
  22. data/grammars/source.denizenscript.json +1 -1
  23. data/grammars/source.did.json +1 -0
  24. data/grammars/source.dm.json +1 -1
  25. data/grammars/source.fsharp.json +1 -1
  26. data/grammars/source.gfm.blade.json +1 -1
  27. data/grammars/source.gleam.json +1 -1
  28. data/grammars/source.kotlin.json +1 -1
  29. data/grammars/source.lolcode.json +1 -0
  30. data/grammars/source.matlab.json +1 -1
  31. data/grammars/source.mdx.json +1 -0
  32. data/grammars/source.mo.json +1 -1
  33. data/grammars/source.move.json +1 -1
  34. data/grammars/source.nasal.json +1 -0
  35. data/grammars/source.nim.json +1 -1
  36. data/grammars/source.nushell.json +1 -0
  37. data/grammars/source.pact.json +1 -0
  38. data/grammars/source.pddl.json +1 -1
  39. data/grammars/source.pnlgrp.json +1 -1
  40. data/grammars/source.rascal.json +1 -1
  41. data/grammars/source.rbs.json +1 -0
  42. data/grammars/source.rescript.json +1 -1
  43. data/grammars/source.rmcobol.json +1 -0
  44. data/grammars/source.rpgle.json +1 -1
  45. data/grammars/source.scenic.json +1 -1
  46. data/grammars/source.smithy.json +1 -1
  47. data/grammars/source.soql.json +1 -0
  48. data/grammars/source.talon.json +1 -1
  49. data/grammars/source.tlverilog.json +1 -0
  50. data/grammars/source.toc.json +1 -1
  51. data/grammars/source.ts.json +1 -1
  52. data/grammars/source.tsx.json +1 -1
  53. data/grammars/source.turtle.json +1 -1
  54. data/grammars/source.vba.json +1 -0
  55. data/grammars/source.wgsl.json +1 -0
  56. data/grammars/source.wit.json +1 -0
  57. data/grammars/source.wwb.json +1 -0
  58. data/grammars/text.adblock.json +1 -1
  59. data/grammars/text.haml.json +1 -1
  60. data/grammars/text.html.markdown.d2.json +1 -0
  61. data/grammars/text.marko.json +1 -1
  62. data/grammars/text.md.json +1 -0
  63. data/grammars/text.pseudoxml.json +1 -0
  64. data/grammars/version +1 -1
  65. data/lib/linguist/VERSION +1 -1
  66. data/lib/linguist/heuristics.yml +68 -36
  67. data/lib/linguist/languages.json +1 -1
  68. data/lib/linguist/languages.yml +140 -19
  69. data/lib/linguist/samples.json +1 -1
  70. data/lib/linguist/vendor.yml +4 -1
  71. metadata +27 -8
  72. data/grammars/source.gfm.json +0 -1
  73. data/grammars/source.nim_filter.json +0 -1
@@ -0,0 +1 @@
1
+ {"name":"Docutils pseudo-XML","scopeName":"text.pseudoxml","patterns":[{"include":"#main"}],"repository":{"attr":{"patterns":[{"include":"#attr-quoted"},{"include":"#attr-unquoted"},{"include":"#attr-boolean"}]},"attr-boolean":{"name":"meta.attribute.without-value.pseudoxml","match":"(?:\\G|^|(?\u003c=\\s))([^\\s\u003c\u003e\"'=]+)(?=\\s*\u003e|\\s+[^\\s\u003c\u003e=])","captures":{"1":{"name":"entity.other.attribute-name.pseudoxml"}}},"attr-quoted":{"name":"meta.attribute.with-value.quoted.pseudoxml","begin":"(?:\\G|^|(?\u003c=\\s))([^\\s\u003c\u003e\"'=]+)\\s*(=)\\s*(?=\"|')","end":"(?!\\G)","patterns":[{"include":"#str"}],"beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudoxml"},"2":{"patterns":[{"include":"#punct"}]}}},"attr-unquoted":{"name":"meta.attribute.with-value.unquoted.pseudoxml","contentName":"string.unquoted.pseudoxml","begin":"(?:\\G|^|(?\u003c=\\s))([^\\s\u003c\u003e\"'=]+)\\s*(=)\\s*(?=[^\\s\"'\u003c\u003e])","end":"(?=\\s\"'\u003c\u003e)","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudoxml"},"2":{"patterns":[{"include":"#punct"}]}}},"comment":{"name":"comment.block.pseudoxml","begin":"^[ \\t]*(\u003c!--)","end":"--\u003e","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.pseudoxml"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.pseudoxml"}}},"error":{"contentName":"invalid.illegal.message.error.pseudoxml","begin":"^[ \\t]+(?=[^\\s\u003c])","end":"$"},"esc-codepoint":{"patterns":[{"name":"constant.character.entity.2-digit.hexadecimal.hex.pseudoxml","match":"(\\\\)x([A-Fa-f0-9]{2})","captures":{"1":{"patterns":[{"include":"#punct"}]}}},{"name":"constant.character.entity.4-digit.hexadecimal.hex.pseudoxml","match":"(\\\\)u[A-Fa-f0-9]{4}","captures":{"1":{"patterns":[{"include":"#punct"}]}}},{"name":"constant.character.entity.8-digit.hexadecimal.hex.pseudoxml","match":"(\\\\)U[A-Fa-f0-9]{8}","captures":{"1":{"patterns":[{"include":"#punct"}]}}},{"name":"constant.character.entity.octal.oct.pseudoxml","match":"(\\\\)[0-7]{1,3}","captures":{"1":{"patterns":[{"include":"#punct"}]}}}]},"esc-named":{"name":"constant.character.named.escape.pseudoxml","match":"(\\\\)[\\\\abfnrtv]","captures":{"1":{"patterns":[{"include":"#punct"}]}}},"esc-quote":{"patterns":[{"include":"#esc-quote-double"},{"include":"#esc-quote-single"}]},"esc-quote-double":{"name":"constant.character.quote.escape.double.pseudoxml","match":"(\\\\)\"","captures":{"1":{"patterns":[{"include":"#punct"}]}}},"esc-quote-single":{"name":"constant.character.quote.escape.single.pseudoxml","match":"(\\\\)'","captures":{"1":{"patterns":[{"include":"#punct"}]}}},"main":{"patterns":[{"include":"#node"},{"include":"#text"},{"include":"#comment"}]},"node":{"patterns":[{"include":"#node-comment"},{"include":"#node-sysmsg"},{"include":"#node-strong"},{"include":"#node-emphasis"},{"include":"#node-literal"},{"include":"#node-problematic"},{"include":"#node-other"}]},"node-comment":{"name":"meta.element.node.comment.pseudoxml","contentName":"comment.block.element.pseudoxml","begin":"^([ \\t]*)((\u003c)(comment)(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"patterns":[{"include":"#attr"}]},"6":{"patterns":[{"include":"#punct"}]}}},"node-emphasis":{"name":"meta.element.node.emphasis.pseudoxml","contentName":"markup.italic.emphasis.pseudoxml","begin":"(?i)^([ \\t]*)((\u003c)(emphasis)(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"patterns":[{"include":"#attr"}]},"6":{"patterns":[{"include":"#punct"}]}}},"node-literal":{"name":"meta.element.node.monospaced-text.pseudoxml","contentName":"markup.raw.monospace.literal.pseudoxml","begin":"(?i)^([ \\t]*)((\u003c)(literal(?:_block)?)(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"patterns":[{"include":"#attr"}]},"6":{"patterns":[{"include":"#punct"}]}}},"node-other":{"name":"meta.element.node.${4:/downcase}.pseudoxml","begin":"^([ \\t]*)((\u003c)([-\\w:]+)(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"patterns":[{"include":"#attr"}]},"6":{"patterns":[{"include":"#punct"}]}}},"node-problematic":{"name":"meta.element.node.problematic.error.pseudoxml","contentName":"message.error.invalid.pseudoxml","begin":"^([ \\t]*)((\u003c)((problematic))(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#error"},{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"name":"sublimelinter.mark.error.invalid"},"6":{"patterns":[{"include":"#attr"}]},"7":{"patterns":[{"include":"#punct"}]}}},"node-strong":{"name":"meta.element.node.strong.pseudoxml","contentName":"markup.bold.emphasis.strong.pseudoxml","begin":"(?i)^([ \\t]*)((\u003c)(strong)(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"patterns":[{"include":"#attr"}]},"6":{"patterns":[{"include":"#punct"}]}}},"node-sysmsg":{"patterns":[{"include":"#node-sysmsg-error"},{"include":"#node-sysmsg-warning"}]},"node-sysmsg-error":{"name":"meta.element.node.system-message.error.pseudoxml","begin":"(?ix)^([ \\t]*)((\u003c)((system_message))(?=\n\t\\s+ [^\u003c\u003e]*? (?\u003c=\\s)\n\t(?: level \\s* = \\s* (\"|'|\\b) (?:[3-9]|[1-9]+[0-9]+) \\6\n\t| type \\s* = \\s* (\"|'|\\b) (?:ERROR|SEVERE) \\7\n\t)\n) (\\s+[^\u003c\u003e]+) \\s* (\u003e)) [ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"name":"meta.element.node.paragraph.error-message.pseudoxml","contentName":"message.error.invalid.pseudoxml","begin":"^([ \\t]+)((\u003c)(paragraph)(\\s+[^\u003c\u003e]+)?\\s*(\u003e))[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#error"},{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"patterns":[{"include":"#attr"}]},"6":{"patterns":[{"include":"#punct"}]}}},{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"name":"sublimelinter.mark.error.invalid"},"8":{"patterns":[{"include":"#attr"}]},"9":{"patterns":[{"include":"#punct"}]}}},"node-sysmsg-warning":{"name":"meta.element.node.system-message.warning.pseudoxml","contentName":"sublimelinter.mark.warning.invalid","begin":"(?ix)^([ \\t]*)((\u003c)((system_message))(?=\n\t\\s+ [^\u003c\u003e]*? (?\u003c=\\s)\n\t(?: level \\s* = \\s* (\"|'|\\b) 2 \\6\n\t| type \\s* = \\s* (\"|'|\\b) WARNING \\7\n\t)\n) (\\s+[^\u003c\u003e]+) \\s* (\u003e)) [ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"include":"#main"}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"entity.name.tag.node.pseudoxml"},"5":{"name":"sublimelinter.mark.warning.invalid"},"8":{"patterns":[{"include":"#attr"}]},"9":{"patterns":[{"include":"#punct"}]}}},"punct":{"patterns":[{"name":"punctuation.definition.escape.backslash.pseudoxml","match":"\\\\"},{"name":"punctuation.definition.tag.begin.pseudoxml","match":"\u003c","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"punctuation.definition.tag.end.pseudoxml","match":"\u003e","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"keyword.operator.assignment.attribute.pseudoxml","match":"=","captures":{"0":{"name":"punctuation.separator.key-value.pseudoxml"}}}]},"str":{"patterns":[{"include":"#str-double"},{"include":"#str-single"}]},"str-double":{"name":"string.quoted.double.pseudoxml","begin":"\\G\"","end":"(\")|([^\u003c\u003e\"]*+)(?=\u003e|$)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.pseudoxml"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.pseudoxml"},"2":{"name":"invalid.illegal.unclosed.string.pseudoxml"}}},"str-single":{"name":"string.quoted.single.pseudoxml","begin":"\\G'","end":"(')|([^\u003c\u003e']*+)(?=\u003e|$)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.pseudoxml"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.pseudoxml"},"2":{"name":"invalid.illegal.unclosed.string.pseudoxml"}}},"text":{"name":"meta.text.node.pseudoxml","begin":"^([ \\t]*)((\u003c)(#text))(\u003e)[ \\t]*$","end":"^(?!\\s*$|\\1(?:\\t+| {2,})\\S)","patterns":[{"name":"meta.text.fragment.pseudoxml","begin":"^[ \\t]+(?='|\")","end":"(?!\\G)","patterns":[{"include":"#str"}]}],"beginCaptures":{"2":{"name":"meta.tag.pseudoxml"},"3":{"patterns":[{"include":"#punct"}]},"4":{"name":"markup.list.strings.pseudoxml"},"5":{"patterns":[{"include":"#punct"}]}}}},"injections":{"meta.text.fragment.pseudoxml string.quoted":{"patterns":[{"include":"#esc-codepoint"},{"include":"#esc-named"}]},"meta.text.fragment.pseudoxml string.quoted.double":{"patterns":[{"include":"#esc-quote-double"}]},"meta.text.fragment.pseudoxml string.quoted.single":{"patterns":[{"include":"#esc-quote-single"}]}}}
data/grammars/version CHANGED
@@ -1 +1 @@
1
- 7.25.0
1
+ 7.26.0
data/lib/linguist/VERSION CHANGED
@@ -1 +1 @@
1
- 7.25.0
1
+ 7.26.0
@@ -64,17 +64,17 @@ disambiguations:
64
64
  - extensions: ['.app']
65
65
  rules:
66
66
  - language: Erlang
67
- pattern: '(?m)^{\s*(?:application|''application'')\s*,\s*(?:[a-z]+[\w@]*|''[^'']+'')\s*,\s*\[.*?\]\s*}\.[ \t]*$'
67
+ pattern: '^\{\s*(?:application|''application'')\s*,\s*(?:[a-z]+[\w@]*|''[^'']+'')\s*,\s*\[(?:.|[\r\n])*\]\s*\}\.[ \t]*$'
68
68
  - extensions: ['.as']
69
69
  rules:
70
70
  - language: ActionScript
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*)*)?\)))'
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*)*)?\)))'
72
72
  - extensions: ['.asc']
73
73
  rules:
74
74
  - language: Public Key
75
75
  pattern: '^(----[- ]BEGIN|ssh-(rsa|dss)) '
76
76
  - language: AsciiDoc
77
- pattern: '^[=-]+(\s|\n)|{{[A-Za-z]'
77
+ pattern: '^[=-]+(\s|\n)|\{\{[A-Za-z]'
78
78
  - language: AGS Script
79
79
  pattern: '^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])'
80
80
  - extensions: ['.asm']
@@ -89,9 +89,15 @@ disambiguations:
89
89
  - extensions: ['.bas']
90
90
  rules:
91
91
  - language: FreeBasic
92
- 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)'
93
93
  - language: BASIC
94
- pattern: '^\A\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
95
101
  - extensions: ['.bb']
96
102
  rules:
97
103
  - language: BlitzBasic
@@ -113,7 +119,7 @@ disambiguations:
113
119
  - extensions: ['.bi']
114
120
  rules:
115
121
  - language: FreeBasic
116
- 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)'
117
123
  - extensions: ['.bs']
118
124
  rules:
119
125
  - language: Bikeshed
@@ -145,11 +151,11 @@ disambiguations:
145
151
  - language: Visual Basic 6.0
146
152
  and:
147
153
  - named_pattern: vb-class
148
- - 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*='
149
155
  - language: VBA
150
- named_pattern: vb-class
156
+ named_pattern: vb-class
151
157
  - language: TeX
152
- pattern: '^\s*\\(?:NeedsTeXFormat|ProvidesClass){'
158
+ pattern: '^\s*\\(?:NeedsTeXFormat|ProvidesClass)\{'
153
159
  - language: ObjectScript
154
160
  pattern: '^Class\s'
155
161
  - extensions: ['.cmp']
@@ -161,7 +167,7 @@ disambiguations:
161
167
  - language: Smalltalk
162
168
  pattern: '![\w\s]+methodsFor: '
163
169
  - language: 'C#'
164
- 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*(\{|;)|\/\/)'
165
171
  - extensions: ['.csc']
166
172
  rules:
167
173
  - language: GSC
@@ -169,7 +175,7 @@ disambiguations:
169
175
  - extensions: ['.csl']
170
176
  rules:
171
177
  - language: XML
172
- pattern: '(?i:^\s*(\<\?xml|xmlns))'
178
+ pattern: '(?i:^\s*(<\?xml|xmlns))'
173
179
  - language: Kusto
174
180
  pattern: '(^\|\s*(where|extend|project|limit|summarize))|(^\.\w+)'
175
181
  - extensions: ['.d']
@@ -177,10 +183,10 @@ disambiguations:
177
183
  - language: D
178
184
  # see http://dlang.org/spec/grammar
179
185
  # ModuleDeclaration | ImportDeclaration | FuncDeclaration | unittest
180
- 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*\{[^}]*\}'
181
187
  - language: DTrace
182
188
  # see http://dtrace.org/guide/chp-prog.html, http://dtrace.org/guide/chp-profile.html, http://dtrace.org/guide/chp-opt.html
183
- 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)'
184
190
  - language: Makefile
185
191
  # path/target : dependency \
186
192
  # target : \
@@ -198,8 +204,8 @@ disambiguations:
198
204
  - language: E
199
205
  pattern:
200
206
  - '^\s*(def|var)\s+(.+):='
201
- - '^\s*(def|to)\s+(\w+)(\(.+\))?\s+{'
202
- - '^\s*(when)\s+(\(.+\))\s+->\s+{'
207
+ - '^\s*(def|to)\s+(\w+)(\(.+\))?\s+\{'
208
+ - '^\s*(when)\s+(\(.+\))\s+->\s+\{'
203
209
  - language: Eiffel
204
210
  pattern:
205
211
  - '^\s*\w+\s*(?:,\s*\w+)*[:]\s*\w+\s'
@@ -218,7 +224,7 @@ disambiguations:
218
224
  - language: Erlang
219
225
  pattern: '^\s*(?:%%|main\s*\(.*?\)\s*->)'
220
226
  - language: JavaScript
221
- pattern: '(?m:\/\/|("|'')use strict\1|export\s+default\s|\/\*.*?\*\/)'
227
+ pattern: '\/\/|("|'')use strict\1|export\s+default\s|\/\*(?:.|[\r\n])*?\*\/'
222
228
  - extensions: ['.ex']
223
229
  rules:
224
230
  - language: Elixir
@@ -254,11 +260,11 @@ disambiguations:
254
260
  - language: VBA
255
261
  and:
256
262
  - named_pattern: vb-form
257
- - pattern: '^\s*Begin\s+{[0-9A-Z\-]*}\s?'
263
+ - pattern: '^\s*Begin\s+\{[0-9A-Z\-]*\}\s?'
258
264
  - language: Visual Basic 6.0
259
265
  and:
260
266
  - named_pattern: vb-form
261
- - pattern: '^\s*Begin\s+VB\.Form\s+'
267
+ - pattern: '^\s*Begin\s+VB\.Form\s+'
262
268
  - extensions: ['.fs']
263
269
  rules:
264
270
  - language: Forth
@@ -272,7 +278,7 @@ disambiguations:
272
278
  - extensions: ['.ftl']
273
279
  rules:
274
280
  - language: FreeMarker
275
- 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\])'
276
282
  - language: Fluent
277
283
  pattern: '^-?[a-zA-Z][a-zA-Z0-9_-]* *=|\{\$-?[a-zA-Z][-\w]*(?:\.[a-zA-Z][-\w]*)?\}'
278
284
  - extensions: ['.g']
@@ -290,7 +296,7 @@ disambiguations:
290
296
  - extensions: ['.gml']
291
297
  rules:
292
298
  - language: XML
293
- pattern: '(?i:^\s*(\<\?xml|xmlns))'
299
+ pattern: '(?i:^\s*(<\?xml|xmlns))'
294
300
  - language: Graph Modeling Language
295
301
  pattern: '(?i:^\s*(graph|node)\s+\[$)'
296
302
  - language: Gerber Image
@@ -347,21 +353,21 @@ disambiguations:
347
353
  pattern: '^<\?(?:php)?'
348
354
  - language: SourcePawn
349
355
  pattern:
350
- - '^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*\{)?)'
351
357
  - '^methodmap\s+\w+\s+<\s+\w+'
352
358
  - '^\s*MarkNativeAsOptional\s*\('
353
359
  - language: NASL
354
360
  pattern:
355
361
  - '^\s*include\s*\(\s*(?:"|'')[\\/\w\-\.:\s]+\.(?:nasl|inc)\s*(?:"|'')\s*\)\s*;'
356
362
  - '^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"'']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"'']+)?\s*)*+\s*;'
357
- - '^\s*namespace\s+\w+\s*{'
358
- - '^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*{'
359
- - '^\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*\{'
360
366
  - language: POV-Ray SDL
361
367
  pattern: '^\s*#(declare|local|macro|while)\s'
362
368
  - language: Pascal
363
369
  pattern:
364
- - '(?i:^\s*{\$(?:mode|ifdef|undef|define)[ ]+[a-z0-9_]+})'
370
+ - '(?i:^\s*\{\$(?:mode|ifdef|undef|define)[ ]+[a-z0-9_]+\})'
365
371
  - '^\s*end[.;]\s*$'
366
372
  - extensions: ['.json']
367
373
  rules:
@@ -383,7 +389,7 @@ disambiguations:
383
389
  - extensions: ['.ls']
384
390
  rules:
385
391
  - language: LoomScript
386
- pattern: '^\s*package\s*[\w\.\/\*\s]*\s*{'
392
+ pattern: '^\s*package\s*[\w\.\/\*\s]*\s*\{'
387
393
  - language: LiveScript
388
394
  - extensions: ['.lsp', '.lisp']
389
395
  rules:
@@ -408,7 +414,7 @@ disambiguations:
408
414
  - language: MATLAB
409
415
  pattern: '^\s*%'
410
416
  - language: Limbo
411
- pattern: '^\w+\s*:\s*module\s*{'
417
+ pattern: '^\w+\s*:\s*module\s*\{'
412
418
  - extensions: ['.m4']
413
419
  rules:
414
420
  - language: M4Sugar
@@ -478,6 +484,11 @@ disambiguations:
478
484
  - language: NL
479
485
  pattern: '^(b|g)[0-9]+ '
480
486
  - language: NewLisp
487
+ - extensions: ['.nu']
488
+ rules:
489
+ - language: Nushell
490
+ pattern: '^\s*(import|export|module|def|let|let-env) '
491
+ - language: Nu
481
492
  - extensions: ['.odin']
482
493
  rules:
483
494
  - language: Object Data Instance Notation
@@ -568,7 +579,7 @@ disambiguations:
568
579
  - extensions: ['.q']
569
580
  rules:
570
581
  - language: q
571
- pattern: '((?i:[A-Z.][\w.]*:{)|(^|\n)\\(cd?|d|l|p|ts?) )'
582
+ pattern: '((?i:[A-Z.][\w.]*:\{)|(^|\n)\\(cd?|d|l|p|ts?) )'
572
583
  - language: HiveQL
573
584
  pattern: '(?i:SELECT\s+[\w*,]+\s+FROM|(CREATE|ALTER|DROP)\s(DATABASE|SCHEMA|TABLE))'
574
585
  - extensions: ['.qs']
@@ -589,7 +600,7 @@ disambiguations:
589
600
  pattern:
590
601
  - '^\s*module\s+type\s'
591
602
  - '^\s*(?:include|open)\s+\w+\s*;\s*$'
592
- - '^\s*let\s+(?:module\s\w+\s*=\s*{|\w+:\s+.*=.*;\s*$)'
603
+ - '^\s*let\s+(?:module\s\w+\s*=\s*\{|\w+:\s+.*=.*;\s*$)'
593
604
  - language: C++
594
605
  pattern:
595
606
  - '^\s*#(?:(?:if|ifdef|define|pragma)\s+\w|\s*include\s+<[^>]+>)'
@@ -609,7 +620,7 @@ disambiguations:
609
620
  - extensions: ['.rpy']
610
621
  rules:
611
622
  - language: Python
612
- pattern: '(?m:^(import|from|class|def)\s)'
623
+ pattern: '^(import|from|class|def)\s'
613
624
  - language: "Ren'Py"
614
625
  - extensions: ['.rs']
615
626
  rules:
@@ -666,7 +677,7 @@ disambiguations:
666
677
  - language: StringTemplate
667
678
  pattern: '\$\w+[($]|(.)!\s*.+?\s*!\1|<!\s*.+?\s*!>|\[!\s*.+?\s*!\]|\{!\s*.+?\s*!\}'
668
679
  - language: Smalltalk
669
- 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*\['
670
681
  - extensions: ['.star']
671
682
  rules:
672
683
  - language: STAR
@@ -675,7 +686,7 @@ disambiguations:
675
686
  - extensions: ['.stl']
676
687
  rules:
677
688
  - language: STL
678
- pattern: '\A\s*solid(?=$|\s)(?m:.*?)\Rendsolid(?:$|\s)'
689
+ pattern: '\A\s*solid(?=$|\s)(?:.|[\r\n])*?^endsolid(?:$|\s)'
679
690
  - extensions: ['.sw']
680
691
  rules:
681
692
  - language: Sway
@@ -696,6 +707,10 @@ disambiguations:
696
707
  rules:
697
708
  - language: Java Server Pages
698
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'
699
714
  - extensions: ['.toc']
700
715
  rules:
701
716
  - language: World of Warcraft Addon Data
@@ -752,7 +767,7 @@ disambiguations:
752
767
  - extensions: ['.url']
753
768
  rules:
754
769
  - language: INI
755
- pattern: '^\[InternetShortcut\]\R(?>[^\s\[][^\n]*\R)*URL='
770
+ pattern: '^\[InternetShortcut\](?:\r?\n|\r)(?>[^\s\[][^\n]*(?:\r?\n|\r))*URL='
756
771
  - extensions: ['.v']
757
772
  rules:
758
773
  - language: Coq
@@ -777,7 +792,7 @@ disambiguations:
777
792
  - language: DirectX 3D File
778
793
  pattern: '^xof 030(2|3)(?:txt|bin|tzip|bzip)\b'
779
794
  - language: RPC
780
- 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*\('
781
796
  - language: Logos
782
797
  pattern: '^%(end|ctor|hook|group)\b'
783
798
  - language: Linker Script
@@ -838,5 +853,22 @@ named_patterns:
838
853
  - '^\s*package\s+[^\W\d]\w*(?:::\w+)*\s*(?:[;{]|\sv?\d)'
839
854
  - '[\s$][^\W\d]\w*(?::\w+)*->[a-zA-Z_\[({]'
840
855
  raku: '^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)'
841
- vb-class: '^\s*VERSION\s+[0-9]\.[0-9]\s+CLASS'
842
- vb-form: '^\s*VERSION\s+[0-9]\.[0-9]{2}'
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}"))\)'