D5788: Add syntax highlighting for YANG data modeling language
    Nicolás Alvarez 
    noreply at phabricator.kde.org
       
    Tue May  9 16:17:44 UTC 2017
    
    
  
nalvarez created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
  Add syntax highlighting for YANG data modeling language, based on yang.vim <http://www.yang-central.org/twiki/pub/Main/YangTools/yang.vim>.
  
  Improvements from yang.vim:
  
  - Character escapes such as `\n` in `"foo\nbar"` are highlighted in a different color
  - `'foo\'bar'` is highlighted correctly (string ends at first `'` regardless of backslash). yang.vim wrongly interprets `\\` and `\'` as escapes in single-quoted strings.
  
  Regressions from yang.vim (which I may fix later):
  
  - Numbers don't have special highlighting and look like normal text.
  - "Dates" and "lengths" don't have special highlighting and look like normal strings.
  
  I also don't highlight identifiers starting with `xml` as an error (which yang.vim does), but it seems like that's a YANG 1.0 restriction that was removed in YANG 1.1.
  
  //Also// the XML code ended up unreadable with little whitespace. Hit me with that in code review.
TEST PLAN
  Manually tested with random samples copied from the RFC, comparing the result between Vim and KWrite. However those can't be used as test cases for licensing reasons. Perhaps @jkt can provide a usable test file?
REPOSITORY
  R216 Syntax Highlighting
BRANCH
  master
REVISION DETAIL
  https://phabricator.kde.org/D5788
AFFECTED FILES
  data/syntax/yang.xml
To: nalvarez, #kate, jkt
Cc: jkt, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170509/fad23df8/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list