main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
727 bytes
|
Line | |
---|
1 | Prism.languages.birb = Prism.languages.extend('clike', {
|
---|
2 | 'string': {
|
---|
3 | pattern: /r?("|')(?:\\.|(?!\1)[^\\])*\1/,
|
---|
4 | greedy: true
|
---|
5 | },
|
---|
6 | 'class-name': [
|
---|
7 | /\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,
|
---|
8 |
|
---|
9 | // matches variable and function return types (parameters as well).
|
---|
10 | /\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/
|
---|
11 | ],
|
---|
12 | 'keyword': /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,
|
---|
13 | 'operator': /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,
|
---|
14 | 'variable': /\b[a-z_]\w*\b/,
|
---|
15 | });
|
---|
16 |
|
---|
17 | Prism.languages.insertBefore('birb', 'function', {
|
---|
18 | 'metadata': {
|
---|
19 | pattern: /<\w+>/,
|
---|
20 | greedy: true,
|
---|
21 | alias: 'symbol'
|
---|
22 | }
|
---|
23 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.