diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2022-11-21 08:24:23 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2022-11-21 08:24:23 +0300 |
commit | 4273088e40c21bffe449fc13bfc2a8d760c3dc7d (patch) | |
tree | b6a59c6f52782f2578269135ce188e105ab1eadc /lib/lexers/devicetree.tes | |
parent | 84c7190a7a1fb9a1edd387abfafa141b7c8d4b7b (diff) | |
download | sciteco-4273088e40c21bffe449fc13bfc2a8d760c3dc7d.tar.gz |
added lexers for Python and Linux Device Trees
* The device tree lexer reuses CPP and has certain limitations.
For once it does not recognize /keywords/ and secondly it confuses
properties beginning with # as preprocessor statements.
Diffstat (limited to 'lib/lexers/devicetree.tes')
-rw-r--r-- | lib/lexers/devicetree.tes | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/lexers/devicetree.tes b/lib/lexers/devicetree.tes new file mode 100644 index 0000000..7551458 --- /dev/null +++ b/lib/lexers/devicetree.tes @@ -0,0 +1,25 @@ +!* + * Linux device tree files + * + * Limitations: + * - Keywords like /dts-v1/ cannot be highlighted. + * - Properties beginning with `#` are highlighted like preprocessor statements. + *! + +@[lexer.test.devicetree]{ + :EN*.dtsQ*"S -1 ' + :EN*.dtsiQ* +} + +@[lexer.set.devicetree]{ + ESSETILEXERcpp + :M[color.comment],1M[color.set] + :M[color.comment],2M[color.set] + :M[color.comment],3M[color.set] + :M[color.number],4M[color.set] + :M[color.keyword],5M[color.set] + :M[color.string],6M[color.set] + :M[color.string2],7M[color.set] + :M[color.preproc],9M[color.set] + :M[color.operator],10M[color.set] +} |