1010//===----------------------------------------------------------------------===//
1111
1212extension AST {
13- public struct Atom : Hashable , _ASTNode {
13+ public struct Atom : Hashable , Sendable , _ASTNode {
1414 public let kind : Kind
1515 public let location : SourceLocation
1616
@@ -19,7 +19,7 @@ extension AST {
1919 self . location = loc
2020 }
2121
22- public enum Kind : Hashable {
22+ public enum Kind : Hashable , Sendable {
2323 /// Just a character
2424 ///
2525 /// A, \*, \\, ...
@@ -113,7 +113,7 @@ extension AST.Atom {
113113}
114114
115115extension AST . Atom {
116- public struct Scalar : Hashable {
116+ public struct Scalar : Hashable , Sendable {
117117 public var value : UnicodeScalar
118118 public var location : SourceLocation
119119
@@ -123,7 +123,7 @@ extension AST.Atom {
123123 }
124124 }
125125
126- public struct ScalarSequence : Hashable {
126+ public struct ScalarSequence : Hashable , Sendable {
127127 public var scalars : [ Scalar ]
128128 public var trivia : [ AST . Trivia ]
129129
@@ -145,7 +145,7 @@ extension AST.Atom {
145145
146146 // Characters, character types, literals, etc., derived from
147147 // an escape sequence.
148- public enum EscapedBuiltin : Hashable {
148+ public enum EscapedBuiltin : Hashable , Sendable {
149149 // TODO: better doc comments
150150
151151 // Literal single characters
@@ -374,7 +374,7 @@ extension AST.Atom.EscapedBuiltin {
374374}
375375
376376extension AST . Atom {
377- public struct CharacterProperty : Hashable {
377+ public struct CharacterProperty : Hashable , Sendable {
378378 public var kind : Kind
379379
380380 /// Whether this is an inverted property e.g '\P{Ll}', '[:^ascii:]'.
@@ -397,7 +397,7 @@ extension AST.Atom {
397397}
398398
399399extension AST . Atom . CharacterProperty {
400- public enum Kind : Hashable {
400+ public enum Kind : Hashable , Sendable {
401401 /// Matches any character, equivalent to Oniguruma's '\O'.
402402 case any
403403
@@ -453,14 +453,14 @@ extension AST.Atom.CharacterProperty {
453453 /// Some special properties implemented by Java.
454454 case javaSpecial( JavaSpecial )
455455
456- public enum MapKind : Hashable {
456+ public enum MapKind : Hashable , Sendable {
457457 case lowercase
458458 case uppercase
459459 case titlecase
460460 }
461461 }
462462
463- public enum PCRESpecialCategory : String , Hashable {
463+ public enum PCRESpecialCategory : String , Hashable , Sendable {
464464 case alphanumeric = " Xan "
465465 case posixSpace = " Xps "
466466 case perlSpace = " Xsp "
@@ -470,7 +470,7 @@ extension AST.Atom.CharacterProperty {
470470
471471 /// Special Java properties that correspond to methods on
472472 /// `java.lang.Character`, with the `java` prefix replaced by `is`.
473- public enum JavaSpecial : String , Hashable , CaseIterable {
473+ public enum JavaSpecial : String , Hashable , CaseIterable , Sendable {
474474 case alphabetic = " javaAlphabetic "
475475 case defined = " javaDefined "
476476 case digit = " javaDigit "
@@ -494,7 +494,7 @@ extension AST.Atom.CharacterProperty {
494494
495495extension AST . Atom {
496496 /// Anchors and other built-in zero-width assertions.
497- public enum AssertionKind : String {
497+ public enum AssertionKind : String , Hashable , Sendable {
498498 /// \A
499499 case startOfSubject = #"\A"#
500500
@@ -554,10 +554,10 @@ extension AST.Atom {
554554}
555555
556556extension AST . Atom {
557- public enum Callout : Hashable {
557+ public enum Callout : Hashable , Sendable {
558558 /// A PCRE callout written `(?C...)`
559- public struct PCRE : Hashable {
560- public enum Argument : Hashable {
559+ public struct PCRE : Hashable , Sendable {
560+ public enum Argument : Hashable , Sendable {
561561 case number( Int )
562562 case string( String )
563563 }
@@ -573,8 +573,8 @@ extension AST.Atom {
573573 }
574574
575575 /// A named Oniguruma callout written `(*name[tag]{args, ...})`
576- public struct OnigurumaNamed : Hashable {
577- public struct ArgList : Hashable {
576+ public struct OnigurumaNamed : Hashable , Sendable {
577+ public struct ArgList : Hashable , Sendable {
578578 public var leftBrace : SourceLocation
579579 public var args : [ AST . Located < String > ]
580580 public var rightBrace : SourceLocation
@@ -604,8 +604,8 @@ extension AST.Atom {
604604 }
605605
606606 /// An Oniguruma callout 'of contents', written `(?{...}[tag]D)`
607- public struct OnigurumaOfContents : Hashable {
608- public enum Direction : Hashable {
607+ public struct OnigurumaOfContents : Hashable , Sendable {
608+ public enum Direction : Hashable , Sendable {
609609 case inProgress // > (the default)
610610 case inRetraction // <
611611 case both // X
@@ -652,7 +652,7 @@ extension AST.Atom {
652652
653653extension AST . Atom . Callout {
654654 /// A tag specifier `[...]` that can appear in an Oniguruma callout.
655- public struct OnigurumaTag : Hashable {
655+ public struct OnigurumaTag : Hashable , Sendable {
656656 public var leftBracket : SourceLocation
657657 public var name : AST . Located < String >
658658 public var rightBracket : SourceLocation
@@ -670,8 +670,8 @@ extension AST.Atom.Callout {
670670}
671671
672672extension AST . Atom {
673- public struct BacktrackingDirective : Hashable {
674- public enum Kind : Hashable {
673+ public struct BacktrackingDirective : Hashable , Sendable {
674+ public enum Kind : Hashable , Sendable {
675675 /// (*ACCEPT)
676676 case accept
677677
0 commit comments