]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unicode/breaks/breaks.factor
Remove ENUM: f and replace uses with CONSTANTs.
[factor.git] / basis / unicode / breaks / breaks.factor
index f330cdb85c715055134a8ba1fe05b31def734d0d..13c7d1ac79d1372903c2f64670f149bb5a5231b4 100644 (file)
@@ -12,8 +12,19 @@ IN: unicode.breaks
 <PRIVATE
 ! Grapheme breaks
 
-ENUM: f Any L V T LV LVT Extend Control CR LF
-    SpacingMark Prepend graphemes ;
+CONSTANT: Any 0
+CONSTANT: L 1
+CONSTANT: V 2
+CONSTANT: T 3
+CONSTANT: LV 4
+CONSTANT: LVT 5
+CONSTANT: Extend 6
+CONSTANT: Control 7
+CONSTANT: CR 8
+CONSTANT: LF 9
+CONSTANT: SpacingMark 10
+CONSTANT: Prepend 11
+CONSTANT: graphemes 12
 
 : jamo-class ( ch -- class )
     dup initial? [ drop L ]
@@ -131,8 +142,20 @@ VALUE: word-break-table
 "vocab:unicode/data/WordBreakProperty.txt" load-interval-file
 to: word-break-table
 
-ENUM: f wOther wCR wLF wNewline wExtend wFormat wKatakana wALetter wMidLetter
-wMidNum wMidNumLet wNumeric wExtendNumLet words ;
+CONSTANT: wOther 0
+CONSTANT: wCR 1
+CONSTANT: wLF 2
+CONSTANT: wNewline 3
+CONSTANT: wExtend 4
+CONSTANT: wFormat 5
+CONSTANT: wKatakana 6
+CONSTANT: wALetter 7
+CONSTANT: wMidLetter 8
+CONSTANT: wMidNum 9
+CONSTANT: wMidNumLet 10
+CONSTANT: wNumeric 11
+CONSTANT: wExtendNumLet 12
+CONSTANT: words 13
 
 : word-break-classes ( -- table ) ! Is there a way to avoid this?
     H{