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 implementations of repeat, make_field, and make_blob #972

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

popematt
Copy link
Contributor

Issue #, if available:

None

Description of changes:

  • Adds implementations of make_field, make_blob and repeat.
  • Both make_field and repeat need to be able to track some state over their evaluation, so I added a field to ExpansionInfo that Expanders can use for that purpose rather than having to create a pool of various Expander instances.
  • There are a few drive-by fixes
    • in MacroEvaluator, updated MakeStringExpander and MakeSymbolExpander to not accept null, as per the spec.
    • in MacroEvaluatorTest, updated comments to have the (%x) syntax for argument expansion.

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

@popematt popematt requested a review from tgregg October 14, 2024 18:25
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 14 lines in your changes missing coverage. Please review.

Please upload report for BASE (ion-11-encoding@257ecfe). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...n/java/com/amazon/ion/impl/macro/MacroEvaluator.kt 77.77% 9 Missing and 5 partials ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##             ion-11-encoding     #972   +/-   ##
==================================================
  Coverage                   ?   70.36%           
  Complexity                 ?     7028           
==================================================
  Files                      ?      200           
  Lines                      ?    27634           
  Branches                   ?     4993           
==================================================
  Hits                       ?    19444           
  Misses                     ?     6626           
  Partials                   ?     1564           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Co-authored-by: Tyler Gregg <greggt@amazon.com>
@popematt popematt merged commit 9dc06cc into amazon-ion:ion-11-encoding Oct 14, 2024
8 of 9 checks passed
@popematt popematt deleted the more-system-macros-3 branch October 14, 2024 22:23
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