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

Adds support for lexing the argument encoding bitmap (presence bits). #897

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Jun 28, 2024

Description of changes:

This will be used basically as follows:

  1. The application-level reader will advance the IonCursorBinary to the next token. The cursor conveys that it is positioned on a macro invocation.
  2. The application-level reader retrieves the macro address from the cursor and retrieves the signature. If the signature requires an AEB, It initializes a PresenceBitmap (see Adds PresenceBitmap #895) from the signature.
  3. If it has a PresenceBitmap, the reader calls the cursor's fillArgumentEncodingBitmap (added in this PR), providing the result of PresenceBitmap.byteSize(). This ensures the AEB byte(s) are buffered in a byte[] and allows the reader to retrieve the start and end indices.
  4. The reader calls PresenceBitmap.readFrom(), providing the buffer and AEB start index accessible in the cursor.
  5. The reader continues using the macro signature to manipulate the cursor accordingly.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tgregg tgregg requested a review from popematt June 28, 2024 00:29
Base automatically changed from reorder-f5-id-and-length to ion-11-encoding June 28, 2024 20:02
@tgregg tgregg merged commit f3b8148 into ion-11-encoding Jul 2, 2024
15 checks passed
@tgregg tgregg deleted the binary-cursor-aeb branch July 2, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants