3854
|
1 " Vim syntax file
|
|
2 " Language: dts/dtsi (device tree files)
|
|
3 " Maintainer: Daniel Mack <vim@zonque.org>
|
5425
|
4 " Last Change: 2013 Oct 20
|
3854
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 syntax region dtsComment start="/\*" end="\*/"
|
|
11 syntax match dtsReference "&[[:alpha:][:digit:]_]\+"
|
|
12 syntax region dtsBinaryProperty start="\[" end="\]"
|
|
13 syntax match dtsStringProperty "\".*\""
|
5425
|
14 syntax match dtsKeyword "/.\{-1,\}/"
|
3854
|
15 syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:"
|
4264
|
16 syntax match dtsNode /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1
|
3854
|
17 syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment
|
|
18 syntax region dtsCommentInner start="/\*" end="\*/"
|
5425
|
19 syntax match dtsCommentLine "//.*$"
|
3854
|
20
|
|
21 hi def link dtsCellProperty Number
|
|
22 hi def link dtsBinaryProperty Number
|
|
23 hi def link dtsStringProperty String
|
|
24 hi def link dtsKeyword Include
|
|
25 hi def link dtsLabel Label
|
4229
|
26 hi def link dtsNode Structure
|
3854
|
27 hi def link dtsReference Macro
|
|
28 hi def link dtsComment Comment
|
|
29 hi def link dtsCommentInner Comment
|
5425
|
30 hi def link dtsCommentLine Comment
|