Skip to content

[apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc.#4219

Merged
adangel merged 22 commits into
pmd:experimental-apex-parserfrom
aaronhurst-google:experimental-apex-parser
Dec 1, 2022
Merged

[apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc.#4219
adangel merged 22 commits into
pmd:experimental-apex-parserfrom
aaronhurst-google:experimental-apex-parser

Conversation

@aaronhurst-google

@aaronhurst-google aaronhurst-google commented Nov 18, 2022

Copy link
Copy Markdown
Contributor

Translate and implement remaining AST nodes, including: fields, triggers, annotations, and parameters.

Fixups from previous code review:

  • Make ctor package private
  • ASTExpressionStatement wraps statement instead of expression node

Relates #3766

eklimo and others added 22 commits November 11, 2022 20:27
Change-Id: Ibb474f3704246fce86f6e1dec6f505a817ca8082
Change-Id: If9e6874b0a2d906da161116ba71176049df2a86c
Change-Id: Idaf68b2641443c73aa9b39d3d801c189ecdf9638
- Sort annotation names
- Make names lowercase
- Use set for names
- Use ImmutableMap
- Handle only `LiteralExpression`s; rename to `literalToString`
- Manually discard other `Expression`s at each client
Change-Id: Iec30525f2b7f2bf41432df4153b56339378ccbf7
Change-Id: I5f5d5d6bc822e6367828e75dbaa3c274af9934ec
Change-Id: I3ffd845161d8c0604fa8aa8baac6996dcca4c93c
Change-Id: Ib198889016e81e4c5b4490879e76d492d9edbf99
  * Make ctor package private
  * ASTExpressionStatement should wrap ExpressionStatement not Expression

Change-Id: Iab7db02ea5bcc55b9e21f9fa3193105abb15bc17

@adangel adangel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

import net.sourceforge.pmd.annotation.InternalApi;

public class ASTField extends AbstractApexNode.Single<Node> implements CanSuppressWarnings {
import com.beust.jcommander.internal.Nullable;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's unused - I'll remove it before merging

@adangel adangel merged commit 07c974c into pmd:experimental-apex-parser Dec 1, 2022
adangel added a commit that referenced this pull request Dec 1, 2022
[apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc. #4219
@adangel adangel added this to the 7.0.0 milestone Feb 13, 2024
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.

3 participants