diff options
| author | reedlepee <reedlepee123@gmail.com> | 2013-10-20 06:03:09 +0530 |
|---|---|---|
| committer | reedlepee <reedlepee123@gmail.com> | 2013-10-23 01:10:50 +0530 |
| commit | 0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62 (patch) | |
| tree | 6f1dc6e0c50e81caacfcb5cef1a9543d9442e87e /src/libstd/fmt | |
| parent | dadb6f0cd9fa7e4b402a0107358acb34002d4895 (diff) | |
| download | rust-0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62.tar.gz rust-0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62.zip | |
Making fields in std and extra : private #4386
Diffstat (limited to 'src/libstd/fmt')
| -rw-r--r-- | src/libstd/fmt/mod.rs | 8 | ||||
| -rw-r--r-- | src/libstd/fmt/parse.rs | 8 | ||||
| -rw-r--r-- | src/libstd/fmt/rt.rs | 6 |
3 files changed, 18 insertions, 4 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index e7fa81fc87a..b47559b6055 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -477,8 +477,9 @@ pub mod rt; /// should be formatted. A mutable version of this is passed to all formatting /// traits. pub struct Formatter<'self> { + // made by reedlepee /// Flags for formatting (packed version of rt::Flag) - flags: uint, + flags: uint, /// Character used as 'fill' whenever there is alignment fill: char, /// Boolean indication of whether the output should be left-aligned @@ -486,11 +487,12 @@ pub struct Formatter<'self> { /// Optionally specified integer width that the output should be width: Option<uint>, /// Optionally specified precision for numeric types - precision: Option<uint>, + precision: Option<uint>, /// Output buffer. buf: &'self mut io::Writer, + // already priv priv curarg: vec::VecIterator<'self, Argument<'self>>, priv args: &'self [Argument<'self>], } @@ -500,6 +502,7 @@ pub struct Formatter<'self> { /// compile time it is ensured that the function and the value have the correct /// types, and then this struct is used to canonicalize arguments to one type. pub struct Argument<'self> { + // already priv priv formatter: extern "Rust" fn(&util::Void, &mut Formatter), priv value: &'self util::Void, } @@ -526,6 +529,7 @@ impl<'self> Arguments<'self> { /// string at compile-time so usage of the `write` and `format` functions can /// be safely performed. pub struct Arguments<'self> { + // already priv priv fmt: &'self [rt::Piece<'self>], priv args: &'self [Argument<'self>], } diff --git a/src/libstd/fmt/parse.rs b/src/libstd/fmt/parse.rs index 504050f9a77..fea512c08b4 100644 --- a/src/libstd/fmt/parse.rs +++ b/src/libstd/fmt/parse.rs @@ -38,17 +38,20 @@ pub enum Piece<'self> { /// Representation of an argument specification. #[deriving(Eq)] pub struct Argument<'self> { + // made by reedlepee /// Where to find this argument position: Position<'self>, - /// How to format the argument + /// How to format the argument format: FormatSpec<'self>, /// If not `None`, what method to invoke on the argument + // should be public method: Option<~Method<'self>> } /// Specification for the formatting of an argument in the format string. #[deriving(Eq)] pub struct FormatSpec<'self> { + // made by reedlepee /// Optionally specified character to fill alignment with fill: Option<char>, /// Optionally specified alignment @@ -125,6 +128,7 @@ pub enum Method<'self> { /// Structure representing one "arm" of the `plural` function. #[deriving(Eq)] pub struct PluralArm<'self> { + // made by reedlepee /// A selector can either be specified by a keyword or with an integer /// literal. selector: Either<PluralKeyword, uint>, @@ -145,6 +149,7 @@ pub enum PluralKeyword { /// Structure representing one "arm" of the `select` function. #[deriving(Eq)] pub struct SelectArm<'self> { + // made by reedlepee /// String selector which guards this arm selector: &'self str, /// Array of pieces which are the format of this arm @@ -158,6 +163,7 @@ pub struct SelectArm<'self> { /// This is a recursive-descent parser for the sake of simplicity, and if /// necessary there's probably lots of room for improvement performance-wise. pub struct Parser<'self> { + // already priv priv input: &'self str, priv cur: str::CharOffsetIterator<'self>, priv depth: uint, diff --git a/src/libstd/fmt/rt.rs b/src/libstd/fmt/rt.rs index b20af1a35b8..a623695c8a1 100644 --- a/src/libstd/fmt/rt.rs +++ b/src/libstd/fmt/rt.rs @@ -29,16 +29,18 @@ pub enum Piece<'self> { } pub struct Argument<'self> { + /// should be public position: Position, format: FormatSpec, method: Option<&'self Method<'self>> } pub struct FormatSpec { + /// made by redlepee fill: char, align: parse::Alignment, flags: uint, - precision: Count, + precision: Count, width: Count, } @@ -56,11 +58,13 @@ pub enum Method<'self> { } pub struct PluralArm<'self> { + /// made by redlepee selector: Either<parse::PluralKeyword, uint>, result: &'self [Piece<'self>], } pub struct SelectArm<'self> { + /// made by redlepee selector: &'self str, result: &'self [Piece<'self>], } |
