Skip to content
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

Formatting of ipv6 addresses broken #70

Open
bbannier opened this issue Jan 4, 2024 · 0 comments
Open

Formatting of ipv6 addresses broken #70

bbannier opened this issue Jan 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bbannier
Copy link
Member

bbannier commented Jan 4, 2024

The grammar currently uses a narrower definition than Zeek for what is accepted as an ipv6 address, https://github.com/zeek/tree-sitter-zeek/blob/b1fdab493110b542a9deabecf911d8a148649fc2/grammar.js#L328-L335, in particular it doesn't seem to fully implement RFC5952. This breaks working code, e.g.,

# Original.
print type_name([ff00::]); # Prints 'addr'.
# After formatting.
print type_name([ ff00:: ]); # error in foo.zeek, line 1: unknown identifier ff00, at or near "ff00"
@bbannier bbannier added the bug Something isn't working label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant