github-linguist 6.2.0 → 6.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/bin/git-linguist +6 -12
  3. data/ext/linguist/linguist.h +7 -0
  4. data/ext/linguist/strndup.c +10 -0
  5. data/grammars/annotation.liquidhaskell.haskell.json +3 -0
  6. data/grammars/hint.haskell.json +3 -0
  7. data/grammars/hint.message.haskell.json +3 -0
  8. data/grammars/hint.type.haskell.json +3 -0
  9. data/grammars/source.apl.json +97 -106
  10. data/grammars/source.ballerina.json +577 -144
  11. data/grammars/source.batchfile.json +24 -10
  12. data/grammars/source.bsl.json +50 -10
  13. data/grammars/source.cobol.json +4 -4
  14. data/grammars/source.css.json +1 -1
  15. data/grammars/source.gfm.json +20 -3
  16. data/grammars/source.haskell.json +3 -0
  17. data/grammars/source.hsig.json +3 -0
  18. data/grammars/source.hx.argument.json +80 -0
  19. data/grammars/source.hx.json +131 -46
  20. data/grammars/source.hxml.json +17 -9
  21. data/grammars/source.isabelle.root.json +2 -2
  22. data/grammars/source.lua.json +10 -3
  23. data/grammars/source.nim.json +4 -4
  24. data/grammars/source.pawn.json +5 -5
  25. data/grammars/source.pony.json +2 -2
  26. data/grammars/source.powershell.json +128 -87
  27. data/grammars/source.rascal.json +1 -0
  28. data/grammars/source.stan.json +3 -3
  29. data/grammars/source.ts.json +90 -28
  30. data/grammars/source.tsx.json +95 -33
  31. data/grammars/text.elixir.json +1 -3
  32. data/grammars/text.html.erlang.yaws.json +1 -1
  33. data/grammars/text.html.markdown.source.gfm.apib.json +1 -3
  34. data/grammars/text.html.markdown.source.gfm.mson.json +1 -3
  35. data/grammars/text.marko.json +129 -21
  36. data/grammars/text.shell-session.json +1 -1
  37. data/grammars/text.tex.latex.haskell.json +3 -0
  38. data/grammars/text.xml.json +4 -4
  39. data/lib/linguist/generated.rb +19 -1
  40. data/lib/linguist/languages.json +1 -1
  41. data/lib/linguist/languages.yml +68 -59
  42. data/lib/linguist/samples.json +618 -413
  43. data/lib/linguist/version.rb +1 -1
  44. metadata +7 -6
  45. data/grammars/source.elixir.json +0 -927
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dec419e8690419e864ac634093ae2fbce21eb3c3
4
- data.tar.gz: 2dcf74335e132f0577ca4c83d8800133287a8941
2
+ SHA256:
3
+ metadata.gz: 35065ab2750454f7ab539c87e3e493700fe763644b80e4a2517532d8826d1f71
4
+ data.tar.gz: eb3e092758f8e6943d9b6fe90a42b0288ccce7841756497db2dec12a8ba0e234
5
5
  SHA512:
6
- metadata.gz: 5af0bce3c404d08cf684bc65d4f763a9320b5c481958d1075100c0d40e205b831bc3d6cc0be9500d162315a5fc5bc335aab85ec4091a246698e3b46cea2a0ba9
7
- data.tar.gz: aeb3a5e5023ca8aec79354d40954990bd2e0b0cafab15f5b8afc583b1f7b199c7a6f6d6ed0f470bc7d7f14194cbb489649e193fdb05053346a2325cd44de6c06
6
+ metadata.gz: 71ac80b583d81ee8830556b74c34455b3bdc4f458b8d143e9f39f2dfa93d6e687d127562737ccceed49a3c05fa4a903021c8c30bfa935d6102e0d6c4f784dc97
7
+ data.tar.gz: fdcd032ce2303ae4e0cc0786bbccc3d7c040e3e4c2da9a791a5a1682146beb21a92b49b5c22f2f5707be176759efa7e84ba3378b41476d2b1b507e56360884cc
data/bin/git-linguist CHANGED
@@ -6,7 +6,7 @@ require 'linguist'
6
6
  require 'rugged'
7
7
  require 'optparse'
8
8
  require 'json'
9
- require 'tmpdir'
9
+ require 'tempfile'
10
10
  require 'zlib'
11
11
 
12
12
  class GitLinguist
@@ -76,17 +76,11 @@ class GitLinguist
76
76
  def write_cache(object)
77
77
  return unless File.directory? @repo_path
78
78
 
79
- begin
80
- tmp_path = Dir::Tmpname.make_tmpname(cache_file, nil)
81
- File.open(tmp_path, "wb") do |f|
82
- marshal = Marshal.dump(object)
83
- f.write(Zlib::Deflate.deflate(marshal))
84
- end
85
-
86
- File.rename(tmp_path, cache_file)
87
- rescue => e
88
- (File.unlink(tmp_path) rescue nil)
89
- raise e
79
+ Tempfile.open('cache_file', @repo_path) do |f|
80
+ marshal = Marshal.dump(object)
81
+ f.write(Zlib::Deflate.deflate(marshal))
82
+ f.close
83
+ File.rename(f.path, cache_file)
90
84
  end
91
85
  end
92
86
 
@@ -9,3 +9,10 @@ struct tokenizer_extra {
9
9
  char *token;
10
10
  enum tokenizer_type type;
11
11
  };
12
+
13
+ #ifdef __APPLE__
14
+ char *strndup(const char *s1, size_t n);
15
+ #elif defined(_WIN32) || defined(_WIN64)
16
+ char *strndup(const char *s1, size_t n);
17
+ #pragma warning (disable: 4244)
18
+ #endif // _WIN32 || _WIN64
@@ -0,0 +1,10 @@
1
+ #if defined(_WIN32) || defined(_WIN64)
2
+ #include <math.h>
3
+ char *strndup(const char *s1, size_t n)
4
+ {
5
+ char *copy = (char *)malloc(n + 1);
6
+ memcpy(copy, s1, n);
7
+ copy[n] = 0;
8
+ return copy;
9
+ }
10
+ #endif
@@ -1030,6 +1030,9 @@
1030
1030
  {
1031
1031
  "name": "keyword.operator.wildcard.haskell",
1032
1032
  "match": "\\.\\."
1033
+ },
1034
+ {
1035
+ "include": "#infix_op"
1033
1036
  }
1034
1037
  ]
1035
1038
  },
@@ -970,6 +970,9 @@
970
970
  {
971
971
  "name": "keyword.operator.wildcard.haskell",
972
972
  "match": "\\.\\."
973
+ },
974
+ {
975
+ "include": "#infix_op"
973
976
  }
974
977
  ]
975
978
  },
@@ -994,6 +994,9 @@
994
994
  {
995
995
  "name": "keyword.operator.wildcard.haskell",
996
996
  "match": "\\.\\."
997
+ },
998
+ {
999
+ "include": "#infix_op"
997
1000
  }
998
1001
  ]
999
1002
  },
@@ -967,6 +967,9 @@
967
967
  {
968
968
  "name": "keyword.operator.wildcard.haskell",
969
969
  "match": "\\.\\."
970
+ },
971
+ {
972
+ "include": "#infix_op"
970
973
  }
971
974
  ]
972
975
  },
@@ -3,14 +3,14 @@
3
3
  "scopeName": "source.apl",
4
4
  "patterns": [
5
5
  {
6
- "include": "#heredocs"
6
+ "name": "comment.line.shebang.apl",
7
+ "match": "\\A#!.*$"
7
8
  },
8
9
  {
9
- "include": "#main"
10
+ "include": "#heredocs"
10
11
  },
11
12
  {
12
- "name": "comment.line.shebang.apl",
13
- "match": "\\A#!.*$"
13
+ "include": "#main"
14
14
  },
15
15
  {
16
16
  "contentName": "text.embedded.apl",
@@ -128,7 +128,7 @@
128
128
  "class": {
129
129
  "patterns": [
130
130
  {
131
- "begin": "(?\u003c=\\s|^)((:)Class)\\s+('[^']*'?|[A-Za-z_∆⍙]+[\\w∆⍙¯]*)\\s*((:)\\s*(?:('[^']*'?|[A-Za-z_∆⍙]+[\\w∆⍙¯]*)\\s*)?)?(.*?)$",
131
+ "begin": "(?x)\n(?\u003c=\\s|^)\n((:)Class)\n\\s+\n(\n\t'[^']*'?\n\t|\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n\\s*\n(\n\t(:)\n\t\\s*\n\t(?:\n\t\t(\n\t\t\t'[^']*'?\n\t\t\t|\n\t\t\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t\t\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n\t\t)\n\t\t\\s*\n\t)?\n)?\n(.*?)$",
132
132
  "end": "(?\u003c=\\s|^)((:)EndClass)(?=\\b)",
133
133
  "patterns": [
134
134
  {
@@ -146,7 +146,7 @@
146
146
  },
147
147
  {
148
148
  "name": "entity.name.type.apl",
149
- "match": "('[^']*'?|[A-Za-z_∆⍙]+[\\w∆⍙¯]*)",
149
+ "match": "(?x)\n(\n\t'[^']*'?\n\t|\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)",
150
150
  "captures": {
151
151
  "1": {
152
152
  "include": "#strings"
@@ -248,7 +248,7 @@
248
248
  "patterns": [
249
249
  {
250
250
  "name": "variable.parameter.switch.apl",
251
- "begin": "(?\u003c=\\s)(-)([\\w∆⍙]+[\\w∆⍙¯]*)(=)",
251
+ "begin": "(?x)\n(?\u003c=\\s)(-)\n(\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n(=)",
252
252
  "end": "\\b(?=\\s)",
253
253
  "patterns": [
254
254
  {
@@ -266,6 +266,18 @@
266
266
  "name": "punctuation.assignment.switch.apl"
267
267
  }
268
268
  }
269
+ },
270
+ {
271
+ "name": "variable.parameter.switch.apl",
272
+ "match": "(?x)\n(?\u003c=\\s)(-)\n(\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n(?!=)",
273
+ "captures": {
274
+ "1": {
275
+ "name": "punctuation.delimiter.switch.apl"
276
+ },
277
+ "2": {
278
+ "name": "entity.name.switch.apl"
279
+ }
280
+ }
269
281
  }
270
282
  ]
271
283
  },
@@ -294,7 +306,7 @@
294
306
  "patterns": [
295
307
  {
296
308
  "name": "meta.function.apl",
297
- "begin": "(?x) ^\\s*? (?# 1: keyword.operator.nabla.apl) (∇) (?: \\s* (?: (?# 2: entity.function.return-value.apl) ([A-Za-z_∆⍙][\\w∆⍙¯]*) | \\s* (?# 3: entity.function.return-value.shy.apl) ( (\\{) (?# 4: punctuation.definition.return-value.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\}) (?# 5: punctuation.definition.return-value.end.apl) | (\\() (?# 6: punctuation.definition.return-value.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\)) (?# 7: punctuation.definition.return-value.end.apl) | (\\(\\s*\\{) (?# 8: punctuation.definition.return-value.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\}\\s*\\)) (?# 9: punctuation.definition.return-value.end.apl) | (\\{\\s*\\() (?# 10: punctuation.definition.return-value.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\)\\s*\\}) (?# 11: punctuation.definition.return-value.end.apl) ) \\s* ) \\s* (?# 12: keyword.operator.assignment.apl) (←) )? \\s* (?: (?# MONADIC) (?: (?# 13: entity.function.name.apl) ([A-Za-z_∆⍙][\\w∆⍙¯]*) \\s* (?# 14: entity.function.axis.apl) ( (?# 15: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s* (?# 16: invalid.illegal.extra-characters.apl) (.*?) | (?# 17: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 18: punctuation.definition.axis.end.apl) (\\]) )? \\s*? (?# 19: entity.function.arguments.right.apl) ( (?\u003c=\\s|\\])[A-Za-z_∆⍙][\\w∆⍙¯]* | (\\() (?# 20: punctuation.definition.arguments.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\)) (?# 21: punctuation.definition.arguments.end.apl) ) \\s* (?=;|$) ) | (?# DYADIC/AMBIVALENT) (?#==================) (?: (?# 22: entity.function.arguments.left.apl) ([A-Za-z_∆⍙][\\w∆⍙¯]*\\s+) | (?# 23: entity.function.arguments.left.optional.apl) ( (\\{) (?# 24: punctuation.definition.arguments.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\}) (?# 25: punctuation.definition.arguments.end.apl) | (\\(\\s*\\{) (?# 26: punctuation.definition.arguments.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\}\\s*\\)) (?# 27: punctuation.definition.arguments.end.apl) | (\\{\\s*\\() (?# 28: punctuation.definition.arguments.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\)\\s*\\}) (?# 29: punctuation.definition.arguments.end.apl) ) )? \\s* (?: (?# 30: entity.function.name.apl) ([A-Za-z_∆⍙][\\w∆⍙¯]*) \\s* (?# 31: entity.function.axis.apl) ( (?# 32: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s* (?# 33: invalid.illegal.extra-characters.apl) (.*?) | (?# 34: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 35: punctuation.definition.axis.end.apl) (\\]) )? | (?# 36: entity.function.operands.apl) ( (?# 37: punctuation.definition.operands.begin.apl) (\\() (?# 38: entity.function.operands.left.apl) (\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*)? \\s* (?# 39: entity.function.name.apl) ([A-Za-z_∆⍙][\\w∆⍙¯]*) \\s*? (?# 40: entity.function.axis.apl) ( (?# 41: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s* (?# 42: invalid.illegal.extra-characters.apl) (.*?) | (?# 43: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 44: punctuation.definition.axis.end.apl) (\\]) )? \\s* (?# 45: entity.function.operands.right.apl) ([A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)? (?# 46: punctuation.definition.operands.end.apl) (\\)) ) ) \\s* (?# 47: entity.function.arguments.right.apl) ( (?\u003c=\\s|\\])[A-Za-z_∆⍙][\\w∆⍙¯]* | \\s* (\\() (?# 48: punctuation.definition.arguments.begin.apl) (?:\\s*[A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)* (\\)) (?# 49: punctuation.definition.arguments.end.apl) )? (?#==================) ) \\s* (?# 50: invalid.illegal.arguments.right.apl) ([^;]+)? (?# 51: entity.function.local-variables.apl) ( (?# 52: Include “;”) ( (?: \\s* ; (?:\\s*[⎕A-Za-z_∆⍙][\\w∆⍙¯]*\\s*)+ )+ ) | (?# 53: invalid.illegal.local-variables.apl) ([^⍝]+) )? \\s* (?# 54: comment.line.apl) (⍝.*)? $",
309
+ "begin": "(?x) ^\\s*? (?# 1: keyword.operator.nabla.apl) (∇) (?: \\s* (?: (?# 2: entity.function.return-value.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) | \\s* (?# 3: entity.function.return-value.shy.apl) ( (\\{) (?# 4: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}) (?# 5: punctuation.definition.return-value.end.apl) | (\\() (?# 6: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)) (?# 7: punctuation.definition.return-value.end.apl) | (\\(\\s*\\{) (?# 8: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}\\s*\\)) (?# 9: punctuation.definition.return-value.end.apl) | (\\{\\s*\\() (?# 10: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)\\s*\\}) (?# 11: punctuation.definition.return-value.end.apl) ) \\s* ) \\s* (?# 12: keyword.operator.assignment.apl) (←) )? \\s* (?: (?# MONADIC) (?: (?# 13: entity.function.name.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) \\s* (?# 14: entity.function.axis.apl) ( (?# 15: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* (?# 16: invalid.illegal.extra-characters.apl) (.*?) | (?# 17: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 18: punctuation.definition.axis.end.apl) (\\]) )? \\s*? (?# 19: entity.function.arguments.right.apl) ( (?\u003c=\\s|\\]) [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* | (\\() (?# 20: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)) (?# 21: punctuation.definition.arguments.end.apl) ) \\s* (?=;|$) ) | (?# DYADIC/AMBIVALENT) (?#==================) (?: (?# 22: entity.function.arguments.left.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s+ ) | (?# 23: entity.function.arguments.left.optional.apl) ( (\\{) (?# 24: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}) (?# 25: punctuation.definition.arguments.end.apl) | (\\(\\s*\\{) (?# 26: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}\\s*\\)) (?# 27: punctuation.definition.arguments.end.apl) | (\\{\\s*\\() (?# 28: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)\\s*\\}) (?# 29: punctuation.definition.arguments.end.apl) ) )? \\s* (?: (?# 30: entity.function.name.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) \\s* (?# 31: entity.function.axis.apl) ( (?# 32: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* (?# 33: invalid.illegal.extra-characters.apl) (.*?) | (?# 34: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 35: punctuation.definition.axis.end.apl) (\\]) )? | (?# 36: entity.function.operands.apl) ( (?# 37: punctuation.definition.operands.begin.apl) (\\() (?# 38: entity.function.operands.left.apl) ( \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* )? \\s* (?# 39: entity.function.name.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) \\s*? (?# 40: entity.function.axis.apl) ( (?# 41: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* (?# 42: invalid.illegal.extra-characters.apl) (.*?) | (?# 43: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 44: punctuation.definition.axis.end.apl) (\\]) )? \\s* (?# 45: entity.function.operands.right.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )? (?# 46: punctuation.definition.operands.end.apl) (\\)) ) ) \\s* (?# 47: entity.function.arguments.right.apl) ( (?\u003c=\\s|\\]) [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* | \\s* (\\() (?# 48: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)) (?# 49: punctuation.definition.arguments.end.apl) )? (?#==================) ) \\s* (?# 50: invalid.illegal.arguments.right.apl) ([^;]+)? (?# 51: entity.function.local-variables.apl) ( (?# 52: Include “;”) ( (?: \\s* ; (?: \\s* [⎕A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )+ )+ ) | (?# 53: invalid.illegal.local-variables.apl) ([^⍝]+) )? \\s* (?# 54: comment.line.apl) (⍝.*)? $",
298
310
  "end": "^\\s*?(?:(∇)|(⍫))\\s*?(⍝.*?)?$",
299
311
  "patterns": [
300
312
  {
@@ -318,7 +330,16 @@
318
330
  "name": "keyword.operator.assignment.apl"
319
331
  },
320
332
  "13": {
321
- "name": "entity.function.name.apl"
333
+ "name": "entity.function.name.apl",
334
+ "captures": {
335
+ "0": {
336
+ "patterns": [
337
+ {
338
+ "include": "#embolden"
339
+ }
340
+ ]
341
+ }
342
+ }
322
343
  },
323
344
  "14": {
324
345
  "name": "entity.function.axis.apl"
@@ -375,7 +396,12 @@
375
396
  "name": "entity.function.return-value.shy.apl"
376
397
  },
377
398
  "30": {
378
- "name": "entity.function.name.apl"
399
+ "name": "entity.function.name.apl",
400
+ "patterns": [
401
+ {
402
+ "include": "#embolden"
403
+ }
404
+ ]
379
405
  },
380
406
  "31": {
381
407
  "name": "entity.function.axis.apl"
@@ -402,7 +428,12 @@
402
428
  "name": "entity.function.operands.left.apl"
403
429
  },
404
430
  "39": {
405
- "name": "entity.function.name.apl"
431
+ "name": "entity.function.name.apl",
432
+ "patterns": [
433
+ {
434
+ "include": "#embolden"
435
+ }
436
+ ]
406
437
  },
407
438
  "4": {
408
439
  "name": "punctuation.definition.return-value.begin.apl"
@@ -511,54 +542,9 @@
511
542
  }
512
543
  ]
513
544
  },
514
- "float": {
515
- "patterns": [
516
- {
517
- "name": "constant.numeric.float.apl",
518
- "match": "\\b(\\d+)(\\.)(\\d*([Ee]¯?\\d+)?)",
519
- "captures": {
520
- "1": {
521
- "name": "leading.decimal"
522
- },
523
- "2": {
524
- "name": "decimal.separator"
525
- },
526
- "3": {
527
- "name": "trailing.decimal"
528
- },
529
- "4": {
530
- "name": "exponential.decimal"
531
- }
532
- }
533
- },
534
- {
535
- "name": "constant.numeric.float.no-trailing-digits.apl",
536
- "match": "\\b(\\d+)(\\.)(?!\\w)",
537
- "captures": {
538
- "1": {
539
- "name": "leading.decimal"
540
- },
541
- "2": {
542
- "name": "decimal.separator"
543
- }
544
- }
545
- },
546
- {
547
- "name": "constant.numeric.float.no-leading-digits.apl",
548
- "match": "(?\u003c!\\w)(\\.)(\\d+([Ee]¯?\\d+)?)",
549
- "captures": {
550
- "1": {
551
- "name": "decimal.separator"
552
- },
553
- "2": {
554
- "name": "trailing.decimal"
555
- },
556
- "3": {
557
- "name": "exponential.decimal"
558
- }
559
- }
560
- }
561
- ]
545
+ "embolden": {
546
+ "name": "markup.bold.identifier.apl",
547
+ "match": ".+"
562
548
  },
563
549
  "heredocs": {
564
550
  "patterns": [
@@ -753,23 +739,11 @@
753
739
  }
754
740
  ]
755
741
  },
756
- "int": {
757
- "patterns": [
758
- {
759
- "name": "constant.numeric.int.exponential.apl",
760
- "match": "\\b\\d+[Ee]¯?\\d+"
761
- },
762
- {
763
- "name": "constant.numeric.int.basic.apl",
764
- "match": "\\b\\d+(?!\\.?[Ee][\\d¯])"
765
- }
766
- ]
767
- },
768
742
  "label": {
769
743
  "patterns": [
770
744
  {
771
745
  "name": "meta.label.apl",
772
- "match": "^\\s*([A-Za-z_∆⍙]+[\\w∆⍙¯]*)(:)",
746
+ "match": "(?x)\n^\\s*\n(\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n(:)",
773
747
  "captures": {
774
748
  "1": {
775
749
  "name": "entity.label.name.apl"
@@ -807,27 +781,35 @@
807
781
  "lambda-variables": {
808
782
  "patterns": [
809
783
  {
810
- "name": "variable.lambda.operands.left.apl",
784
+ "name": "constant.language.lambda.operands.left.apl",
811
785
  "match": "⍺⍺"
812
786
  },
813
787
  {
814
- "name": "variable.lambda.operands.right.apl",
788
+ "name": "constant.language.lambda.operands.right.apl",
815
789
  "match": "⍵⍵"
816
790
  },
817
791
  {
818
- "name": "variable.lambda.arguments.left.apl",
792
+ "name": "constant.language.lambda.arguments.left.apl",
819
793
  "match": "[⍺⍶]"
820
794
  },
821
795
  {
822
- "name": "variable.lambda.arguments.right.apl",
796
+ "name": "constant.language.lambda.arguments.right.apl",
823
797
  "match": "[⍵⍹]"
824
798
  },
825
799
  {
826
- "name": "variable.lambda.arguments.axis.apl",
800
+ "name": "constant.language.lambda.arguments.axis.apl",
827
801
  "match": "χ"
828
802
  },
829
803
  {
830
- "name": "variable.lambda.symbol.apl",
804
+ "name": "constant.language.lambda.operands.self.operator.apl",
805
+ "match": "∇∇"
806
+ },
807
+ {
808
+ "name": "constant.language.lambda.operands.self.function.apl",
809
+ "match": "∇"
810
+ },
811
+ {
812
+ "name": "constant.language.lambda.symbol.apl",
831
813
  "match": "λ"
832
814
  }
833
815
  ]
@@ -853,13 +835,7 @@
853
835
  "include": "#strings"
854
836
  },
855
837
  {
856
- "include": "#float"
857
- },
858
- {
859
- "include": "#int"
860
- },
861
- {
862
- "include": "#name"
838
+ "include": "#number"
863
839
  },
864
840
  {
865
841
  "include": "#lambda"
@@ -869,28 +845,28 @@
869
845
  },
870
846
  {
871
847
  "include": "#symbols"
848
+ },
849
+ {
850
+ "include": "#name"
872
851
  }
873
852
  ]
874
853
  },
875
854
  "name": {
876
- "patterns": [
877
- {
878
- "name": "storage.type.name.apl",
879
- "match": "[A-Za-z_∆⍙]+[\\w∆⍙¯]*"
880
- }
881
- ]
855
+ "name": "variable.other.readwrite.apl",
856
+ "match": "(?x)\n[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*"
857
+ },
858
+ "number": {
859
+ "name": "constant.numeric.apl",
860
+ "match": "(?:[¯0-9]|\\.[0-9])[¯0-9A-Za-z]*"
882
861
  },
883
862
  "sck": {
884
863
  "patterns": [
885
864
  {
886
865
  "name": "keyword.control.sck.apl",
887
- "match": "(?\u003c=\\s|^)(:)([A-Za-z]+)",
866
+ "match": "(?\u003c=\\s|^)(:)[A-Za-z]+",
888
867
  "captures": {
889
868
  "1": {
890
869
  "name": "punctuation.definition.sck.begin.apl"
891
- },
892
- "2": {
893
- "name": "entity.sck.name.apl"
894
870
  }
895
871
  }
896
872
  }
@@ -1176,6 +1152,14 @@
1176
1152
  "name": "keyword.operator.thorn.apl",
1177
1153
  "match": "⍕"
1178
1154
  },
1155
+ {
1156
+ "name": "keyword.operator.underbar-shoe-left.apl",
1157
+ "match": "⊆"
1158
+ },
1159
+ {
1160
+ "name": "keyword.operator.underbar-iota.apl",
1161
+ "match": "⍸"
1162
+ },
1179
1163
  {
1180
1164
  "name": "keyword.operator.each.apl",
1181
1165
  "match": "¨"
@@ -1216,6 +1200,14 @@
1216
1200
  "name": "keyword.operator.i-beam.apl",
1217
1201
  "match": "⌶"
1218
1202
  },
1203
+ {
1204
+ "name": "keyword.operator.quad-diamond.apl",
1205
+ "match": "⌺"
1206
+ },
1207
+ {
1208
+ "name": "keyword.operator.at.apl",
1209
+ "match": "@"
1210
+ },
1219
1211
  {
1220
1212
  "name": "keyword.operator.lozenge.apl",
1221
1213
  "match": "◊"
@@ -1244,10 +1236,6 @@
1244
1236
  "name": "keyword.operator.diamond.apl",
1245
1237
  "match": "⋄"
1246
1238
  },
1247
- {
1248
- "name": "keyword.operator.nabla.apl",
1249
- "match": "∇"
1250
- },
1251
1239
  {
1252
1240
  "name": "keyword.operator.lock.apl",
1253
1241
  "match": "⍫"
@@ -1257,8 +1245,12 @@
1257
1245
  "match": "⎕"
1258
1246
  },
1259
1247
  {
1260
- "name": "keyword.operator.quad-diamond.apl",
1261
- "match": ""
1248
+ "name": "constant.language.namespace.parent.apl",
1249
+ "match": "##"
1250
+ },
1251
+ {
1252
+ "name": "constant.language.namespace.root.apl",
1253
+ "match": "#"
1262
1254
  },
1263
1255
  {
1264
1256
  "name": "keyword.operator.quad-jot.apl",
@@ -1403,19 +1395,18 @@
1403
1395
  {
1404
1396
  "name": "keyword.operator.quad-question.apl",
1405
1397
  "match": "⍰"
1406
- },
1407
- {
1408
- "name": "keyword.operator.underbar-iota.apl",
1409
- "match": "⍸"
1410
1398
  }
1411
1399
  ]
1412
1400
  },
1413
1401
  "sysvars": {
1414
1402
  "name": "support.system.variable.apl",
1415
- "match": "(⎕)[A-Z]*",
1403
+ "match": "(?:(⎕)|(⍞))[A-Za-z]*",
1416
1404
  "captures": {
1417
1405
  "1": {
1418
1406
  "name": "punctuation.definition.quad.apl"
1407
+ },
1408
+ "2": {
1409
+ "name": "punctuation.definition.quad-quote.apl"
1419
1410
  }
1420
1411
  }
1421
1412
  }