-
Notifications
You must be signed in to change notification settings - Fork 440
Improve modeling token nodes #2010
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
Labels
enhancement
New feature or request
Comments
Tracked in Apple’s issue tracker as rdar://113567645 |
AppAppWorks
added a commit
to AppAppWorks/swift-syntax
that referenced
this issue
Sep 6, 2024
… sides fixed that the type of node choices property was generated as `RawSyntax` fixed swiftlang#2010 fixed `Trivia.isBlank` introduced `SyntaxNodeConvertible`, `ParameterConvertible` and `NodeChoiceConvertible` introduced a raw representation for each of `Node` and `Child` coupled `baseKind` with `SyntaxNodeKind` rather than `Node` removed redundant @_spi(RawSyntax) replaced the overloading of `SyntaxNodeKind?` with a descriptive enum used added `syntaxTypeNameWithLeadingUnderscoresDropped` to `Node` added `nameInProperCase` and `deprecatedNameInProperCase` to `Child` made `ChildNodeChoices.Choice` a facade of `NodeChoiceConvertible` promoted `isDeprecated` to `TypeConvertible` replaced `SyntaxNodeKind.XXX` with `Node.XXX` or `Child.XXX` whenever possible
AppAppWorks
added a commit
to AppAppWorks/swift-syntax
that referenced
this issue
Sep 6, 2024
… sides fixed that the type of node choices property was generated as `RawSyntax` fixed swiftlang#2010 fixed `Trivia.isBlank` introduced `SyntaxNodeConvertible`, `ParameterConvertible` and `NodeChoiceConvertible` introduced a raw representation for each of `Node` and `Child` coupled `baseKind` with `SyntaxNodeKind` rather than `Node` removed redundant @_spi(RawSyntax) replaced the overloading of `SyntaxNodeKind?` with a descriptive enum used added `syntaxTypeNameWithLeadingUnderscoresDropped` to `Node` added `nameInProperCase` and `deprecatedNameInProperCase` to `Child` made `ChildNodeChoices.Choice` a facade of `NodeChoiceConvertible` promoted `isDeprecated` to `TypeConvertible` replaced `SyntaxNodeKind.XXX` with `Node.XXX` or `Child.XXX` whenever possible
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With @ahoppen we identified potential confusion and overcomplication in code relating to modeling token nodes. Specifically, we're currently trying to collapse multiple token kinds into a single one without indicating this in our variable names.
Originally posted by @ahoppen in #2006 (comment)
In relation to issue #1978, changes were made in PR #2006 to the Child.tokenKind implementation. However, this solution still appears to be incorrect and needs further attention, which this issue aims to address.
The text was updated successfully, but these errors were encountered: