You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue here is that zeekygen_next_comment is an extras node which can appear anywhere. Since enums always contain a redundant enum_body (which corresponds to nothing in the source), Tree-sitter opts to inserts the comment before the body instead of inside the body before the first element, so the comment is not a sibling of the value it documents. One fix for this would be to omit enum_body from the grammar or at least the CST so we more directly reflect what is in the source.
The text was updated successfully, but these errors were encountered:
In order to extract docstrings over in https://github.com/bbannier/zeek-language-server I check for any direct previous siblings which are
zeekygen_next_comment
. This breaks for e.g., enums, see bbannier/zeek-language-server#87.The issue here is that
zeekygen_next_comment
is anextras
node which can appear anywhere. Since enums always contain a redundantenum_body
(which corresponds to nothing in the source), Tree-sitter opts to inserts the comment before the body instead of inside the body before the first element, so the comment is not a sibling of the value it documents. One fix for this would be to omitenum_body
from the grammar or at least the CST so we more directly reflect what is in the source.The text was updated successfully, but these errors were encountered: