main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | /*
|
---|
| 2 | Language: Leaf
|
---|
| 3 | Author: Hale Chan <halechan@qq.com>
|
---|
| 4 | Description: Based on the Leaf reference from https://vapor.github.io/documentation/guide/leaf.html.
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | function leaf(hljs) {
|
---|
| 8 | return {
|
---|
| 9 | name: 'Leaf',
|
---|
| 10 | contains: [
|
---|
| 11 | {
|
---|
| 12 | className: 'function',
|
---|
| 13 | begin: '#+' + '[A-Za-z_0-9]*' + '\\(',
|
---|
| 14 | end: / \{/,
|
---|
| 15 | returnBegin: true,
|
---|
| 16 | excludeEnd: true,
|
---|
| 17 | contains: [
|
---|
| 18 | {
|
---|
| 19 | className: 'keyword',
|
---|
| 20 | begin: '#+'
|
---|
| 21 | },
|
---|
| 22 | {
|
---|
| 23 | className: 'title',
|
---|
| 24 | begin: '[A-Za-z_][A-Za-z_0-9]*'
|
---|
| 25 | },
|
---|
| 26 | {
|
---|
| 27 | className: 'params',
|
---|
| 28 | begin: '\\(',
|
---|
| 29 | end: '\\)',
|
---|
| 30 | endsParent: true,
|
---|
| 31 | contains: [
|
---|
| 32 | {
|
---|
| 33 | className: 'string',
|
---|
| 34 | begin: '"',
|
---|
| 35 | end: '"'
|
---|
| 36 | },
|
---|
| 37 | {
|
---|
| 38 | className: 'variable',
|
---|
| 39 | begin: '[A-Za-z_][A-Za-z_0-9]*'
|
---|
| 40 | }
|
---|
| 41 | ]
|
---|
| 42 | }
|
---|
| 43 | ]
|
---|
| 44 | }
|
---|
| 45 | ]
|
---|
| 46 | };
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | module.exports = leaf;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.