-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
51 lines (47 loc) · 1.4 KB
/
constants.py
File metadata and controls
51 lines (47 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
"language": {
"tsrepo": "repo_clone_url",
"file_ext": ".lang$"
}
"""
wsyntree_langs = {
"javascript": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-javascript.git",
"file_ext": "(?<!(\.min))\.js$", # no .min.js
},
"python": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-python.git",
"file_ext": "\.py$",
},
"rust": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-rust.git",
"file_ext": "\.rs$",
},
"ruby": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-ruby.git",
"file_ext": "\.rb$",
},
"c_sharp": { # name in compiled language uses underscore
"tsrepo": "https://github.com/tree-sitter/tree-sitter-c-sharp.git",
"file_ext": "\.cs$",
},
"c": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-c.git",
"file_ext": "\.(c|h)$",
},
"cpp": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-cpp.git",
"file_ext": "\.(cpp|hpp|c\+\+|h\+\+|cc|hh|cxx|hxx)$"
},
"go": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-go.git",
"file_ext": "\.go$",
},
"java": {
"tsrepo": "https://github.com/tree-sitter/tree-sitter-java.git",
"file_ext": "\.java$",
}
}
wsyntree_file_to_lang = {}
for k,v in wsyntree_langs.items():
wsyntree_file_to_lang[v['file_ext']] = k