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:
884 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = birb
|
---|
4 | birb.displayName = 'birb'
|
---|
5 | birb.aliases = []
|
---|
6 | function birb(Prism) {
|
---|
7 | Prism.languages.birb = Prism.languages.extend('clike', {
|
---|
8 | string: {
|
---|
9 | pattern: /r?("|')(?:\\.|(?!\1)[^\\])*\1/,
|
---|
10 | greedy: true
|
---|
11 | },
|
---|
12 | 'class-name': [
|
---|
13 | /\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/, // matches variable and function return types (parameters as well).
|
---|
14 | /\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/
|
---|
15 | ],
|
---|
16 | keyword:
|
---|
17 | /\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/,
|
---|
18 | operator: /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,
|
---|
19 | variable: /\b[a-z_]\w*\b/
|
---|
20 | })
|
---|
21 | Prism.languages.insertBefore('birb', 'function', {
|
---|
22 | metadata: {
|
---|
23 | pattern: /<\w+>/,
|
---|
24 | greedy: true,
|
---|
25 | alias: 'symbol'
|
---|
26 | }
|
---|
27 | })
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.