-
Notifications
You must be signed in to change notification settings - Fork 62
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
[v1] Add javadoc for AST; refactor of ExprVarRef scope #1694
base: main
Are you sure you want to change the base?
Conversation
CROSS-ENGINE-REPORT ❌
Testing Details
Result Details
Now FAILING Tests ❌The following 2 test(s) were previously PASSING in BASE but are now FAILING in TARGET: Click here to see
Now IGNORED Tests ❌The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact. Now Passing Tests180 test(s) were previously failing in BASE (LEGACY-V0.14.8) but now pass in TARGET (EVAL-549694F). Before merging, confirm they are intended to pass. The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact. CROSS-COMMIT-REPORT ✅
Testing DetailsResult Details
|
@@ -29,22 +31,17 @@ public final class DataType extends AstEnum { | |||
@EqualsAndHashCode(callSuper = false) | |||
public static class StructField extends AstNode { | |||
@NotNull | |||
@Getter |
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.
(self-review) potential issue w/ the @Getter
(and also @Builder
) annotation is that they are not included in the generated Javadoc. So in this PR, I ended up using delombok to add the hand-written getters. Some of the getters did have some useful javadoc (especially related to boolean parameters), so including it in the javadoc can be helpful for consumers.
We could apply the same in the future to @Builder
s if there's a need.
@NotNull | ||
@Getter | ||
private final Scope scope; | ||
private final boolean qualified; |
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.
(self-review) simplification of var ref modeling comes from this prior PR comment -- #1688 (comment). No need to have a separate enum to model the @T
vs T
var ref.
@@ -74,6 +71,30 @@ public List<AstNode> getChildren() { | |||
public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) { | |||
return visitor.visitStructField(this, ctx); | |||
} | |||
|
|||
@NotNull |
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.
(self-review) left out the javadoc for most of the
- getters
- static enum constructor methods
- default constructors
imo, those functions and constructor arguments are pretty self-explanatory.
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.
Docs look good enough, thanks for doing this big effort.
@@ -3,11 +3,19 @@ | |||
import org.jetbrains.annotations.NotNull; | |||
|
|||
/** | |||
* TODO docs, equals, hashcode | |||
* Base abstract class representing enums in the AST. |
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.
* Base abstract class representing enums in the AST. | |
* Abstract base class representing enums in the AST. |
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.
Ack, I'll change in a few other places as well.
Relevant Issues
Description
@Getter
s were not included in the javadocOther Information
Updated Unreleased Section in CHANGELOG: [NO]
Any backward-incompatible changes? [YES]
Any new external dependencies? [NO]
Do your changes comply with the Contributing Guidelines
and Code Style Guidelines? [YES]
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.