From 4273088e40c21bffe449fc13bfc2a8d760c3dc7d Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 21 Nov 2022 08:24:23 +0300 Subject: 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. --- lib/lexers/devicetree.tes | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/lexers/devicetree.tes (limited to 'lib/lexers/devicetree.tes') 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] +} -- cgit v1.2.3