joelspadin / tree-sitter-devicetree

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

Define comment syntax rule ahead of node identifier #3

Closed nickcoutsos closed 2 years ago

nickcoutsos commented 2 years ago

Hi @joelspadin

This is my attempt at dealing with #2, not sure if I'm going about it correctly but I thought if you aren't too focused on the project right now I can try to get things rolling. The actual code change was just making sure that the comment rules are processed first so that they aren't hidden. I've also modified an existing test to include whitespace-less comment to demonstrate.