github-linguist 7.4.0 → 7.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/grammars/annotation.liquidhaskell.haskell.json +15 -4
- data/grammars/hint.haskell.json +15 -4
- data/grammars/hint.message.haskell.json +15 -4
- data/grammars/hint.type.haskell.json +15 -4
- data/grammars/source.abap.json +14 -3
- data/grammars/source.apl.json +19 -2
- data/grammars/source.ats.json +17 -87
- data/grammars/source.ballerina.json +14 -19
- data/grammars/source.crystal.json +14 -2
- data/grammars/source.csound.json +37 -0
- data/grammars/source.css.json +25 -1
- data/grammars/source.css.scss.json +1724 -0
- data/grammars/source.gf.json +51 -0
- data/grammars/source.glsl.json +1 -1
- data/grammars/source.hack.json +2523 -0
- data/grammars/source.haskell.json +15 -4
- data/grammars/source.hc.json +709 -0
- data/grammars/source.hsig.json +15 -4
- data/grammars/source.hx.json +10 -6
- data/grammars/source.jolie.json +1 -1
- data/grammars/source.julia.json +114 -6
- data/grammars/source.m68k.json +412 -0
- data/grammars/source.mcfunction.json +62 -18
- data/grammars/source.objectscript.json +309 -0
- data/grammars/source.objectscript_class.json +674 -0
- data/grammars/source.objectscript_csp.json +19 -0
- data/grammars/source.objectscript_macros.json +226 -0
- data/grammars/source.powershell.json +21 -57
- data/grammars/source.rust.json +1 -1
- data/grammars/source.sass.json +836 -142
- data/grammars/source.sassdoc.json +346 -0
- data/grammars/source.scala.json +110 -10
- data/grammars/source.sqf.json +2 -1
- data/grammars/source.svelte.json +827 -0
- data/grammars/source.ts.json +8 -4
- data/grammars/source.tsql.json +507 -0
- data/grammars/source.tsx.json +8 -4
- data/grammars/source.viml.json +1 -1
- data/grammars/source.vtt.json +702 -0
- data/grammars/source.wollok.json +100 -0
- data/grammars/source.xojo.json +85 -0
- data/grammars/source.yara.json +3 -2
- data/grammars/source.zeek.json +412 -0
- data/grammars/source.zenscript.json +282 -0
- data/grammars/source.zig.json +2 -11
- data/grammars/text.haml.json +1 -1
- data/grammars/text.html.php.blade.json +3 -3
- data/grammars/text.html.vue.json +41 -1
- data/grammars/text.slim.json +1 -1
- data/grammars/text.tex.latex.haskell.json +15 -4
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +5 -10
- data/lib/linguist/generated.rb +10 -2
- data/lib/linguist/heuristics.yml +14 -3
- data/lib/linguist/language.rb +3 -2
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +151 -16
- data/lib/linguist/samples.json +9844 -1711
- data/lib/linguist/samples.rb +8 -5
- data/lib/linguist/shebang.rb +6 -0
- data/lib/linguist/vendor.yml +3 -0
- metadata +25 -10
- data/grammars/source.bro.json +0 -403
- data/grammars/source.scss.json +0 -1287
data/lib/linguist/samples.rb
CHANGED
@@ -17,12 +17,15 @@ module Linguist
|
|
17
17
|
# Path for serialized samples db
|
18
18
|
PATH = File.expand_path('../samples.json', __FILE__)
|
19
19
|
|
20
|
-
# Hash of serialized samples object
|
20
|
+
# Hash of serialized samples object, cached in memory
|
21
21
|
def self.cache
|
22
|
-
@cache ||=
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
@cache ||= load_samples
|
23
|
+
end
|
24
|
+
|
25
|
+
# Hash of serialized samples object, uncached
|
26
|
+
def self.load_samples
|
27
|
+
serializer = defined?(Yajl) ? Yajl : YAML
|
28
|
+
serializer.load(File.read(PATH, encoding: 'utf-8'))
|
26
29
|
end
|
27
30
|
|
28
31
|
# Public: Iterate over each sample.
|
data/lib/linguist/shebang.rb
CHANGED
@@ -58,6 +58,12 @@ module Linguist
|
|
58
58
|
script = $1
|
59
59
|
end
|
60
60
|
|
61
|
+
# osascript can be called with an optional `-l <language>` argument, which may not be a language with an interpreter.
|
62
|
+
# In this case, return and rely on the subsequent strategies to determine the language.
|
63
|
+
if script == 'osascript'
|
64
|
+
return if s.scan_until(/\-l\s?/)
|
65
|
+
end
|
66
|
+
|
61
67
|
File.basename(script)
|
62
68
|
end
|
63
69
|
end
|
data/lib/linguist/vendor.yml
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: 7.
|
4
|
+
version: 7.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: charlock_holmes
|
@@ -39,19 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: mini_mime
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rugged
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -293,7 +293,6 @@ files:
|
|
293
293
|
- grammars/source.boo.json
|
294
294
|
- grammars/source.brightauthorproject.json
|
295
295
|
- grammars/source.brightscript.json
|
296
|
-
- grammars/source.bro.json
|
297
296
|
- grammars/source.bsl.json
|
298
297
|
- grammars/source.bsv.json
|
299
298
|
- grammars/source.c++.json
|
@@ -333,6 +332,7 @@ files:
|
|
333
332
|
- grammars/source.css.less.json
|
334
333
|
- grammars/source.css.mss.json
|
335
334
|
- grammars/source.css.postcss.sugarss.json
|
335
|
+
- grammars/source.css.scss.json
|
336
336
|
- grammars/source.csx.json
|
337
337
|
- grammars/source.cuda-c++.json
|
338
338
|
- grammars/source.curlrc.json
|
@@ -384,6 +384,7 @@ files:
|
|
384
384
|
- grammars/source.gdbregs.json
|
385
385
|
- grammars/source.gdscript.json
|
386
386
|
- grammars/source.gerber.json
|
387
|
+
- grammars/source.gf.json
|
387
388
|
- grammars/source.gfm.json
|
388
389
|
- grammars/source.gitattributes.json
|
389
390
|
- grammars/source.gitconfig.json
|
@@ -398,9 +399,11 @@ files:
|
|
398
399
|
- grammars/source.graphql.json
|
399
400
|
- grammars/source.groovy.gradle.json
|
400
401
|
- grammars/source.groovy.json
|
402
|
+
- grammars/source.hack.json
|
401
403
|
- grammars/source.haproxy-config.json
|
402
404
|
- grammars/source.harbour.json
|
403
405
|
- grammars/source.haskell.json
|
406
|
+
- grammars/source.hc.json
|
404
407
|
- grammars/source.hgignore.json
|
405
408
|
- grammars/source.hlsl.json
|
406
409
|
- grammars/source.hql.json
|
@@ -459,6 +462,7 @@ files:
|
|
459
462
|
- grammars/source.ltspice.symbol.json
|
460
463
|
- grammars/source.lua.json
|
461
464
|
- grammars/source.m4.json
|
465
|
+
- grammars/source.m68k.json
|
462
466
|
- grammars/source.makefile.json
|
463
467
|
- grammars/source.makegen.json
|
464
468
|
- grammars/source.man-conf.json
|
@@ -503,6 +507,10 @@ files:
|
|
503
507
|
- grammars/source.objc++.json
|
504
508
|
- grammars/source.objc.json
|
505
509
|
- grammars/source.objc.platform.json
|
510
|
+
- grammars/source.objectscript.json
|
511
|
+
- grammars/source.objectscript_class.json
|
512
|
+
- grammars/source.objectscript_csp.json
|
513
|
+
- grammars/source.objectscript_macros.json
|
506
514
|
- grammars/source.ocaml.json
|
507
515
|
- grammars/source.ocamllex.json
|
508
516
|
- grammars/source.ocamlyacc.json
|
@@ -578,12 +586,12 @@ files:
|
|
578
586
|
- grammars/source.rust.json
|
579
587
|
- grammars/source.sas.json
|
580
588
|
- grammars/source.sass.json
|
589
|
+
- grammars/source.sassdoc.json
|
581
590
|
- grammars/source.scad.json
|
582
591
|
- grammars/source.scala.json
|
583
592
|
- grammars/source.scaml.json
|
584
593
|
- grammars/source.scheme.json
|
585
594
|
- grammars/source.scilab.json
|
586
|
-
- grammars/source.scss.json
|
587
595
|
- grammars/source.sdbl.json
|
588
596
|
- grammars/source.sed.json
|
589
597
|
- grammars/source.shaderlab.json
|
@@ -605,6 +613,7 @@ files:
|
|
605
613
|
- grammars/source.strings.json
|
606
614
|
- grammars/source.stylus.json
|
607
615
|
- grammars/source.supercollider.json
|
616
|
+
- grammars/source.svelte.json
|
608
617
|
- grammars/source.swift.json
|
609
618
|
- grammars/source.systemverilog.json
|
610
619
|
- grammars/source.tcl.json
|
@@ -617,6 +626,7 @@ files:
|
|
617
626
|
- grammars/source.toc.json
|
618
627
|
- grammars/source.toml.json
|
619
628
|
- grammars/source.ts.json
|
629
|
+
- grammars/source.tsql.json
|
620
630
|
- grammars/source.tsx.json
|
621
631
|
- grammars/source.turing.json
|
622
632
|
- grammars/source.turtle.json
|
@@ -629,17 +639,20 @@ files:
|
|
629
639
|
- grammars/source.verilog.json
|
630
640
|
- grammars/source.vhdl.json
|
631
641
|
- grammars/source.viml.json
|
642
|
+
- grammars/source.vtt.json
|
632
643
|
- grammars/source.vyper.json
|
633
644
|
- grammars/source.wavefront.mtl.json
|
634
645
|
- grammars/source.wavefront.obj.json
|
635
646
|
- grammars/source.wdl.json
|
636
647
|
- grammars/source.webassembly.json
|
637
648
|
- grammars/source.webidl.json
|
649
|
+
- grammars/source.wollok.json
|
638
650
|
- grammars/source.x10.json
|
639
651
|
- grammars/source.x86.json
|
640
652
|
- grammars/source.x86asm.json
|
641
653
|
- grammars/source.xc.json
|
642
654
|
- grammars/source.xlfd.json
|
655
|
+
- grammars/source.xojo.json
|
643
656
|
- grammars/source.xq.json
|
644
657
|
- grammars/source.xtend.json
|
645
658
|
- grammars/source.yaml-ext.json
|
@@ -649,6 +662,8 @@ files:
|
|
649
662
|
- grammars/source.yara.json
|
650
663
|
- grammars/source.yasnippet.json
|
651
664
|
- grammars/source.zap.json
|
665
|
+
- grammars/source.zeek.json
|
666
|
+
- grammars/source.zenscript.json
|
652
667
|
- grammars/source.zig.json
|
653
668
|
- grammars/source.zil.json
|
654
669
|
- grammars/text.bibtex.json
|
@@ -777,7 +792,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
777
792
|
version: '0'
|
778
793
|
requirements: []
|
779
794
|
rubyforge_project:
|
780
|
-
rubygems_version: 2.
|
795
|
+
rubygems_version: 2.6.14
|
781
796
|
signing_key:
|
782
797
|
specification_version: 4
|
783
798
|
summary: GitHub Language detection
|
data/grammars/source.bro.json
DELETED
@@ -1,403 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "Bro",
|
3
|
-
"scopeName": "source.bro",
|
4
|
-
"patterns": [
|
5
|
-
{
|
6
|
-
"include": "#directives"
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"name": "string.quoted.double.bro",
|
10
|
-
"begin": "\"",
|
11
|
-
"end": "\"",
|
12
|
-
"patterns": [
|
13
|
-
{
|
14
|
-
"include": "#string_escaped_char"
|
15
|
-
},
|
16
|
-
{
|
17
|
-
"include": "#string_placeholder"
|
18
|
-
}
|
19
|
-
],
|
20
|
-
"beginCaptures": {
|
21
|
-
"0": {
|
22
|
-
"name": "punctuation.definition.string.begin.bro"
|
23
|
-
}
|
24
|
-
},
|
25
|
-
"endCaptures": {
|
26
|
-
"0": {
|
27
|
-
"name": "punctuation.definition.string.end.bro"
|
28
|
-
}
|
29
|
-
}
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"name": "string.quoted.regexp.bro",
|
33
|
-
"begin": "(?\u003c=in|\\=|,|\\()\\s*(/)",
|
34
|
-
"end": "(?\u003c!\\\\)/",
|
35
|
-
"patterns": [
|
36
|
-
{
|
37
|
-
"include": "#string_escaped_char"
|
38
|
-
},
|
39
|
-
{
|
40
|
-
"include": "#string_placeholder"
|
41
|
-
}
|
42
|
-
],
|
43
|
-
"beginCaptures": {
|
44
|
-
"0": {
|
45
|
-
"name": "punctuation.definition.string.begin.bro"
|
46
|
-
}
|
47
|
-
},
|
48
|
-
"endCaptures": {
|
49
|
-
"0": {
|
50
|
-
"name": "punctuation.definition.string.end.bro"
|
51
|
-
}
|
52
|
-
}
|
53
|
-
},
|
54
|
-
{
|
55
|
-
"name": "meta.function.bro",
|
56
|
-
"match": "^\\s*(function|hook|event)\\s+((?:(?:[a-zA-Z_][0-9a-zA-Z_]*)(?:::))?[0-9a-zA-Z_]+)\\s+\\((?:([a-zA-Z0-9_]+), ([a-zA-Z0-9_]+))*\\)(?:\\s*:\\s*([a-zA-Z0-9_]+))",
|
57
|
-
"patterns": [
|
58
|
-
{
|
59
|
-
"include": "#types"
|
60
|
-
},
|
61
|
-
{
|
62
|
-
"include": "#attributes"
|
63
|
-
},
|
64
|
-
{
|
65
|
-
"include": "#operator"
|
66
|
-
},
|
67
|
-
{
|
68
|
-
"include": "#constants"
|
69
|
-
}
|
70
|
-
],
|
71
|
-
"captures": {
|
72
|
-
"1": {
|
73
|
-
"name": "storage.type.function.bro"
|
74
|
-
},
|
75
|
-
"2": {
|
76
|
-
"name": "entity.name.function.bro"
|
77
|
-
},
|
78
|
-
"3": {
|
79
|
-
"name": "variable.parameter.bro"
|
80
|
-
},
|
81
|
-
"4": {
|
82
|
-
"name": "storage.type.bro"
|
83
|
-
}
|
84
|
-
}
|
85
|
-
},
|
86
|
-
{
|
87
|
-
"name": "comment.line.number-sign.bro",
|
88
|
-
"begin": "#",
|
89
|
-
"end": "$",
|
90
|
-
"beginCaptures": {
|
91
|
-
"0": {
|
92
|
-
"name": "punctuation.definition.comment.bro"
|
93
|
-
}
|
94
|
-
}
|
95
|
-
},
|
96
|
-
{
|
97
|
-
"include": "#builtin-functions"
|
98
|
-
},
|
99
|
-
{
|
100
|
-
"include": "#statements"
|
101
|
-
},
|
102
|
-
{
|
103
|
-
"include": "#declarations"
|
104
|
-
},
|
105
|
-
{
|
106
|
-
"include": "#attributes"
|
107
|
-
},
|
108
|
-
{
|
109
|
-
"include": "#constants"
|
110
|
-
},
|
111
|
-
{
|
112
|
-
"include": "#types"
|
113
|
-
},
|
114
|
-
{
|
115
|
-
"include": "#operator"
|
116
|
-
}
|
117
|
-
],
|
118
|
-
"repository": {
|
119
|
-
"attributes": {
|
120
|
-
"patterns": [
|
121
|
-
{
|
122
|
-
"name": "storage.modifier.bro",
|
123
|
-
"match": "\u0026(redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|group|error_handler|type_column)"
|
124
|
-
}
|
125
|
-
]
|
126
|
-
},
|
127
|
-
"builtin-functions": {
|
128
|
-
"patterns": [
|
129
|
-
{
|
130
|
-
"name": "meta.function-call.bro.bif.bro",
|
131
|
-
"match": "(?\u003c!\\$)\\b(active_file|addr_to_counts|addr_to_ptr_name|all_set|anonymize_addr|any_set|bro_is_terminating|bro_version|bytestring_to_count|bytestring_to_double|bytestring_to_hexstr|calc_next_rotate|capture_events|capture_state_updates|cat|cat_sep|checkpoint_state|clear_table|close|complete_handshake|connect|connection_exists|continue_processing|convert_for_pattern|count_to_port|count_to_v4_addr|counts_to_v4_addr|counts_to_addr|current_analyzer|current_time|decode_base64|decode_base64_custom|disable_analyzer|disable_print_hook|disconnect|do_profiling|double_to_count|double_to_interval|double_to_time|dump_current_packet|dump_packet|dump_rule_stats|enable_communication|enable_raw_output|encode_base64|encode_base64_custom|entropy_test_add|entropy_test_finish|entropy_test_init|enum_to_int|exit|exp|file_magic|file_mode|file_size|find_entropy|floor|flush_all|fmt|get_conn_transport_proto|get_current_packet|get_event_peer|get_file_name|get_local_event_peer|get_matcher_stats|get_port_transport_proto|getenv|gethostname|getpid|global_ids|global_sizes|hexstr_to_bytestring|identify_data|install_dst_addr_filter|install_dst_net_filter|install_pcap_filter|install_src_addr_filter|install_src_net_filter|int_to_count|interval_to_double|interval_to_int|is_external_connection|is_icmp_port|is_local_interface|is_remote_event|is_tcp_port|is_udp_port|is_v4_addr|is_v6_addr|listen|ln|log10|lookup_ID|lookup_addr|lookup_asn|lookup_connection|lookup_hostname|lookup_hostname_txt|lookup_location|mask_addr|match_signatures|md5_hash|md5_hash_finish|md5_hash_init|md5_hash_update|md5_hmac|merge_pattern|mkdir|net_stats|network_time|open|open_for_append|order|pcap_error|piped_exec|port_to_count|precompile_pcap_filter|preserve_prefix|preserve_subnet|ptr_name_to_addr|rand|raw_bytes_to_v4_addr|reading_live_traffic|record_fields|record_type_to_vector|remask_addr|request_remote_events|request_remote_logs|request_remote_sync|rescan_state|resize|resource_usage|resume_state_updates|rotate_file|rotate_file_by_name|routing0_data_to_addrs|same_object|send_capture_filter|send_current_packet|send_id|send_ping|send_state|set_accept_state|set_buf|set_compression_level|set_inactivity_timeout|set_record_packets|setenv|sha1_hash|sha1_hash_finish|sha1_hash_init|sha1_hash_update|sha256_hash|sha256_hash_finish|sha256_hash_init|sha256_hash_update|skip_further_processing|sort|sqrt|srand|strftime|string_to_pattern|strptime|suspend_processing|suspend_state_updates|syslog|system|system_env|terminate|terminate_communication|time_to_double|to_addr|to_count|to_double|to_int|to_port|to_subnet|type_name|uninstall_dst_addr_filter|uninstall_dst_net_filter|uninstall_src_addr_filter|uninstall_src_net_filter|unique_id|unique_id_from|uuid_to_string|val_size|write_file)\\s*(?=\\()",
|
132
|
-
"captures": {
|
133
|
-
"1": {
|
134
|
-
"name": "support.function.builtin.bro"
|
135
|
-
}
|
136
|
-
}
|
137
|
-
},
|
138
|
-
{
|
139
|
-
"name": "meta.function-call.strings.bif.bro",
|
140
|
-
"match": "(?\u003c!\\$)\\b(cat_string_array|cat_string_array_n|clean|edit|escape_string|find_all|find_last|gsub|hexdump|is_ascii|join_string_array|join_string_vec|levenshtein_distance|reverse|sort_string_array|split|split1|split_all|split_n|str_shell_escape|str_smith_waterman|str_split|strcmp|string_cat|string_fill|string_to_ascii_hex|strip|strstr|sub|sub_bytes|subst_string|to_lower|to_string_literal|to_upper)(?=\\()",
|
141
|
-
"captures": {
|
142
|
-
"1": {
|
143
|
-
"name": "support.function.builtin.bro"
|
144
|
-
}
|
145
|
-
}
|
146
|
-
},
|
147
|
-
{
|
148
|
-
"name": "meta.function-call.reporter.bif.bro",
|
149
|
-
"match": "(?\u003c!\\$)\\b(Reporter::(?:error|fatal|info|warning))(?=\\()",
|
150
|
-
"captures": {
|
151
|
-
"1": {
|
152
|
-
"name": "support.function.builtin.bro"
|
153
|
-
}
|
154
|
-
}
|
155
|
-
},
|
156
|
-
{
|
157
|
-
"name": "meta.event-call.event.bif.bro",
|
158
|
-
"match": "(?\u003c!\\$)\\b(OS_version_found|ack_above_hole|bro_done|bro_init|bro_script_loaded|conn_stats|conn_weird|connection_external|connection_flow_label_changed|connection_reused|connection_state_remove|connection_status_update|connection_timeout|content_gap|dns_mapping_altered|dns_mapping_lost_name|dns_mapping_new_name|dns_mapping_unverified|dns_mapping_valid|esp_packet|event_queue__flush_point|file_gap|file_new|file_opened|file_over_new_connection|file_state_remove|file_timeout|finished_send_state|flow_weird|gap_report|get_file_handle|ipv6_ext_headers|load_sample|mobile_ipv6_message|net_weird|new_connection|new_event|new_packet|packet_contents|profiling_update|protocol_confirmation|protocol_violation|remote_capture_filter|remote_connection_closed|remote_connection_error|remote_connection_established|remote_connection_handshake_done|remote_event_registered|remote_log|remote_log_peer|remote_pong|remote_state_access_performed|remote_state_inconsistency|reporter_error|reporter_info|reporter_warning|rexmit_inconsistency|scheduled_analyzer_applied|signature_match|software_parse_error|software_unparsed_version_found|software_version_found|tunnel_changed|udp_session_done)\\s*(?=\\()",
|
159
|
-
"captures": {
|
160
|
-
"1": {
|
161
|
-
"name": "support.function.builtin.bro"
|
162
|
-
}
|
163
|
-
}
|
164
|
-
},
|
165
|
-
{
|
166
|
-
"name": "meta.event-call.deprecated.bro",
|
167
|
-
"match": "(?\u003c!\\$)\\b(anonymization_mapping|gaobot_signature_found|kazaa_signature_found|napster_signature_found|print_hook|root_backdoor_signature_found|rotate_interval|rotate_size)(?=\\()",
|
168
|
-
"captures": {
|
169
|
-
"1": {
|
170
|
-
"name": "invalid.deprecated.bro"
|
171
|
-
}
|
172
|
-
}
|
173
|
-
}
|
174
|
-
]
|
175
|
-
},
|
176
|
-
"constants": {
|
177
|
-
"patterns": [
|
178
|
-
{
|
179
|
-
"name": "constant.other.subnet.bro",
|
180
|
-
"match": "\\b((25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])/(3[0-2]|[1-2]?[0-9])\\b"
|
181
|
-
},
|
182
|
-
{
|
183
|
-
"name": "constant.other.subnet6.bro",
|
184
|
-
"match": "\\[(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\]/(12[0-8]|1[0-1][0-9]|[1-2]?[0-9]|[0-9][0-9])"
|
185
|
-
},
|
186
|
-
{
|
187
|
-
"name": "constant.other.ip.bro",
|
188
|
-
"match": "(?\u003c!::)\\b((25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])\\b(?!/)"
|
189
|
-
},
|
190
|
-
{
|
191
|
-
"name": "constant.other.ip6.bro",
|
192
|
-
"match": "\\[(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\](?!/)"
|
193
|
-
},
|
194
|
-
{
|
195
|
-
"name": "constant.other.port.bro",
|
196
|
-
"match": "\\b((6[0-5]{2}[0-3][0-5]|[1-5]?[0-9]{1,4})/(tcp|udp|icmp))\\b"
|
197
|
-
},
|
198
|
-
{
|
199
|
-
"name": "constant.other.interval.bro",
|
200
|
-
"match": "\\b((\\s*-?)([0-9]+)\\s?((sec|min|hr|day)s?))\\b"
|
201
|
-
},
|
202
|
-
{
|
203
|
-
"name": "constant.numeric.double.bro",
|
204
|
-
"match": "(?\u003c![0-9])(\\s*-?)\\.\\b([0-9]*)\\b(?!\\.)|(?\u003c!\\.)(\\s*-?)\\b([0-9]+\\.[0-9]+)\\b(?!\\.)"
|
205
|
-
},
|
206
|
-
{
|
207
|
-
"name": "constant.numeric.integer.hexadecimal.bro",
|
208
|
-
"match": "\\b(0(x|X)[0-9a-fA-F]+)\\b"
|
209
|
-
},
|
210
|
-
{
|
211
|
-
"name": "constant.numeric.integer.decimal.bro",
|
212
|
-
"match": "(?\u003c!\\.|:)(\\s*-?)\\b([0-9]+)\\b(?!\\.|:|/|\\s((sec|min|day)s?))"
|
213
|
-
},
|
214
|
-
{
|
215
|
-
"name": "constant.language.boolean.bro",
|
216
|
-
"match": "\\b(T|F)\\b"
|
217
|
-
}
|
218
|
-
]
|
219
|
-
},
|
220
|
-
"declarations": {
|
221
|
-
"patterns": [
|
222
|
-
{
|
223
|
-
"name": "keyword.control.import.bro",
|
224
|
-
"match": "^\\s*(module)\\s+([a-zA-Z_][0-9a-zA-Z_-]*)",
|
225
|
-
"captures": {
|
226
|
-
"2": {
|
227
|
-
"name": "storage.modifier.namespace.bro"
|
228
|
-
}
|
229
|
-
}
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"name": "keyword.control.export.bro",
|
233
|
-
"match": "\\b(export)\\b"
|
234
|
-
},
|
235
|
-
{
|
236
|
-
"name": "storage.modifier.declaration.bro",
|
237
|
-
"match": "\\b(type|const|global|local|redef|function|event|hook)\\b"
|
238
|
-
}
|
239
|
-
]
|
240
|
-
},
|
241
|
-
"directives": {
|
242
|
-
"patterns": [
|
243
|
-
{
|
244
|
-
"name": "meta.preprocessor.bro",
|
245
|
-
"begin": "^\\s*(\\@(?:load|load-sigs|unload))\\s+(.*)\\b",
|
246
|
-
"end": "$",
|
247
|
-
"captures": {
|
248
|
-
"1": {
|
249
|
-
"name": "keyword.control.import.bro"
|
250
|
-
},
|
251
|
-
"2": {
|
252
|
-
"name": "meta.definition.bro"
|
253
|
-
}
|
254
|
-
}
|
255
|
-
},
|
256
|
-
{
|
257
|
-
"name": "meta.preprocessor.bro",
|
258
|
-
"begin": "^\\s*(\\@prefixes)\\s+(=|\\+=)\\s+([a-zA-Z_][0-9a-zA-Z_-]+)\\b",
|
259
|
-
"end": "$",
|
260
|
-
"captures": {
|
261
|
-
"1": {
|
262
|
-
"name": "keyword.control.def.bro"
|
263
|
-
},
|
264
|
-
"2": {
|
265
|
-
"name": "keyword.operator.assignment.bro"
|
266
|
-
},
|
267
|
-
"3": {
|
268
|
-
"name": "text.plain.bro"
|
269
|
-
}
|
270
|
-
}
|
271
|
-
},
|
272
|
-
{
|
273
|
-
"name": "meta.preprocessor.bro",
|
274
|
-
"match": "^\\s*(\\@)(if|ifdef|ifndef|else|endif)\\b",
|
275
|
-
"captures": {
|
276
|
-
"1": {
|
277
|
-
"name": "keyword.other.directive.bro"
|
278
|
-
},
|
279
|
-
"2": {
|
280
|
-
"name": "keyword.control.directive.bro"
|
281
|
-
}
|
282
|
-
}
|
283
|
-
},
|
284
|
-
{
|
285
|
-
"name": "meta.preprocessor.bro",
|
286
|
-
"match": "(\\@DEBUG|\\@DIR|\\@FILENAME)",
|
287
|
-
"captures": {
|
288
|
-
"1": {
|
289
|
-
"name": "constant.other.placeholder.bro"
|
290
|
-
}
|
291
|
-
}
|
292
|
-
}
|
293
|
-
]
|
294
|
-
},
|
295
|
-
"generic_names": {
|
296
|
-
"match": "[A-Za-z_][A-Za-z0-9_]*"
|
297
|
-
},
|
298
|
-
"illegal_names": {
|
299
|
-
"patterns": [
|
300
|
-
{
|
301
|
-
"name": "invalid.illegal.name.type.bro",
|
302
|
-
"match": "(bool|int|count|double|time|interval|string|pattern|enum|port|addr|subnet|any|table|set|vector|record|opaque|file|function|event|hook)"
|
303
|
-
}
|
304
|
-
]
|
305
|
-
},
|
306
|
-
"operator": {
|
307
|
-
"patterns": [
|
308
|
-
{
|
309
|
-
"name": "keyword.operator.bro",
|
310
|
-
"match": "\\b(of)\\b"
|
311
|
-
},
|
312
|
-
{
|
313
|
-
"name": "keyword.operator.logical.bro",
|
314
|
-
"match": "(\\!|\u0026\u0026|\\|\\||\\b(in)\\b)"
|
315
|
-
},
|
316
|
-
{
|
317
|
-
"name": "keyword.operator.comparison.bro",
|
318
|
-
"match": "(\u003c|\u003c\\=|\u003e\\=|\u003e|\\=\\=|\\!\\=)"
|
319
|
-
},
|
320
|
-
{
|
321
|
-
"name": "keyword.operator.assignment.augmented.bro",
|
322
|
-
"match": "(\\+\\=|-\\=|\\*\\=|/\\=)"
|
323
|
-
},
|
324
|
-
{
|
325
|
-
"name": "keyword.operator.increment-decrement.bro",
|
326
|
-
"match": "(\\+\\+|\\-\\-)"
|
327
|
-
},
|
328
|
-
{
|
329
|
-
"name": "keyword.operator.arithmetic.bro",
|
330
|
-
"match": "(\\+|\\-|\\*|/|%)(?!\\+|\\-)"
|
331
|
-
},
|
332
|
-
{
|
333
|
-
"name": "keyword.operator.assignment.bro",
|
334
|
-
"match": "(\\=)"
|
335
|
-
},
|
336
|
-
{
|
337
|
-
"name": "keyword.operator.length.bro",
|
338
|
-
"match": "(?\u003c!\\|)(\\|)(?!\\|)"
|
339
|
-
}
|
340
|
-
]
|
341
|
-
},
|
342
|
-
"statements": {
|
343
|
-
"patterns": [
|
344
|
-
{
|
345
|
-
"name": "keyword.control.flow.bro",
|
346
|
-
"match": "\\b(add|delete|print|for|next|break|if|else|switch|case|default|break|fallthrough|when|timeout|schedule|return)\\b"
|
347
|
-
}
|
348
|
-
]
|
349
|
-
},
|
350
|
-
"string_escaped_char": {
|
351
|
-
"patterns": [
|
352
|
-
{
|
353
|
-
"name": "constant.character.escape.bro",
|
354
|
-
"match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{0,2}|[4-7]\\d?|x[a-fA-F0-9]{0,2})"
|
355
|
-
},
|
356
|
-
{
|
357
|
-
"name": "constant.character.escape.bro",
|
358
|
-
"match": "\\\\(\\\\|[/\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\-])"
|
359
|
-
},
|
360
|
-
{
|
361
|
-
"name": "invalid.illegal.unknown-escape.bro",
|
362
|
-
"match": "\\\\."
|
363
|
-
}
|
364
|
-
]
|
365
|
-
},
|
366
|
-
"string_placeholder": {
|
367
|
-
"patterns": [
|
368
|
-
{
|
369
|
-
"name": "constant.other.placeholder.bro",
|
370
|
-
"match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n\t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n\t\t\t\t\t"
|
371
|
-
},
|
372
|
-
{
|
373
|
-
"name": "invalid.illegal.placeholder.bro",
|
374
|
-
"match": "%"
|
375
|
-
}
|
376
|
-
]
|
377
|
-
},
|
378
|
-
"types": {
|
379
|
-
"patterns": [
|
380
|
-
{
|
381
|
-
"name": "storage.type.bro",
|
382
|
-
"match": "\\b(bool|count|int|double|time|interval|string|pattern|port|addr|subnet|time|enum|record|function|event|hook|file|opaque|any)\\b"
|
383
|
-
},
|
384
|
-
{
|
385
|
-
"name": "invalid.deprecated.type.bro",
|
386
|
-
"match": "\\b(addr_set|addr_vec|any_vec|count_set|id_table|index_vec|record_field_table|string_array|string_set|string_vec|sw_substring_vec|table_string_of_string)\\b"
|
387
|
-
},
|
388
|
-
{
|
389
|
-
"name": "storage.type.bro",
|
390
|
-
"match": "\\bset\\s*\\[\\s*[a-zA-Z_][0-9a-zA-Z_-]+\\s*\\]"
|
391
|
-
},
|
392
|
-
{
|
393
|
-
"name": "storage.type.bro",
|
394
|
-
"match": "\\b(table|set)\\s*\\[\\s*[a-zA-Z_][0-9a-zA-Z_-]+\\s*\\]\\s+of\\s+"
|
395
|
-
},
|
396
|
-
{
|
397
|
-
"name": "storage.type.bro",
|
398
|
-
"match": "\\b(opaque|vector)\\s+of\\s+[a-zA-Z_][0-9a-zA-Z_-]+\\s*"
|
399
|
-
}
|
400
|
-
]
|
401
|
-
}
|
402
|
-
}
|
403
|
-
}
|