]> gitweb.factorcode.org Git - factor.git/commitdiff
unicode.breaks: inline word-break-classes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Sep 2012 17:09:05 +0000 (10:09 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Sep 2012 17:33:52 +0000 (10:33 -0700)
basis/unicode/breaks/breaks.factor

index 539ebc1218d0af9e47043a5ee82a9cb9cf0608c1..686fdd7b02912d7d765d83cf576522de6fb52a46 100644 (file)
@@ -158,14 +158,14 @@ CONSTANT: wNumeric 11
 CONSTANT: wExtendNumLet 12
 CONSTANT: words 13
 
-: word-break-classes ( -- table ) ! Is there a way to avoid this?
-    H{
-        { "Other" 0 } { "CR" 1 } { "LF" 2 } { "Newline" 3 }
-        { "Extend" 4 } { "Format" 5 } { "Katakana" 6 }
-        { "ALetter" 7 } { "MidLetter" 8 }
-        { "MidNum" 9 } { "MidNumLet" 10 } { "Numeric" 11 }
-        { "ExtendNumLet" 12 }
-    } ;
+! Is there a way to avoid this?
+CONSTANT: word-break-classes H{
+    { "Other" 0 } { "CR" 1 } { "LF" 2 } { "Newline" 3 }
+    { "Extend" 4 } { "Format" 5 } { "Katakana" 6 }
+    { "ALetter" 7 } { "MidLetter" 8 }
+    { "MidNum" 9 } { "MidNumLet" 10 } { "Numeric" 11 }
+    { "ExtendNumLet" 12 }
+}
 
 : word-break-prop ( char -- word-break-prop )
     word-break-table get-global interval-at