Add syntax highlighting for YANG data modeling language

Authored by dhaumann on Jul 25 2017, 8:15 AM.

Description

Add syntax highlighting for YANG data modeling language

Thanks to Nicolás Alvarez for the patch!

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.

Differential Revision: https://phabricator.kde.org/D5788

Details

Committed
dhaumannJul 25 2017, 8:15 AM
Differential Revision
D5788: Add syntax highlighting for YANG data modeling language
Parents
R216:f5b765e90eeb: PHP: Add PHP 7 keywords
Branches
Unknown
Tags
Unknown