joelspadin / tree-sitter-devicetree

Tree-sitter grammar for Devicetree files
MIT License
28 stars 5 forks source link

Support `#include` directives in nodes #11

Closed mskelton closed 10 months ago

mskelton commented 10 months ago

Re-opening #8

I'm using this for a Kinesis advantage 360 keyboard which uses ZMK. It is possible to use #include directives inside of nodes so that you can write code like this:

/ {
  behaviors {
    #include "macros.dtsi"
  };
  keymap {
    ...
  }
}
joelspadin commented 10 months ago

Thanks!