From 9aba34e86c10e6427fd8cdf1d2f5af0aa681e490 Mon Sep 17 00:00:00 2001 From: Luca Burelli Date: Fri, 2 May 2025 18:44:46 +0200 Subject: [PATCH] dts.pest: Add support for comments in devicetree source files This commit adds support for comments in devicetree source files by extending the existing parser grammar. The COMMENTS syntax is taken verbatim from a Pest example at https://pest.rs/book/grammars/syntax.html . Signed-off-by: Luca Burelli --- zephyr-build/src/devicetree/dts.pest | 1 + 1 file changed, 1 insertion(+) diff --git a/zephyr-build/src/devicetree/dts.pest b/zephyr-build/src/devicetree/dts.pest index 5db1b95f..b665abc7 100644 --- a/zephyr-build/src/devicetree/dts.pest +++ b/zephyr-build/src/devicetree/dts.pest @@ -75,3 +75,4 @@ nodename = @{ } WHITESPACE = _{ " " | "\r" | "\n" | "\t" } +COMMENT = _{ "/*" ~ (!"*/" ~ ANY)* ~ "*/" }