-
Notifications
You must be signed in to change notification settings - Fork 38
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
Provide meaningful unit __begin
value when parsing starts.
#1650
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to recall if there was a reason for the current behavior. This is actually documented even, see https://docs.zeek.org/projects/spicy/en/latest/programming/language/types.html#method-unit::offset and other random access functions. So we will need to update the documentation at least.
Good question. This docstring seems to have existed before we introduced the new explicit tracking of the offset value, but the parse methods still allow for parsing without specifying the a begin so it seems possible that it could still unset. I'll investigate. |
4bfb770
to
1c98d02
Compare
We previously would not provide `__begin` when starting the initial parse. This meant that e.g., `offset()` was not usable if nothing ever got parsed. With this patch we provide a meaningful value now. Closes #1648.
The originally documented caveats do not apply anymore, so remove them.
3b8d5f4
to
ddd7535
Compare
We previously would not provide
__begin
when starting the initial parse. This meant that e.g.,offset()
was not usable if nothing ever got parsed.With this patch we provide a meaningful value now.
Closes #1648.