-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore unknown directives #27
Comments
Yeah ... sadly this is tricky, because zeekscript has to work with what the tree-sitter parser feeds it, and the parser struggles with that line. It's actually a cool example because this is the first time I see nested error nodes:
zeekscript's current handling of One way or another, the double I think the btest scenario is tough because it can jump so wildly through implicit languages. BIFs look straightforward by comparison. It would be cool to see how/whether one could write that via layering on top of the existing grammar.js file — I'm optimistic since it's all just JavaScript. |
Are there cases where one cannot put BTest instructions in comments? I am wondering whether it would be worthwhile to add support for BTest instructions with default |
Take testing/btest/language/alternate-prototypes-deprecated-args.zeek from zeek/zeek. When reformatting, we get:
I realize that this isn't a Zeek script per se, it's a btest. But I'm wondering if we should ignore unknown directives, as the current behavior will break what it doesn't understand.
Or perhaps we make an exception and add the btest-provided directives.
Reason being is that it seems like it'd be handy to format Zeek code in btests in a similar way to other Zeek code.
The text was updated successfully, but these errors were encountered: