@@ -20,11 +20,8 @@ public struct CharacterClass {
2020 self . ccc = ccc
2121 }
2222
23- init ( unconverted model: _CharacterClassModel ) {
24- guard let ccc = model. makeDSLTreeCharacterClass ( ) else {
25- fatalError ( " Unsupported character class " )
26- }
27- self . ccc = ccc
23+ init ( unconverted atom: DSLTree . _AST . Atom ) {
24+ self . ccc = . init( members: [ . atom( . unconverted( atom) ) ] )
2825 }
2926}
3027
@@ -49,15 +46,15 @@ extension RegexComponent where Self == CharacterClass {
4946 }
5047
5148 public static var anyGraphemeCluster : CharacterClass {
52- . init( unconverted: . anyGrapheme )
49+ . init( unconverted: . _anyGrapheme )
5350 }
5451
5552 public static var whitespace : CharacterClass {
56- . init( unconverted: . whitespace )
53+ . init( unconverted: . _whitespace )
5754 }
5855
5956 public static var digit : CharacterClass {
60- . init( unconverted: . digit )
57+ . init( unconverted: . _digit )
6158 }
6259
6360 public static var hexDigit : CharacterClass {
@@ -69,19 +66,19 @@ extension RegexComponent where Self == CharacterClass {
6966 }
7067
7168 public static var horizontalWhitespace : CharacterClass {
72- . init( unconverted: . horizontalWhitespace )
69+ . init( unconverted: . _horizontalWhitespace )
7370 }
7471
7572 public static var newlineSequence : CharacterClass {
76- . init( unconverted: . newlineSequence )
73+ . init( unconverted: . _newlineSequence )
7774 }
7875
7976 public static var verticalWhitespace : CharacterClass {
80- . init( unconverted: . verticalWhitespace )
77+ . init( unconverted: . _verticalWhitespace )
8178 }
8279
8380 public static var word : CharacterClass {
84- . init( unconverted: . word )
81+ . init( unconverted: . _word )
8582 }
8683}
8784
0 commit comments