-
Notifications
You must be signed in to change notification settings - Fork 441
Introduce RawTokenSyntax(kind:, tokenText:, ...)
for a convenient way to create a token without any trivia
#839
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
Conversation
@swift-ci Please test |
This looks fine. Curious why we don't just default the two parameters of the existing initializer to []? |
My motivation was to use Alternatively, in |
Makes sense. Thanks! |
…:, text:, ...)` Also if the trivias are empty use `RawSyntax.parsedToken()`. This allows the parser to consistently use the `RawSyntaxData.ParsedToken` form for parsed tokens, instead of `RawSyntaxData.MaterializedToken`.
5130bf7
to
60bd837
Compare
@swift-ci Please test |
See updated commit. |
Is this good to go? 🙏 |
Curious why we want to use only |
|
Interesting. I wondered because we consider the internal structure of |
This allows the parser to consistently use the
RawSyntaxData.ParsedToken
form for parsed tokens, instead ofRawSyntaxData.MaterializedToken
.