about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorBrian Anderson <andersrb@gmail.com>2011-04-13 18:59:40 -0400
committerBrian Anderson <andersrb@gmail.com>2011-04-13 22:13:21 -0400
commitaebdef0cd6dff87322f51850f72c42ccb54fbd53 (patch)
tree8b80cb4ca955f24f099bcca1360ed7b854eb486c /src/lib
parent44aed626bf56b72af4934768e9fa31ad4439935a (diff)
Move #fmt conversion model into ExtFmt.CT namespace
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ExtFmt.rs88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/lib/ExtFmt.rs b/src/lib/ExtFmt.rs
index e08de7ee414..35b9c5dd9e3 100644
--- a/src/lib/ExtFmt.rs
+++ b/src/lib/ExtFmt.rs
@@ -1,56 +1,56 @@
 import option.none;
 import option.some;
 
-tag signedness {
-    signed;
-    unsigned;
-}
+// Functions used by the fmt extension at compile time
+mod CT {
+    tag signedness {
+        signed;
+        unsigned;
+    }
 
-tag caseness {
-    case_upper;
-    case_lower;
-}
+    tag caseness {
+        case_upper;
+        case_lower;
+    }
 
-tag ty {
-    ty_bool;
-    ty_str;
-    ty_char;
-    ty_int(signedness);
-    ty_bits;
-    ty_hex(caseness);
-    // FIXME: More types
-}
+    tag ty {
+        ty_bool;
+        ty_str;
+        ty_char;
+        ty_int(signedness);
+        ty_bits;
+        ty_hex(caseness);
+        // FIXME: More types
+    }
 
-tag flag {
-    flag_left_justify;
-    flag_left_zero_pad;
-    flag_left_space_pad;
-    flag_plus_if_positive;
-    flag_alternate;
-}
+    tag flag {
+        flag_left_justify;
+        flag_left_zero_pad;
+        flag_left_space_pad;
+        flag_plus_if_positive;
+        flag_alternate;
+    }
 
-tag count {
-    count_is(int);
-    count_is_param(int);
-    count_is_next_param;
-    count_implied;
-}
+    tag count {
+        count_is(int);
+        count_is_param(int);
+        count_is_next_param;
+        count_implied;
+    }
 
-// A formatted conversion from an expression to a string
-type conv = rec(option.t[int] param,
-                vec[flag] flags,
-                count width,
-                count precision,
-                ty ty);
-
-// A fragment of the output sequence
-tag piece {
-    piece_string(str);
-    piece_conv(conv);
-}
+    // A formatted conversion from an expression to a string
+    type conv = rec(option.t[int] param,
+                    vec[flag] flags,
+                    count width,
+                    count precision,
+                    ty ty);
+
+    // A fragment of the output sequence
+    tag piece {
+        piece_string(str);
+        piece_conv(conv);
+    }
 
-// Functions used by the fmt extension at compile time
-mod CT {
     fn parse_fmt_string(str s) -> vec[piece] {
         let vec[piece] pieces = vec();
         auto lim = _str.byte_len(s);