swiftlang / swiftlang/swift-syntax

Please add a `TriviaPiece.commentValue` property

Open
#1,890 20 comments 2 reactions 1 assignee Claimed by @adammcarter View on GitHub
enhancement good first issue
Dominant language
Swift
Stars
3.7k
Forks
553
Avg merge
5d 13h
Merged PRs (30d)
16

Description

### Description

There are four kinds of comment tracked by `TriviaPiece`. It'd be a nice convenience to be able to extract the string values of those comments. May I suggest something like:

```swift
extension TriviaPiece {
public var commentValue: String? { get }
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.