github-linguist 7.29.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/git-linguist +7 -3
- data/bin/github-linguist +6 -3
- data/grammars/etc.json +1 -1
- data/grammars/inline.edgeql.json +1 -1
- data/grammars/inline.graphql.json +1 -1
- data/grammars/inline.peggy.json +1 -0
- data/grammars/markdown.gleam.codeblock.json +1 -0
- data/grammars/markdown.move.codeblock.json +1 -1
- data/grammars/markdown.rego.codeblock.json +1 -0
- data/grammars/mdx.move.codeblock.json +1 -0
- data/grammars/source.8xp.json +1 -1
- data/grammars/source.Caddyfile-test.json +1 -0
- data/grammars/source.Caddyfile.json +1 -0
- data/grammars/source.abl.json +1 -1
- data/grammars/source.astro.json +1 -1
- data/grammars/source.bicep.json +1 -1
- data/grammars/source.bms.json +1 -1
- data/grammars/source.bqn.json +1 -0
- data/grammars/source.brs.json +1 -1
- data/grammars/source.cairo.json +1 -1
- data/grammars/source.cairo0.json +1 -0
- data/grammars/source.cl.json +1 -1
- data/grammars/source.clar.json +1 -1
- data/grammars/source.cmd.json +1 -1
- data/grammars/source.cobol.json +1 -1
- data/grammars/source.commonlisp.json +1 -1
- data/grammars/source.cs.json +1 -1
- data/grammars/source.curlrc.json +1 -1
- data/grammars/source.curry.json +1 -1
- data/grammars/source.cylc.json +1 -0
- data/grammars/source.d2.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.dds.dspf.json +1 -1
- data/grammars/source.dds.icff.json +1 -1
- data/grammars/source.dds.lf.json +1 -1
- data/grammars/source.dds.pf.json +1 -1
- data/grammars/source.dds.prtf.json +1 -1
- data/grammars/source.dune.json +1 -0
- data/grammars/source.elvish.json +1 -1
- data/grammars/source.firrtl.json +1 -0
- data/grammars/source.fsharp.json +1 -1
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.generic-db.json +1 -1
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.gjs.json +1 -1
- data/grammars/source.gleam.json +1 -1
- data/grammars/source.gts.json +1 -1
- data/grammars/source.hcl.json +1 -1
- data/grammars/source.hcl.terraform.json +1 -1
- data/grammars/source.hgignore.json +1 -1
- data/grammars/source.hosts.json +1 -1
- data/grammars/source.hx.json +1 -1
- data/grammars/source.iCalendar.json +1 -0
- data/grammars/source.ice.json +1 -1
- data/grammars/source.julia.json +1 -1
- data/grammars/source.just.json +1 -1
- data/grammars/source.kotlin.json +1 -1
- data/grammars/source.lcb.json +1 -0
- data/grammars/source.lilypond.json +1 -1
- data/grammars/source.livecodescript.json +1 -0
- data/grammars/source.lua.json +1 -1
- data/grammars/source.luau.json +1 -0
- data/grammars/source.m2.json +1 -1
- data/grammars/source.markdown.caddy.codeblock.json +1 -0
- data/grammars/source.matlab.json +1 -1
- data/grammars/source.mcfunction.json +1 -1
- data/grammars/source.mdx.json +1 -1
- data/grammars/source.mo.json +1 -1
- data/grammars/source.mojo.json +1 -1
- data/grammars/source.move.json +1 -1
- data/grammars/source.nanorc.json +1 -1
- data/grammars/source.nim.json +1 -1
- data/grammars/source.nr.json +1 -0
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.odin.json +1 -1
- data/grammars/source.p4.json +1 -1
- data/grammars/source.peggy.json +1 -0
- data/grammars/source.pkl.json +1 -0
- data/grammars/source.polar.json +1 -1
- data/grammars/source.powerbuilder.json +1 -0
- data/grammars/source.qsharp.json +1 -1
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rego.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.ron.json +1 -0
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.rust.json +1 -1
- data/grammars/source.sentinel.json +1 -1
- data/grammars/source.solidity.json +1 -1
- data/grammars/source.sourcepawn.json +1 -1
- data/grammars/source.sqf.json +1 -1
- data/grammars/source.stan.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.sy.json +1 -1
- data/grammars/source.templ.json +1 -0
- data/grammars/source.vba.json +1 -1
- data/grammars/source.vcard.json +1 -0
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.wsd.json +1 -1
- data/grammars/text.adblock.json +1 -1
- data/grammars/text.crontab.json +1 -0
- data/grammars/text.html.jte.json +1 -0
- data/grammars/text.html.statamic.json +1 -1
- data/grammars/text.md.json +1 -1
- data/grammars/text.mdx.astro.codeblock.json +1 -0
- data/grammars/text.valve-cfg.json +1 -1
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/classifier.rb +315 -106
- data/lib/linguist/generated.rb +33 -4
- data/lib/linguist/generic.yml +1 -0
- data/lib/linguist/heuristics.rb +6 -6
- data/lib/linguist/heuristics.yml +63 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +224 -4
- data/lib/linguist/repository.rb +8 -6
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/samples.rb +9 -1
- data/lib/linguist/sha256.rb +1 -1
- metadata +29 -7
- data/grammars/inline.graphql.rb.json +0 -1
- data/grammars/markdown.mcfunction.codeblock.json +0 -1
- data/grammars/mdx.LANGUAGE.codeblock.json +0 -1
- data/grammars/source.terraform.json +0 -1
data/lib/linguist/samples.rb
CHANGED
@@ -25,7 +25,14 @@ module Linguist
|
|
25
25
|
# Hash of serialized samples object, uncached
|
26
26
|
def self.load_samples
|
27
27
|
serializer = defined?(Yajl) ? Yajl : JSON
|
28
|
-
serializer.load(File.read(PATH, encoding: 'utf-8'))
|
28
|
+
data = serializer.load(File.read(PATH, encoding: 'utf-8'))
|
29
|
+
# JSON serialization does not allow integer keys, we fix them here
|
30
|
+
for lang in data['centroids'].keys
|
31
|
+
fixed = data['centroids'][lang].to_a.map { |k,v| [k.to_i, v] }
|
32
|
+
data['centroids'][lang] = Hash[fixed]
|
33
|
+
end
|
34
|
+
|
35
|
+
data
|
29
36
|
end
|
30
37
|
|
31
38
|
# Public: Iterate over each sample.
|
@@ -106,6 +113,7 @@ module Linguist
|
|
106
113
|
Classifier.train!(db, language_name, data)
|
107
114
|
end
|
108
115
|
|
116
|
+
Classifier.finalize_train! db
|
109
117
|
db['sha256'] = Linguist::SHA256.hexdigest(db)
|
110
118
|
|
111
119
|
db
|
data/lib/linguist/sha256.rb
CHANGED
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:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cgi
|
@@ -244,11 +244,11 @@ files:
|
|
244
244
|
- grammars/inline.graphql.markdown.codeblock.json
|
245
245
|
- grammars/inline.graphql.php.json
|
246
246
|
- grammars/inline.graphql.python.json
|
247
|
-
- grammars/inline.graphql.rb.json
|
248
247
|
- grammars/inline.graphql.re.json
|
249
248
|
- grammars/inline.graphql.res.json
|
250
249
|
- grammars/inline.graphql.scala.json
|
251
250
|
- grammars/inline.hbs.json
|
251
|
+
- grammars/inline.peggy.json
|
252
252
|
- grammars/inline.prisma.json
|
253
253
|
- grammars/inline.template.json
|
254
254
|
- grammars/liquid.injection.json
|
@@ -258,24 +258,27 @@ files:
|
|
258
258
|
- grammars/markdown.commonlisp.codeblock.json
|
259
259
|
- grammars/markdown.curry.codeblock.json
|
260
260
|
- grammars/markdown.d2.codeblock.json
|
261
|
+
- grammars/markdown.gleam.codeblock.json
|
261
262
|
- grammars/markdown.glimmer.codeblock.json
|
262
263
|
- grammars/markdown.hack.codeblock.json
|
263
264
|
- grammars/markdown.haxe.codeblock.json
|
264
265
|
- grammars/markdown.hxml.codeblock.json
|
265
266
|
- grammars/markdown.lean.codeblock.json
|
266
267
|
- grammars/markdown.lean4.codeblock.json
|
267
|
-
- grammars/markdown.mcfunction.codeblock.json
|
268
268
|
- grammars/markdown.move.codeblock.json
|
269
269
|
- grammars/markdown.plantuml.codeblock.json
|
270
270
|
- grammars/markdown.prisma.codeblock.json
|
271
|
+
- grammars/markdown.rego.codeblock.json
|
271
272
|
- grammars/markdown.rescript.codeblock.json
|
272
273
|
- grammars/markdown.talon.codeblock.json
|
273
274
|
- grammars/markdown.textproto.codeblock.json
|
274
|
-
- grammars/mdx.
|
275
|
+
- grammars/mdx.move.codeblock.json
|
275
276
|
- grammars/objdump.x86asm.json
|
276
277
|
- grammars/source.2da.json
|
277
278
|
- grammars/source.4dm.json
|
278
279
|
- grammars/source.8xp.json
|
280
|
+
- grammars/source.Caddyfile-test.json
|
281
|
+
- grammars/source.Caddyfile.json
|
279
282
|
- grammars/source.abap.json
|
280
283
|
- grammars/source.abapcds.json
|
281
284
|
- grammars/source.abl.json
|
@@ -330,6 +333,7 @@ files:
|
|
330
333
|
- grammars/source.boo.json
|
331
334
|
- grammars/source.boogie.json
|
332
335
|
- grammars/source.bp.json
|
336
|
+
- grammars/source.bqn.json
|
333
337
|
- grammars/source.brs.json
|
334
338
|
- grammars/source.bsl.json
|
335
339
|
- grammars/source.bsv.json
|
@@ -344,6 +348,7 @@ files:
|
|
344
348
|
- grammars/source.cache.cmake.json
|
345
349
|
- grammars/source.cadence.json
|
346
350
|
- grammars/source.cairo.json
|
351
|
+
- grammars/source.cairo0.json
|
347
352
|
- grammars/source.camlp4.ocaml.json
|
348
353
|
- grammars/source.capnp.json
|
349
354
|
- grammars/source.cds.json
|
@@ -394,6 +399,7 @@ files:
|
|
394
399
|
- grammars/source.curlrc.json
|
395
400
|
- grammars/source.curry.json
|
396
401
|
- grammars/source.cwl.json
|
402
|
+
- grammars/source.cylc.json
|
397
403
|
- grammars/source.cypher.json
|
398
404
|
- grammars/source.cython.json
|
399
405
|
- grammars/source.d.json
|
@@ -424,6 +430,7 @@ files:
|
|
424
430
|
- grammars/source.dosbox-conf.json
|
425
431
|
- grammars/source.dot.json
|
426
432
|
- grammars/source.dotenv.json
|
433
|
+
- grammars/source.dune.json
|
427
434
|
- grammars/source.dylan.json
|
428
435
|
- grammars/source.earthfile.json
|
429
436
|
- grammars/source.ebnf.json
|
@@ -448,6 +455,7 @@ files:
|
|
448
455
|
- grammars/source.figctrl.json
|
449
456
|
- grammars/source.figfont.json
|
450
457
|
- grammars/source.firestore.json
|
458
|
+
- grammars/source.firrtl.json
|
451
459
|
- grammars/source.fish.json
|
452
460
|
- grammars/source.fnl.json
|
453
461
|
- grammars/source.fontdir.json
|
@@ -524,6 +532,7 @@ files:
|
|
524
532
|
- grammars/source.hx.type.json
|
525
533
|
- grammars/source.hxml.json
|
526
534
|
- grammars/source.hy.json
|
535
|
+
- grammars/source.iCalendar.json
|
527
536
|
- grammars/source.ice.json
|
528
537
|
- grammars/source.icurry.json
|
529
538
|
- grammars/source.ideal.json
|
@@ -575,6 +584,7 @@ files:
|
|
575
584
|
- grammars/source.kusto.json
|
576
585
|
- grammars/source.lark.json
|
577
586
|
- grammars/source.lbnf.json
|
587
|
+
- grammars/source.lcb.json
|
578
588
|
- grammars/source.lcov.json
|
579
589
|
- grammars/source.lean.json
|
580
590
|
- grammars/source.lean.markdown.json
|
@@ -587,6 +597,7 @@ files:
|
|
587
597
|
- grammars/source.lilypond.json
|
588
598
|
- grammars/source.lisp.json
|
589
599
|
- grammars/source.litcoffee.json
|
600
|
+
- grammars/source.livecodescript.json
|
590
601
|
- grammars/source.livescript.json
|
591
602
|
- grammars/source.llvm.json
|
592
603
|
- grammars/source.logos.json
|
@@ -596,6 +607,7 @@ files:
|
|
596
607
|
- grammars/source.lsl.json
|
597
608
|
- grammars/source.ltspice.symbol.json
|
598
609
|
- grammars/source.lua.json
|
610
|
+
- grammars/source.luau.json
|
599
611
|
- grammars/source.m2.json
|
600
612
|
- grammars/source.m4.json
|
601
613
|
- grammars/source.m68k.json
|
@@ -603,6 +615,7 @@ files:
|
|
603
615
|
- grammars/source.makefile.json
|
604
616
|
- grammars/source.makegen.json
|
605
617
|
- grammars/source.man-conf.json
|
618
|
+
- grammars/source.markdown.caddy.codeblock.json
|
606
619
|
- grammars/source.mask.json
|
607
620
|
- grammars/source.mata.json
|
608
621
|
- grammars/source.mathematica.json
|
@@ -663,6 +676,7 @@ files:
|
|
663
676
|
- grammars/source.ninja.json
|
664
677
|
- grammars/source.nit.json
|
665
678
|
- grammars/source.nix.json
|
679
|
+
- grammars/source.nr.json
|
666
680
|
- grammars/source.nsis.json
|
667
681
|
- grammars/source.nu.json
|
668
682
|
- grammars/source.nunjucks.json
|
@@ -704,6 +718,7 @@ files:
|
|
704
718
|
- grammars/source.pddl.happenings.json
|
705
719
|
- grammars/source.pddl.json
|
706
720
|
- grammars/source.pddl.plan.json
|
721
|
+
- grammars/source.peggy.json
|
707
722
|
- grammars/source.pegjs.json
|
708
723
|
- grammars/source.pep8.json
|
709
724
|
- grammars/source.perl.6.json
|
@@ -713,6 +728,7 @@ files:
|
|
713
728
|
- grammars/source.pig_latin.json
|
714
729
|
- grammars/source.pike.json
|
715
730
|
- grammars/source.pip-requirements.json
|
731
|
+
- grammars/source.pkl.json
|
716
732
|
- grammars/source.pli.json
|
717
733
|
- grammars/source.plist.json
|
718
734
|
- grammars/source.pnlgrp.json
|
@@ -724,6 +740,7 @@ files:
|
|
724
740
|
- grammars/source.postcss.json
|
725
741
|
- grammars/source.postscript.json
|
726
742
|
- grammars/source.pov-ray sdl.json
|
743
|
+
- grammars/source.powerbuilder.json
|
727
744
|
- grammars/source.powershell.json
|
728
745
|
- grammars/source.praat.json
|
729
746
|
- grammars/source.prisma.json
|
@@ -777,6 +794,7 @@ files:
|
|
777
794
|
- grammars/source.ring.json
|
778
795
|
- grammars/source.rmcobol.json
|
779
796
|
- grammars/source.roc.json
|
797
|
+
- grammars/source.ron.json
|
780
798
|
- grammars/source.rpg.json
|
781
799
|
- grammars/source.rpgle.json
|
782
800
|
- grammars/source.rpm-spec.json
|
@@ -840,8 +858,8 @@ files:
|
|
840
858
|
- grammars/source.talon.json
|
841
859
|
- grammars/source.tcl.json
|
842
860
|
- grammars/source.tea.json
|
861
|
+
- grammars/source.templ.json
|
843
862
|
- grammars/source.terra.json
|
844
|
-
- grammars/source.terraform.json
|
845
863
|
- grammars/source.textgrid.json
|
846
864
|
- grammars/source.textproto.json
|
847
865
|
- grammars/source.thrift.json
|
@@ -871,6 +889,7 @@ files:
|
|
871
889
|
- grammars/source.varnish.vcl.json
|
872
890
|
- grammars/source.vba.json
|
873
891
|
- grammars/source.vbnet.json
|
892
|
+
- grammars/source.vcard.json
|
874
893
|
- grammars/source.velocity.html.json
|
875
894
|
- grammars/source.velocity.json
|
876
895
|
- grammars/source.verilog.json
|
@@ -922,6 +941,7 @@ files:
|
|
922
941
|
- grammars/text.checksums.json
|
923
942
|
- grammars/text.codeowners.json
|
924
943
|
- grammars/text.conllu.json
|
944
|
+
- grammars/text.crontab.json
|
925
945
|
- grammars/text.dfy.dafny.json
|
926
946
|
- grammars/text.elixir.json
|
927
947
|
- grammars/text.eml.basic.json
|
@@ -953,6 +973,7 @@ files:
|
|
953
973
|
- grammars/text.html.javadoc.json
|
954
974
|
- grammars/text.html.js.json
|
955
975
|
- grammars/text.html.jsp.json
|
976
|
+
- grammars/text.html.jte.json
|
956
977
|
- grammars/text.html.liquid.json
|
957
978
|
- grammars/text.html.mako.json
|
958
979
|
- grammars/text.html.markdown.astro.json
|
@@ -982,6 +1003,7 @@ files:
|
|
982
1003
|
- grammars/text.log.latex.json
|
983
1004
|
- grammars/text.marko.json
|
984
1005
|
- grammars/text.md.json
|
1006
|
+
- grammars/text.mdx.astro.codeblock.json
|
985
1007
|
- grammars/text.muse.json
|
986
1008
|
- grammars/text.openbsd-pkg.desc.json
|
987
1009
|
- grammars/text.plain.json
|
@@ -1076,7 +1098,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1076
1098
|
- !ruby/object:Gem::Version
|
1077
1099
|
version: '0'
|
1078
1100
|
requirements: []
|
1079
|
-
rubygems_version: 3.5.
|
1101
|
+
rubygems_version: 3.5.11
|
1080
1102
|
signing_key:
|
1081
1103
|
specification_version: 4
|
1082
1104
|
summary: GitHub Language detection
|
@@ -1 +0,0 @@
|
|
1
|
-
{"scopeName":"inline.graphql.rb","patterns":[{"name":"taggedTemplates","contentName":"meta.embedded.block.graphql","begin":"(?=(?\u003e\u003c\u003c[-~](['\"]?)((?:[_\\w]+_|)GRAPHQL)\\b\\1))","end":"\\s*\\2$\\n?","patterns":[{"include":"source.graphql"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}}}]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"scopeName":"markdown.mcfunction.codeblock","patterns":[{"include":"#codeblock.outer"}],"repository":{"codeblock.inner":{"contentName":"meta.embedded.block.mcfunction","begin":"(^|\\G)","while":"(^|\\G)(?!\\s*([`~]{3,})\\s*$)","patterns":[{"include":"source.mcfunction"}]},"codeblock.outer":{"name":"markup.fenced_code.block.markdown","begin":"(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(mcfunction)((\\s+|:|\\{|\\?)[^`~]*)?$)","end":"(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$","patterns":[{"include":"#codeblock.inner"}],"beginCaptures":{"3":{"name":"punctuation.definition.markdown"},"4":{"name":"fenced_code.block.language.markdown"},"5":{"name":"fenced_code.block.language.attributes.markdown"}},"endCaptures":{"3":{"name":"punctuation.definition.markdown"}}}}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"scopeName":"mdx.LANGUAGE.codeblock","patterns":[{"include":"#LANGUAGE-code-block"}],"repository":{"LANGUAGE-code-block":{"name":"markup.code.other.mdx","end":"(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$","patterns":[{"contentName":"meta.embedded.block.LANGUAGE","begin":"(^|\\G)(\\s*)(.*)","while":"(^|\\G)(?!\\s*([`~]{3,})\\s*$)","patterns":[{}]}],"beginCaptures":{"3":{"name":"string.other.begin.code.fenced.mdx"},"4":{"name":"entity.name.function.mdx"}},"endCaptures":{"3":{"name":"string.other.end.code.fenced.mdx"}}}}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"name":"Terraform","scopeName":"source.terraform","patterns":[{"include":"#comments"},{"include":"#top_level_attribute_definition"},{"include":"#imports"},{"include":"#block"},{"include":"#expressions"}],"repository":{"attribute_access":{"begin":"\\.","end":"(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)|(\\*)|(\\d+)","beginCaptures":{"0":{"name":"keyword.operator.accessor.terraform"}},"endCaptures":{"1":{"name":"variable.other.member.terraform"},"2":{"name":"keyword.operator.splat.terraform"},"3":{"name":"constant.numeric.integer.terraform"}}},"block":{"name":"meta.type.terraform","begin":"(\\b(resource|provider|variable|output|locals|module|data|terraform)\\b|(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b))(?=[\\s\\\"\\-[:word:]]*(\\{))","end":"(?=\\{)","patterns":[{"name":"string.quoted.double.terraform","begin":"\\\"","end":"\\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.terraform"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.terraform"}}},{"name":"entity.name.label.terraform","match":"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"}],"beginCaptures":{"2":{"name":"storage.type.terraform"},"3":{"name":"entity.name.type.terraform"}}},"block_comments":{"name":"comment.block.terraform","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.terraform"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.terraform"}}},"brackets":{"begin":"\\[","end":"(\\*)?\\]","patterns":[{"include":"#comma"},{"include":"#comments"},{"include":"#expressions"},{"include":"#tuple_for_expression"}],"beginCaptures":{"0":{"name":"punctuation.section.brackets.begin.terraform"}},"endCaptures":{"0":{"name":"punctuation.section.brackets.end.terraform"},"1":{"name":"keyword.operator.splat.terraform"}}},"comma":{"name":"punctuation.separator.terraform","match":"\\,"},"comments":{"patterns":[{"include":"#inline_comments"},{"include":"#block_comments"}]},"expressions":{"patterns":[{"include":"#literal_values"},{"include":"#operators"},{"include":"#brackets"},{"include":"#objects"},{"include":"#attribute_access"},{"include":"#functions"},{"include":"#parens"}]},"functions":{"name":"meta.function-call.terraform","begin":"((abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)|\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b))(\\()","end":"\\)","patterns":[{"include":"#comments"},{"include":"#expressions"},{"include":"#comma"}],"beginCaptures":{"2":{"name":"support.function.builtin.terraform"},"3":{"name":"variable.function.terraform"},"4":{"name":"punctuation.section.parens.begin.terraform"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.terraform"}}},"heredoc":{"name":"string.unquoted.heredoc.terraform","begin":"(\\\u003c\\\u003c\\-?)\\s*(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)\\s*$","end":"^\\s*\\2\\s*$","patterns":[{"include":"#string_interpolation"}],"beginCaptures":{"1":{"name":"keyword.operator.heredoc.terraform"},"2":{"name":"keyword.control.heredoc.terraform"}},"endCaptures":{"0":{"name":"keyword.control.heredoc.terraform"}}},"imports":{"begin":"\\s*(terraform)\\s*(import)\\s*","end":"$\\n?","patterns":[{"include":"#string_literals"},{"name":"entity.name.label.terraform","match":"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"},{"include":"#numeric_literals"},{"include":"#attribute_access"}],"beginCaptures":{"1":{"name":"support.constant.terraform"},"2":{"name":"keyword.control.import.terraform"}}},"inline_comments":{"name":"comment.line.terraform","begin":"#|//","end":"$\n?","beginCaptures":{"0":{"name":"punctuation.definition.comment.terraform"}}},"language_constants":{"name":"constant.language.terraform","match":"\\b(true|false|null)\\b"},"literal_values":{"patterns":[{"include":"#numeric_literals"},{"include":"#language_constants"},{"include":"#string_literals"},{"include":"#heredoc"},{"include":"#type_keywords"},{"include":"#named_value_references"}]},"main":{"patterns":[{"include":"#comments"},{"include":"#block"},{"include":"#expressions"}]},"named_value_references":{"name":"support.constant.terraform","match":"\\b(var|local|module|data|path|terraform)\\b"},"numeric_literals":{"patterns":[{"name":"constant.numeric.float.terraform","match":"\\b\\d+(([Ee][+-]?))\\d+\\b","captures":{"1":{"name":"punctuation.separator.exponent.terraform"}}},{"name":"constant.numeric.float.terraform","match":"\\b\\d+(\\.)\\d+(?:(([Ee][+-]?))\\d+)?\\b","captures":{"1":{"name":"punctuation.separator.decimal.terraform"},"2":{"name":"punctuation.separator.exponent.terraform"}}},{"name":"constant.numeric.integer.terraform","match":"\\b\\d+\\b"}]},"object_for_expression":{"begin":"\\bfor\\b","end":"(?=\\})","patterns":[{"name":"storage.type.function.terraform","match":"\\=\\\u003e"},{"name":"keyword.operator.word.terraform","match":"\\bin\\b"},{"name":"keyword.control.conditional.terraform","match":"\\bif\\b"},{"name":"keyword.operator.terraform","match":"\\:"},{"include":"#expressions"},{"include":"#comments"},{"include":"#comma"},{"name":"variable.other.readwrite.terraform","match":"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"}],"beginCaptures":{"0":{"name":"keyword.control.terraform"}}},"object_key_values":{"patterns":[{"include":"#comments"},{"include":"#expressions"}]},"objects":{"name":"meta.braces.terraform","begin":"\\{","end":"\\}","patterns":[{"include":"#object_for_expression"},{"include":"#comments"},{"begin":"\\s*(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)\\s*(\\=)\\s*","end":"((\\,)|($\\n?)|(?=\\}))","patterns":[{"include":"#object_key_values"}],"beginCaptures":{"1":{"name":"meta.mapping.key.terraform string.unquoted.terraform"},"2":{"name":"keyword.operator.terraform"}},"endCaptures":{"1":{"name":"punctuation.separator.terraform"},"3":{"name":"punctuation.section.braces.end.terraform"}}},{"begin":"((\\\").*(\\\"))\\s*(\\=)\\s*","end":"((\\,)|($\\n?)|(?=\\}))","patterns":[{"include":"#object_key_values"}],"beginCaptures":{"1":{"name":"meta.mapping.key.terraform string.quoted.double.terraform"},"2":{"name":"punctuation.definition.string.begin.terraform"},"3":{"name":"punctuation.definition.string.end.terraform"},"4":{"name":"keyword.operator.terraform"}},"endCaptures":{"1":{"name":"punctuation.separator.terraform"},"3":{"name":"punctuation.section.braces.end.terraform"}}},{"name":"meta.mapping.key.terraform","begin":"\\(","end":"(\\))\\s*(\\=)\\s*","patterns":[{"include":"#expressions"}],"beginCaptures":{"0":{"name":"punctuation.section.parens.begin.terraform"}},"endCaptures":{"1":{"name":"punctuation.section.parens.end.terraform"},"2":{"name":"keyword.operator.terraform"}}},{"patterns":[{"include":"#main"}]}],"beginCaptures":{"0":{"name":"punctuation.section.braces.begin.terraform"}},"endCaptures":{"0":{"name":"punctuation.section.braces.end.terraform"}}},"operators":{"patterns":[{"name":"keyword.operator.terraform","match":"\\\u003e\\="},{"name":"keyword.operator.terraform","match":"\\\u003c\\="},{"name":"keyword.operator.terraform","match":"\\=\\="},{"name":"keyword.operator.terraform","match":"\\!\\="},{"name":"keyword.operator.arithmetic.terraform","match":"\\+"},{"name":"keyword.operator.arithmetic.terraform","match":"\\-"},{"name":"keyword.operator.arithmetic.terraform","match":"\\*"},{"name":"keyword.operator.arithmetic.terraform","match":"\\/"},{"name":"keyword.operator.arithmetic.terraform","match":"\\%"},{"name":"keyword.operator.logical.terraform","match":"\\\u0026\\\u0026"},{"name":"keyword.operator.logical.terraform","match":"\\|\\|"},{"name":"keyword.operator.logical.terraform","match":"\\!"},{"name":"keyword.operator.terraform","match":"\\\u003e"},{"name":"keyword.operator.terraform","match":"\\\u003c"},{"name":"keyword.operator.terraform","match":"\\?"},{"name":"keyword.operator.terraform","match":"\\.\\.\\."},{"name":"keyword.operator.terraform","match":"\\:"}]},"parens":{"begin":"\\(","end":"\\)","patterns":[{"include":"#expressions"},{"name":"variable.other.readwrite.terraform","match":"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"}],"beginCaptures":{"0":{"name":"punctuation.section.parens.begin.terraform"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.terraform"}}},"string_interpolation":{"name":"meta.interpolation.terraform","begin":"(\\$|\\%)\\{","end":"\\}","patterns":[{"name":"keyword.operator.template.left.trim.terraform","match":"\\~\\s"},{"name":"keyword.operator.template.right.trim.terraform","match":"\\s\\~"},{"name":"keyword.control.terraform","match":"\\b(if|else|endif|for|in|endfor)\\b"},{"include":"#expressions"}],"beginCaptures":{"0":{"name":"keyword.other.interpolation.begin.terraform"}},"endCaptures":{"0":{"name":"keyword.other.interpolation.end.terraform"}}},"string_literals":{"name":"string.quoted.double.terraform","begin":"\"","end":"\"","patterns":[{"include":"#string_interpolation"},{"name":"constant.character.escape.terraform","match":"\\\\[nrt\"\\\\]|\\\\u([[:xdigit:]]{8}|[[:xdigit:]]{4})"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.terraform"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.terraform"}}},"top_level_attribute_definition":{"name":"variable.declaration.terraform","match":"(\\()?(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)(\\))?\\s*(\\=[^\\=|\\\u003e])\\s*","captures":{"1":{"name":"punctuation.section.parens.begin.terraform"},"2":{"name":"variable.other.readwrite.terraform"},"3":{"name":"punctuation.section.parens.end.terraform"},"4":{"name":"keyword.operator.assignment.terraform"}}},"tuple_for_expression":{"begin":"\\bfor\\b","end":"(?=\\])","patterns":[{"name":"keyword.operator.word.terraform","match":"\\bin\\b"},{"name":"keyword.control.conditional.terraform","match":"\\bif\\b"},{"name":"keyword.operator.terraform","match":"\\:"},{"include":"#expressions"},{"include":"#comments"},{"include":"#comma"},{"name":"variable.other.readwrite.terraform","match":"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"}],"beginCaptures":{"0":{"name":"keyword.control.terraform"}}},"type_keywords":{"name":"storage.type.terraform","match":"\\b(any|string|number|bool)\\b"}}}
|