@@ -739,56 +739,45 @@ extension TokenKind {
739
739
public static func fromRaw( kind rawKind: RawTokenKind , text: String ) -> TokenKind {
740
740
switch rawKind {
741
741
case . arrow:
742
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
743
- precondition ( text. isEmpty || isNotDefaultText)
742
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
744
743
return . arrow
745
744
case . atSign:
746
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
747
- precondition ( text. isEmpty || isNotDefaultText)
745
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
748
746
return . atSign
749
747
case . backslash:
750
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
751
- precondition ( text. isEmpty || isNotDefaultText)
748
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
752
749
return . backslash
753
750
case . backtick:
754
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
755
- precondition ( text. isEmpty || isNotDefaultText)
751
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
756
752
return . backtick
757
753
case . binaryOperator:
758
754
return . binaryOperator( text)
759
755
case . colon:
760
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
761
- precondition ( text. isEmpty || isNotDefaultText)
756
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
762
757
return . colon
763
758
case . comma:
764
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
765
- precondition ( text. isEmpty || isNotDefaultText)
759
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
766
760
return . comma
767
761
case . dollarIdentifier:
768
762
return . dollarIdentifier( text)
769
763
case . ellipsis:
770
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
771
- precondition ( text. isEmpty || isNotDefaultText)
764
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
772
765
return . ellipsis
773
766
case . endOfFile:
774
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
775
- precondition ( text. isEmpty || isNotDefaultText)
767
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
776
768
return . endOfFile
777
769
case . equal:
778
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
779
- precondition ( text. isEmpty || isNotDefaultText)
770
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
780
771
return . equal
781
772
case . exclamationMark:
782
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
783
- precondition ( text. isEmpty || isNotDefaultText)
773
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
784
774
return . exclamationMark
785
775
case . floatLiteral:
786
776
return . floatLiteral( text)
787
777
case . identifier:
788
778
return . identifier( text)
789
779
case . infixQuestionMark:
790
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
791
- precondition ( text. isEmpty || isNotDefaultText)
780
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
792
781
return . infixQuestionMark
793
782
case . integerLiteral:
794
783
return . integerLiteral( text)
@@ -798,70 +787,54 @@ extension TokenKind {
798
787
return . keyword( Keyword ( text) !)
799
788
}
800
789
case . leftAngle:
801
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
802
- precondition ( text. isEmpty || isNotDefaultText)
790
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
803
791
return . leftAngle
804
792
case . leftBrace:
805
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
806
- precondition ( text. isEmpty || isNotDefaultText)
793
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
807
794
return . leftBrace
808
795
case . leftParen:
809
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
810
- precondition ( text. isEmpty || isNotDefaultText)
796
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
811
797
return . leftParen
812
798
case . leftSquare:
813
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
814
- precondition ( text. isEmpty || isNotDefaultText)
799
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
815
800
return . leftSquare
816
801
case . multilineStringQuote:
817
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
818
- precondition ( text. isEmpty || isNotDefaultText)
802
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
819
803
return . multilineStringQuote
820
804
case . period:
821
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
822
- precondition ( text. isEmpty || isNotDefaultText)
805
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
823
806
return . period
824
807
case . postfixOperator:
825
808
return . postfixOperator( text)
826
809
case . postfixQuestionMark:
827
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
828
- precondition ( text. isEmpty || isNotDefaultText)
810
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
829
811
return . postfixQuestionMark
830
812
case . pound:
831
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
832
- precondition ( text. isEmpty || isNotDefaultText)
813
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
833
814
return . pound
834
815
case . poundAvailable:
835
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
836
- precondition ( text. isEmpty || isNotDefaultText)
816
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
837
817
return . poundAvailable
838
818
case . poundElse:
839
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
840
- precondition ( text. isEmpty || isNotDefaultText)
819
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
841
820
return . poundElse
842
821
case . poundElseif:
843
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
844
- precondition ( text. isEmpty || isNotDefaultText)
822
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
845
823
return . poundElseif
846
824
case . poundEndif:
847
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
848
- precondition ( text. isEmpty || isNotDefaultText)
825
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
849
826
return . poundEndif
850
827
case . poundIf:
851
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
852
- precondition ( text. isEmpty || isNotDefaultText)
828
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
853
829
return . poundIf
854
830
case . poundSourceLocation:
855
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
856
- precondition ( text. isEmpty || isNotDefaultText)
831
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
857
832
return . poundSourceLocation
858
833
case . poundUnavailable:
859
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
860
- precondition ( text. isEmpty || isNotDefaultText)
834
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
861
835
return . poundUnavailable
862
836
case . prefixAmpersand:
863
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
864
- precondition ( text. isEmpty || isNotDefaultText)
837
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
865
838
return . prefixAmpersand
866
839
case . prefixOperator:
867
840
return . prefixOperator( text)
@@ -872,46 +845,37 @@ extension TokenKind {
872
845
case . regexPoundDelimiter:
873
846
return . regexPoundDelimiter( text)
874
847
case . regexSlash:
875
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
876
- precondition ( text. isEmpty || isNotDefaultText)
848
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
877
849
return . regexSlash
878
850
case . rightAngle:
879
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
880
- precondition ( text. isEmpty || isNotDefaultText)
851
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
881
852
return . rightAngle
882
853
case . rightBrace:
883
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
884
- precondition ( text. isEmpty || isNotDefaultText)
854
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
885
855
return . rightBrace
886
856
case . rightParen:
887
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
888
- precondition ( text. isEmpty || isNotDefaultText)
857
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
889
858
return . rightParen
890
859
case . rightSquare:
891
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
892
- precondition ( text. isEmpty || isNotDefaultText)
860
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
893
861
return . rightSquare
894
862
case . semicolon:
895
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
896
- precondition ( text. isEmpty || isNotDefaultText)
863
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
897
864
return . semicolon
898
865
case . shebang:
899
866
return . shebang( text)
900
867
case . singleQuote:
901
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
902
- precondition ( text. isEmpty || isNotDefaultText)
868
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
903
869
return . singleQuote
904
870
case . stringQuote:
905
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
906
- precondition ( text. isEmpty || isNotDefaultText)
871
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
907
872
return . stringQuote
908
873
case . stringSegment:
909
874
return . stringSegment( text)
910
875
case . unknown:
911
876
return . unknown( text)
912
877
case . wildcard:
913
- let isNotDefaultText : Bool = rawKind. defaultTextString == text
914
- precondition ( text. isEmpty || isNotDefaultText)
878
+ precondition ( ( ( text. isEmpty as Bool ) || ( ( rawKind. defaultTextString == text) as Bool ) ) as Bool )
915
879
return . wildcard
916
880
}
917
881
}
0 commit comments