-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
source.quake.js
44 lines (42 loc) · 1.08 KB
/
source.quake.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
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed `bsd-3-clause`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
extensions: [],
names: ['quake'],
patterns: [
{
match:
'\\b(and|contains|else|end|for|foreach|if|in|is|local|not|or|proc|readonly|return)\\b',
name: 'keyword.quake'
},
{match: '\\b[0-9]+\\b', name: 'constant.numeric.integer.quake'},
{match: '%.*$', name: 'comment.line.percentage.quake'},
{include: '#block_comment'},
{
begin: '"',
end: '"',
name: 'string.quoted.double.quake',
patterns: [
{
match: '\\\\[0-7]{3}|\\\\[\\\\fnrt\\"\\\']',
name: 'constant.character.escape.quake'
}
]
}
],
repository: {
block_comment: {
begin: '\\/\\*',
end: '\\*\\/',
name: 'comment.block.quake',
patterns: [{include: '#block_comment'}]
}
},
scopeName: 'source.quake'
}
export default grammar