github-linguist 6.1.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +14 -14
  3. data/grammars/hint.haskell.json +14 -14
  4. data/grammars/hint.message.haskell.json +14 -14
  5. data/grammars/hint.type.haskell.json +14 -14
  6. data/grammars/markdown.haxe.codeblock.json +26 -0
  7. data/grammars/markdown.hxml.codeblock.json +26 -0
  8. data/grammars/source.angelscript.json +1 -1
  9. data/grammars/source.ballerina.json +973 -61
  10. data/grammars/source.csound.json +1 -1
  11. data/grammars/source.emacs.lisp.json +35 -0
  12. data/grammars/source.firestore.json +289 -0
  13. data/grammars/source.gfm.json +7 -7
  14. data/grammars/source.haskell.json +14 -14
  15. data/grammars/source.hql.json +492 -0
  16. data/grammars/source.hsig.json +14 -14
  17. data/grammars/source.hx.json +14 -6
  18. data/grammars/source.hx.type.json +8 -0
  19. data/grammars/source.jison.json +1 -1
  20. data/grammars/source.js.json +1 -1
  21. data/grammars/source.powershell.json +384 -141
  22. data/grammars/source.q.json +120 -0
  23. data/grammars/source.q_output.json +348 -0
  24. data/grammars/source.rascal.json +0 -1
  25. data/grammars/source.sas.json +3 -3
  26. data/grammars/source.solidity.json +84 -13
  27. data/grammars/source.ts.json +226 -85
  28. data/grammars/source.tsx.json +230 -89
  29. data/grammars/source.viml.json +73 -18
  30. data/grammars/text.hamlc.json +1 -1
  31. data/grammars/text.html.markdown.source.gfm.apib.json +11 -2
  32. data/grammars/text.html.mediawiki.json +6 -6
  33. data/grammars/text.html.php.blade.json +3 -3
  34. data/grammars/text.tex.latex.haskell.json +14 -14
  35. data/lib/linguist/generated.rb +27 -1
  36. data/lib/linguist/heuristics.rb +8 -0
  37. data/lib/linguist/language.rb +12 -15
  38. data/lib/linguist/languages.json +1 -1
  39. data/lib/linguist/languages.yml +55 -10
  40. data/lib/linguist/samples.json +1623 -158
  41. data/lib/linguist/strategy/modeline.rb +11 -11
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +9 -3
  44. data/grammars/source.j.json +0 -46
@@ -36,7 +36,7 @@ module Linguist
36
36
 
37
37
  # Start modeline. Could be `vim:`, `vi:` or `ex:`
38
38
  (?:
39
- (?:\s|^)
39
+ (?:[ \t]|^)
40
40
  vi
41
41
  (?:m[<=>]?\d+|m)? # Version-specific modeline
42
42
  |
@@ -49,10 +49,10 @@ module Linguist
49
49
  # serves as a terminator for an option sequence, delimited by whitespace.
50
50
  (?=
51
51
  # So we have to ensure the modeline ends with a colon
52
- : (?=\s* set? \s [^\n:]+ :) |
52
+ : (?=[ \t]* set? [ \t] [^\n:]+ :) |
53
53
 
54
54
  # Otherwise, it isn't valid syntax and should be ignored
55
- : (?!\s* set? \s)
55
+ : (?![ \t]* set? [ \t])
56
56
  )
57
57
 
58
58
  # Possible (unrelated) `option=value` pairs to skip past
@@ -60,10 +60,10 @@ module Linguist
60
60
  # Option separator. Vim uses whitespace or colons to separate options (except if
61
61
  # the alternate "vim: set " form is used, where only whitespace is used)
62
62
  (?:
63
- \s
63
+ [ \t]
64
64
  |
65
- \s* : \s* # Note that whitespace around colons is accepted too:
66
- ) # vim: noai : ft=ruby:noexpandtab
65
+ [ \t]* : [ \t]* # Note that whitespace around colons is accepted too:
66
+ ) # vim: noai : ft=ruby:noexpandtab
67
67
 
68
68
  # Option's name. All recognised Vim options have an alphanumeric form.
69
69
  \w*
@@ -71,25 +71,25 @@ module Linguist
71
71
  # Possible value. Not every option takes an argument.
72
72
  (?:
73
73
  # Whitespace between name and value is allowed: `vim: ft =ruby`
74
- \s*=
74
+ [ \t]*=
75
75
 
76
76
  # Option's value. Might be blank; `vim: ft= ` says "use no filetype".
77
77
  (?:
78
- [^\\\s] # Beware of escaped characters: titlestring=\ ft=ruby
79
- | # will be read by Vim as { titlestring: " ft=ruby" }.
78
+ [^\\[ \t]] # Beware of escaped characters: titlestring=\ ft=ruby
79
+ | # will be read by Vim as { titlestring: " ft=ruby" }.
80
80
  \\.
81
81
  )*
82
82
  )?
83
83
  )*
84
84
 
85
85
  # The actual filetype declaration
86
- [\s:] (?:filetype|ft|syntax) \s*=
86
+ [[ \t]:] (?:filetype|ft|syntax) [ \t]*=
87
87
 
88
88
  # Language's name
89
89
  (\w+)
90
90
 
91
91
  # Ensure it's followed by a legal separator
92
- (?=\s|:|$)
92
+ (?=[ \t]|:|$)
93
93
  /xi
94
94
 
95
95
  MODELINES = [EMACS_MODELINE, VIM_MODELINE]
@@ -1,3 +1,3 @@
1
1
  module Linguist
2
- VERSION = "6.1.0"
2
+ VERSION = "6.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-linguist
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-20 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: charlock_holmes
@@ -232,6 +232,8 @@ files:
232
232
  - grammars/hint.haskell.json
233
233
  - grammars/hint.message.haskell.json
234
234
  - grammars/hint.type.haskell.json
235
+ - grammars/markdown.haxe.codeblock.json
236
+ - grammars/markdown.hxml.codeblock.json
235
237
  - grammars/objdump.x86asm.json
236
238
  - grammars/source.LS.json
237
239
  - grammars/source.MCPOST.json
@@ -339,6 +341,7 @@ files:
339
341
  - grammars/source.factor.json
340
342
  - grammars/source.fan.json
341
343
  - grammars/source.fancy.json
344
+ - grammars/source.firestore.json
342
345
  - grammars/source.fish.json
343
346
  - grammars/source.fontforge.json
344
347
  - grammars/source.forth.json
@@ -369,10 +372,12 @@ files:
369
372
  - grammars/source.harbour.json
370
373
  - grammars/source.haskell.json
371
374
  - grammars/source.hlsl.json
375
+ - grammars/source.hql.json
372
376
  - grammars/source.hsc2hs.json
373
377
  - grammars/source.hsig.json
374
378
  - grammars/source.httpspec.json
375
379
  - grammars/source.hx.json
380
+ - grammars/source.hx.type.json
376
381
  - grammars/source.hxml.json
377
382
  - grammars/source.ideal.json
378
383
  - grammars/source.idl-dlm.json
@@ -384,7 +389,6 @@ files:
384
389
  - grammars/source.ioke.json
385
390
  - grammars/source.isabelle.root.json
386
391
  - grammars/source.isabelle.theory.json
387
- - grammars/source.j.json
388
392
  - grammars/source.jasmin.json
389
393
  - grammars/source.java-properties.json
390
394
  - grammars/source.java.json
@@ -500,6 +504,8 @@ files:
500
504
  - grammars/source.python.django.json
501
505
  - grammars/source.python.json
502
506
  - grammars/source.python.salt.json
507
+ - grammars/source.q.json
508
+ - grammars/source.q_output.json
503
509
  - grammars/source.qmake.json
504
510
  - grammars/source.qml.json
505
511
  - grammars/source.quoting.perl6fe.json
@@ -1,46 +0,0 @@
1
- {
2
- "name": "J",
3
- "scopeName": "source.j",
4
- "patterns": [
5
- {
6
- "name": "string.quoted.j",
7
- "match": "('[^']*')"
8
- },
9
- {
10
- "name": "comment.line.j",
11
- "match": "(?:^|[ )])(NB\\..*$)"
12
- },
13
- {
14
- "name": "constant.numeric.j",
15
- "match": "(?\u003c![_a-zA-Z])([_0-9][_0-9a-zA-Z]*\\.?[0-9a-zA-Z]*)(?![\\.\\:])"
16
- },
17
- {
18
- "name": "copula.global.j",
19
- "match": "=\\:"
20
- },
21
- {
22
- "name": "copula.local.j",
23
- "match": "=\\."
24
- },
25
- {
26
- "name": "keyword.control.j",
27
- "match": "(?\u003c![_a-zA-Z0-9])((?:while\\.)|(?:whilst\\.)|(?:if\\.)|(?:elseif\\.)|(?:else\\.)|(?:do\\.)|(?:end\\.))"
28
- },
29
- {
30
- "name": "keyword.other.noun.j",
31
- "match": "((?\u003c![_a-zA-Z0-9])(_\\.|a\\.|a:)(?![\\.\\:]))"
32
- },
33
- {
34
- "name": "keyword.operator.conjunction.j",
35
- "match": "((?\u003c![_a-zA-Z0-9])(?:[dDHT]\\.)|(?\u003c![_a-zA-Z0-9])(?:[DLS]:)|(\u0026\\.:)|([\\;\\!\\@\u0026]\\.)|([\\^\\!\\`\\@\u0026]:)|([\\\"\\`\\@\u0026])|(\\s[\\.\\:][\\.\\:])|(\\s[\\.\\:]))(?![\\.\\:])"
36
- },
37
- {
38
- "name": "keyword.operator.adverb.j",
39
- "match": "(([\\/\\\\]\\.)|(?\u003c![_a-zA-Z0-9])(?:[bfMt]\\.)|(?\u003c![_a-zA-Z0-9])(?:t:)|([\\~\\/\\\\\\}]))(?![\\.\\:])"
40
- },
41
- {
42
- "name": "keyword.operator.verb.j",
43
- "match": "((?:_?[0-9]\\:)|(?\u003c![_a-zA-Z0-9])(?:p\\.\\.)|(?\u003c![_a-zA-Z0-9])(?:[AcCeEiIjLopr]\\.)|(?\u003c![_a-zA-Z0-9])(?:[ipqsux]:)|({::)|([\u003c\u003e\\+\\*\\-\\%\\^\\$\\~\\|\\,\\#\\{\\}\"\\?]\\.)|([\u003c\u003e\\_\\+\\*\\-\\%\\$\\~\\|\\,\\;\\#\\/\\\\\\[\\{\\}\"]:)|([\u003c\u003e\\=\\+\\*\\-\\%\\^\\$\\|\\,\\;\\#\\!\\[\\]\\{\\?]))(?![\\.\\:])"
44
- }
45
- ]
46
- }