-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathjava-properties.tmLanguage.json
More file actions
89 lines (89 loc) · 3.27 KB
/
java-properties.tmLanguage.json
File metadata and controls
89 lines (89 loc) · 3.27 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"information_for_contributors": [
"This file was referenced from https://github.com/microsoft/vscode/blob/master/extensions/ini/syntaxes/ini.tmLanguage.json",
"This file has been edited to fit the needs for java.properties syntax highlighting"
],
"name": "Java Properties",
"scopeName": "source.java-properties",
"patterns": [
{
"comment": "Matching for comments that start with #",
"begin": "(^[ \\t]+)?(?=#)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.java-properties"
}
},
"end": "(?!\\G)",
"patterns": [
{
"begin": "#",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.java-properties"
}
},
"end": "\\n",
"name": "comment.line.number-sign.java-properties"
}
]
},
{
"comment": "Matching for property keys",
"captures": {
"1": {
"name": "keyword.other.definition.java-properties"
},
"4": {
"name": "punctuation.separator.key-value.java-properties"
}
},
"match": "^\\s*([\\/a-zA-Z0-9%_.-]+)\\s*(?=[=\\\\])"
},
{
"comment": "Matching the equals sign and property value",
"begin": "=",
"end": "(?<!\\\\)\\n",
"patterns": [
{
"include": "#numbers"
}
]
},
{
"comment": "Matching for section (text enclosed between square brackets [])",
"captures": {
"1": {
"name": "punctuation.definition.entity.java-properties"
},
"4": {
"name": "punctuation.definition.entity.java-properties"
}
},
"match": "^(\\[)(.*?)(\\])",
"name": "entity.name.section.group-title.java-properties"
}
],
"repository": {
"numbers": {
"patterns": [
{
"match": "(?x)\n\\b(?<!\\$)\n0(x|X)\n(\n (?<!\\.)[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[Ll]?(?!\\.)\n |\n (\n [0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?\\.?\n |\n ([0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?)?\\.[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?\n )\n [Pp][+-]?[0-9]([0-9_]*[0-9])?[FfDd]?\n)\n\\b(?!\\$)",
"name": "constant.numeric.hex.java-properties"
},
{
"match": "\\b(?<!\\$)0(b|B)[01]([01_]*[01])?[Ll]?\\b(?!\\$)",
"name": "constant.numeric.binary.java-properties"
},
{
"match": "\\b(?<!\\$)0[0-7]([0-7_]*[0-7])?[Ll]?\\b(?!\\$)",
"name": "constant.numeric.octal.java-properties"
},
{
"match": "(?x)\n(?<!\\$)\n(\n \\b[0-9]([0-9_]*[0-9])?\\.\\B(?!\\.)\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([Ee][+-]?[0-9]([0-9_]*[0-9])?)[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]\\b\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([0-9]([0-9_]*[0-9])?)([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]?\\b\n |\n (?<!\\.)\\B\\.[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]\\b\n |\n \\b(0|[1-9]([0-9_]*[0-9])?)(?!\\.)[Ll]?\\b\n)\n(?!\\$)",
"name": "constant.numeric.decimal.java-properties"
}
]
}
}
}