-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat(ast): array expressions #1080
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blakeli0
reviewed
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Nov 3, 2022
blakeli0
reviewed
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/TypeNode.java
Outdated
Show resolved
Hide resolved
diegomarquezp
commented
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
diegomarquezp
commented
Nov 3, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
diegomarquezp
commented
Nov 3, 2022
src/main/java/com/google/api/generator/engine/writer/ImportWriterVisitor.java
Outdated
Show resolved
Hide resolved
* Perform validation in build() * Ensure type() to be explicitly set * Expose add Expr, but validate that they are either ValueExpr or VariableExpr
blakeli0
reviewed
Nov 7, 2022
src/main/java/com/google/api/generator/engine/ast/ArrayExpr.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
blakeli0
approved these changes
Nov 7, 2022
suztomo
pushed a commit
that referenced
this pull request
Dec 16, 2022
* feat(ast): anonymous arrays for annotations * feat(ast): add convenience methods in anon array * feat(annotation): allow adding anon arrays * fix: fixed comments, test util class * feat(ast): arrays to allow VarExp and ValueExpr * fix(ast): add description only for assignments * fix(ast): comment correction, test array assignmnt * feat(test): test anon array assignment * fix(license): add licenses * fix(ast): various fixes * Perform validation in build() * Ensure type() to be explicitly set * Expose add Expr, but validate that they are either ValueExpr or VariableExpr * fix(ast): ArrayExpr ImportWriterVisitor fix & test * fix: remove unecessary comment
suztomo
pushed a commit
that referenced
this pull request
Mar 21, 2023
fix(java): handle empty modules Fixes googleapis/synthtool#1743 Source-Link: googleapis/synthtool@482d649 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:bd5071596a47614d1fe15eb766c4255bae330f823b606e1196a3b0c8d2e96fd1 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alice <[email protected]>
suztomo
pushed a commit
that referenced
this pull request
Mar 21, 2023
🤖 I have created a release *beep* *boop* --- ## [2.9.4](https://togithub.com/googleapis/java-core/compare/v2.9.3...v2.9.4) (2023-01-20) ### Bug Fixes * **java:** Skip fixing poms for special modules ([#1744](https://togithub.com/googleapis/java-core/issues/1744)) ([#1080](https://togithub.com/googleapis/java-core/issues/1080)) ([2644959](https://togithub.com/googleapis/java-core/commit/264495978c2e8608ee555a0422a2f68aa5dc1757)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Copy of #1070 but to be merged in
main
Added
ArrayExpr
to allow anonymous arrays (e.g.{"value1", "value2"}
). Same type validation is enforced (e.g.{"string1", 1.2f}
is not allowed).AnnotationNode
now allows anArrayExpr
as a single description. For multiple descriptions, a wrappingAssignmentExpr
is still needed.This PR is to help generate annotations with an anonymous array like this
@EnableConfigurationProperties({LanguageProperties.class, SharedProperties.class})
It also enables assignments to arrays in the form
String[] arr = {"str1", "str2"}
- botharr
and the anon array should be of typeTypeNode.arrayOf(TypeNode.STRING)
for this example (arrayOf()
was also introduced in this PR)