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:
492 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | Prism.languages.yang = {
|
---|
| 2 | // https://tools.ietf.org/html/rfc6020#page-34
|
---|
| 3 | // http://www.yang-central.org/twiki/bin/view/Main/YangExamples
|
---|
| 4 | 'comment': /\/\*[\s\S]*?\*\/|\/\/.*/,
|
---|
| 5 | 'string': {
|
---|
| 6 | pattern: /"(?:[^\\"]|\\.)*"|'[^']*'/,
|
---|
| 7 | greedy: true
|
---|
| 8 | },
|
---|
| 9 | 'keyword': {
|
---|
| 10 | pattern: /(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,
|
---|
| 11 | lookbehind: true
|
---|
| 12 | },
|
---|
| 13 | 'namespace': {
|
---|
| 14 | pattern: /(\s)[a-z_][\w.-]*(?=:)/i,
|
---|
| 15 | lookbehind: true
|
---|
| 16 | },
|
---|
| 17 | 'boolean': /\b(?:false|true)\b/,
|
---|
| 18 | 'operator': /\+/,
|
---|
| 19 | 'punctuation': /[{};:]/
|
---|
| 20 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.