You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
ApolloCodeGenerator and ApolloCodeGeneratorDart:
generateASTExpressionOperation: updated to conditionally group complex expressions with parentheses based on operator and presence of literal strings to improve expression formatting and string interpolation merging.
Improved string concatenation merging for add operator when involving variables and literal strings.
ASTExpression and subclasses (ASTExpressionOperation, ASTExpressionVariableAssignment, ASTExpressionVariableDirectOperation, ASTExpressionNegation, ASTExpressionFunctionInvocation, etc.):
Added isComplex getter to distinguish complex expressions.
Added hasLiteralString and hasDescendantLiteralString to detect literal strings in expression trees.
Updated toString methods to support optional grouping with parentheses for clarity.
Updated ASTExpressionOperation.toString to optionally wrap expressions in parentheses.
Updated ASTExpressionVariableAssignment and ASTExpressionVariableDirectOperation to provide detailed toString implementations reflecting operators.
Added childrenOperations and descendantChildrenOperations helpers for expression traversal.
ASTAssignmentOperator enum:
Added symbol field for operator symbol representation.