Warning, /frameworks/syntax-highlighting/autotests/folding/highlight.yang.fold is written in an unsupported language. File is not indexed.
0001 // from: https://en.wikipedia.org/w/index.php?title=YANG&oldid=792171830#Example
0002 module example-sports <beginfold id='1'>{</beginfold id='1'>
0003
0004 namespace "http://example.com/example-sports";
0005 prefix sports;
0006
0007 import ietf-yang-types <beginfold id='1'>{</beginfold id='1'> prefix yang; <endfold id='1'>}</endfold id='1'>
0008
0009 typedef season <beginfold id='1'>{</beginfold id='1'>
0010 type string;
0011 description
0012 "The name of a sports season, including the type and the year, e.g,
0013 'Champions League 2014/2015'.";
0014 <endfold id='1'>}</endfold id='1'>
0015
0016 container sports <beginfold id='1'>{</beginfold id='1'>
0017 config true;
0018
0019 list person <beginfold id='1'>{</beginfold id='1'>
0020 key name;
0021 leaf name <beginfold id='1'>{</beginfold id='1'> type string; <endfold id='1'>}</endfold id='1'>
0022 leaf birthday <beginfold id='1'>{</beginfold id='1'> type yang:date-and-time; mandatory true; <endfold id='1'>}</endfold id='1'>
0023 <endfold id='1'>}</endfold id='1'>
0024
0025 list team <beginfold id='1'>{</beginfold id='1'>
0026 key name;
0027 leaf name <beginfold id='1'>{</beginfold id='1'> type string; <endfold id='1'>}</endfold id='1'>
0028 list player <beginfold id='1'>{</beginfold id='1'>
0029 key "name season";
0030 unique number;
0031 leaf name <beginfold id='1'>{</beginfold id='1'> type leafref <beginfold id='1'>{</beginfold id='1'> path "/sports/person/name"; <endfold id='1'>}</endfold id='1'> <endfold id='1'>}</endfold id='1'>
0032 leaf season <beginfold id='1'>{</beginfold id='1'> type season; <endfold id='1'>}</endfold id='1'>
0033 leaf number <beginfold id='1'>{</beginfold id='1'> type uint16; mandatory true; <endfold id='1'>}</endfold id='1'>
0034 leaf scores <beginfold id='1'>{</beginfold id='1'> type uint16; default 0; <endfold id='1'>}</endfold id='1'>
0035 <endfold id='1'>}</endfold id='1'>
0036 <endfold id='1'>}</endfold id='1'>
0037 <endfold id='1'>}</endfold id='1'>
0038 <endfold id='1'>}</endfold id='1'>