1818/// - Note: The easiest way to unformat text is to exclude symbols marked as virtual.
1919///
2020public struct Attribute : OptionSet {
21-
22- //=------------------------------------------------------------------------=
23- // MARK: State
24- //=------------------------------------------------------------------------=
25-
26- public let rawValue : UInt8
27-
28- //=------------------------------------------------------------------------=
29- // MARK: Initializers
30- //=------------------------------------------------------------------------=
31-
32- @inlinable public init ( rawValue: UInt8 ) {
33- self . rawValue = rawValue
34- }
35- }
36-
37- //=----------------------------------------------------------------------------=
38- // MARK: Singular
39- //=----------------------------------------------------------------------------=
40-
41- public extension Attribute {
4221
4322 //=------------------------------------------------------------------------=
4423 // MARK: Instances
4524 //=------------------------------------------------------------------------=
4625
4726 /// Signifies that the symbol is not real and should not be parsed.
48- static let virtual = Self ( rawValue: 1 << 0 )
27+ public static let virtual = Self ( rawValue: 1 << 0 )
4928
5029 /// Signifies that the symbol should be ignored when it is inserted.
51- static let insertable = Self ( rawValue: 1 << 1 )
30+ public static let insertable = Self ( rawValue: 1 << 1 )
5231
5332 /// Signifies that the symbol should be ignored when it is removed.
54- static let removable = Self ( rawValue: 1 << 2 )
33+ public static let removable = Self ( rawValue: 1 << 2 )
5534
5635 /// Signifies that the symbol has no interactive size and should be passed through.
57- static let passthrough = Self ( rawValue: 1 << 3 )
58- }
59-
60- //=----------------------------------------------------------------------------=
61- // MARK: Composites
62- //=----------------------------------------------------------------------------=
63-
64- public extension Attribute {
36+ public static let passthrough = Self ( rawValue: 1 << 3 )
6537
6638 //=------------------------------------------------------------------------=
6739 // MARK: Instances
@@ -71,13 +43,27 @@ public extension Attribute {
7143 ///
7244 /// It contains no attributes.
7345 ///
74- static let content = Self ( [ ] )
46+ public static let content = Self ( [ ] )
7547
7648 /// A formatting attribute describing formatting characters.
7749 ///
7850 /// It contains: virtual, insertable, removable, passthrough.
7951 ///
80- static let phantom = Self ( [ . virtual, . insertable, . removable, . passthrough] )
52+ public static let phantom = Self ( [ . virtual, . insertable, . removable, . passthrough] )
53+
54+ //=------------------------------------------------------------------------=
55+ // MARK: State
56+ //=------------------------------------------------------------------------=
57+
58+ public let rawValue : UInt8
59+
60+ //=------------------------------------------------------------------------=
61+ // MARK: Initializers
62+ //=------------------------------------------------------------------------=
63+
64+ @inlinable public init ( rawValue: UInt8 ) {
65+ self . rawValue = rawValue
66+ }
8167}
8268
8369//=----------------------------------------------------------------------------=
0 commit comments