source: node_modules/refractor/lang/yang.js

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