-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
source.pogoscript.js
53 lines (51 loc) · 1.43 KB
/
source.pogoscript.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
// 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: ['.pogo'],
names: ['pogoscript'],
patterns: [
{match: '[(){}@]', name: 'variable.language.pogoscript'},
{match: '\\b[0-9]+\\b', name: 'constant.numeric.pogoscript'},
{match: '//[^\\n]*', name: 'comment.line.double-slash.pogoscript'},
{begin: '/\\*', end: '\\*/', name: 'comment.block.pogoscript'},
{match: '=>|[.:?!;,=]|self', name: 'keyword'},
{match: '\\t', name: 'invalid'},
{
begin: "'",
end: "'",
name: 'string.quoted.single.pogoscript',
patterns: [{match: '\\\\.', name: 'constant.character.escape.pogoscript'}]
},
{
begin: 'r/',
end: '/[gim]?',
name: 'string.regexp.pogoscript',
patterns: [{match: '\\\\.', name: 'constant.character.escape.pogoscript'}]
},
{
begin: '"',
end: '"',
name: 'string.quoted.double.pogoscript',
patterns: [{include: '#interpolated'}]
}
],
repository: {
interpolated: {
patterns: [
{
begin: '#\\(',
end: '\\)',
name: 'source.pogoscript',
patterns: [{include: 'source.pogoscript'}]
}
]
}
},
scopeName: 'source.pogoscript'
}
export default grammar