-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
source.camlp4.ocaml.js
47 lines (45 loc) · 1.33 KB
/
source.camlp4.ocaml.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
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed permissive.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
dependencies: ['source.ocaml'],
extensions: [],
names: [],
patterns: [
{
begin: '(\\[<)(?=.*?>])',
beginCaptures: {1: {name: 'punctuation.definition.camlp4-stream.ocaml'}},
end: '(?=>])',
endCaptures: {1: {name: 'punctuation.definition.camlp4-stream.ocaml'}},
name: 'meta.camlp4-stream.ocaml',
patterns: [{include: '#camlpppp-streams'}]
},
{match: '\\[<|>]', name: 'punctuation.definition.camlp4-stream.ocaml'},
{
match: '\\bparser\\b|<(<|:)|>>|\\$(:|\\${0,1})',
name: 'keyword.other.camlp4.ocaml'
}
],
repository: {
'camlpppp-streams': {
patterns: [
{
begin: "(')",
beginCaptures: {
1: {name: 'punctuation.definition.camlp4.simple-element.ocaml'}
},
end: "(;)(?=\\s*')|(?=\\s*>])",
endCaptures: {1: {name: 'punctuation.separator.camlp4.ocaml'}},
name: 'meta.camlp4-stream.element.ocaml',
patterns: [{include: 'source.ocaml'}]
}
]
}
},
scopeName: 'source.camlp4.ocaml'
}
export default grammar