-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
source.click.js
72 lines (70 loc) · 2.12 KB
/
source.click.js
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
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
extensions: ['.click'],
names: ['click'],
patterns: [
{
match: '\\b(\\d{1,3}\\.){3}\\d{1,3}\\b',
name: 'constant.other.ipv4.click'
},
{
match: '\\b(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}\\b',
name: 'constant.other.ipv6.click'
},
{
match: '\\b(?:[a-fA-F0-9]{1,2}:){5}[a-fA-F0-9]{1,2}\\b',
name: 'constant.other.eth.click'
},
{
captures: {
1: {name: 'constant.numeric.click'},
2: {name: 'constant.numeric.click'}
},
match: '\\b([0-9a-fA-F]+)/([0-9a-fA-F]+)\\b'
},
{match: '\\b[\\+-]?\\d+(\\.?\\d+)?\\b', name: 'constant.numeric.click'},
{match: '\\b0x[0-9a-fA-F]+\\b', name: 'constant.numeric.click'},
{
match: '\\b(define|input|library|output|read|require|write)\\b',
name: 'keyword.other.click'
},
{
captures: {
1: {name: 'storage.type.class.click'},
2: {name: 'entity.name.type.class.click'}
},
match: '\\b(elementclass)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)'
},
{match: '->', name: 'keyword.operator.click'},
{
begin: '"',
beginCaptures: {0: {name: 'punctuation.definition.string.begin.click'}},
end: '"',
endCaptures: {0: {name: 'punctuation.definition.string.end.click'}},
name: 'string.quoted.double.click'
},
{
match: '[\\b]*\\$[_]*[a-zA-Z][_a-zA-Z0-9]*\\b',
name: 'variable.language.click'
},
{match: '\\/\\/.*', name: 'comment.click'},
{
captures: {2: {name: 'entity.name.type.instance.click'}},
match: '(::)?\\s*(\\w+)\\s*\\('
},
{
captures: {1: {name: 'entity.name.type.instance.click'}},
match: '::\\s*(\\w+)'
},
{captures: {1: {name: 'constant.language.click'}}, match: ',\\s*(-)'},
{match: '\\b(no|false|true|yes)\\b', name: 'constant.language.click'}
],
scopeName: 'source.click'
}
export default grammar