RawTriviaPiece
Trivia piece for token RawSyntax.
This declaration is gated by at least one @_spi attribute.
enum RawTriviaPiece
In contrast to TriviaPiece
, a RawTriviaPiece
does not own the source text of the trivia.
Trivia piece for token RawSyntax.
This declaration is gated by at least one @_spi attribute.
enum RawTriviaPiece
In contrast to TriviaPiece
, a RawTriviaPiece
does not own the source text of the trivia.
import SwiftSyntax
A library for working with Swift code.
enum TriviaPiece
A contiguous stretch of a single kind of trivia. The constituent part of a Trivia
collection.
case backslashes(Int)
case blockComment(SyntaxText)
case carriageReturns(Int)
case carriageReturnLineFeeds(Int)
case docBlockComment(SyntaxText)
case docLineComment(SyntaxText)
case formfeeds(Int)
case lineComment(SyntaxText)
case newlines(Int)
case pounds(Int)
case spaces(Int)
case tabs(Int)
case unexpectedText(SyntaxText)
case verticalTabs(Int)
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Sendable
protocol TextOutputStreamable
A source of text-streaming operations.
var byteLength: Int { get }
var debugDescription: String { get }
A debug description of this trivia piece.
var isComment: Bool { get }
Returns true
if this piece is a comment.
var isNewline: Bool { get }
var isSpaceOrTab: Bool { get }
var isWhitespace: Bool { get }
Returns true
if this piece is a newline, space or tab.
func write(to target: inout some TextOutputStream)
Write the source representation of this trivia piece to target
.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.