aheber / tree-sitter-sfapex

Tree-sitter implementation for Salesforce's Apex, SOQL, and SOSL
MIT License
69 stars 14 forks source link

Unnamed AST nodes that might be worth to change to named #33

Closed xixiaofinland closed 1 month ago

xixiaofinland commented 1 month ago

Here are the unnamed nodes I need to traverse during formatting. The purpose is to list them for analysis to determine whether it makes sense to convert them into named nodes. This doesn't necessarily imply that a fix is required.

xixiaofinland commented 1 month ago

i++ v.s. i-- and ++i v.s. --i in update_expression can't be distinguished as the named node covers i only.

xixiaofinland commented 1 month ago

the ? and . in ref?.maybe and ref?.maybeNot() don't have associated named nodes.

xixiaofinland commented 1 month ago

accessor_declaration doesn't have named children nodes to break down get and ;.

example:

public class Me {
  public double MyReadWriteProp { get;  }
}