-
Notifications
You must be signed in to change notification settings - Fork 111
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 macro-aware transcoding from text. #1010
Adds support for macro-aware transcoding from text. #1010
Conversation
@@ -237,7 +237,7 @@ protected void readValueAsExpression(boolean isImplicitRest, List<Expression.EEx | |||
} | |||
IonType type = reader.encodingType(); | |||
List<SymbolToken> annotations = getAnnotations(); | |||
if (isImplicitRest) { | |||
if (isImplicitRest && !isContainerAnExpressionGroup()) { |
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.
This is a bug fix. Without this, an expression group as the final parameter to a rest-compatible argument would be parsed into a nested expression group, which is illegal.
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.
This is one of the bugs that I noticed yesterday. Thanks for catching and fixing this.
* @return true if the reader is positioned on an Ion 1.0 symbol table; otherwise, false. Note: the caller must | ||
* ensure this is called only at the top level. | ||
*/ | ||
boolean isPositionedOnSymbolTable() { |
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.
The green from here through handlePossibleIonVersionMarker
was moved from the user-level reader.
0ac1d7e
to
db7014a
Compare
db7014a
to
b9df158
Compare
Description of changes:
Builds on #1000 and #1005.
Supports macro-aware transcoding from text, preserving symbol tables, encoding directives, and e-expression invocations. This will be useful for:
This change required moving a few symbol table-related methods from the user reader to the system reader, as we had to do in binary. That's because Ion 1.1 e-expressions need to be interpreted at the system level (because they may expand to system values), and may therefore affect the encoding context (including the symbol table).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.