diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-08-31 18:13:04 +0200 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-09-01 14:43:26 +0200 |
| commit | 539f37925c4364aa46e984df6ae2ec7e66cecc21 (patch) | |
| tree | ab15f69ecc2e88e7e5ae5ea80cf572e336df92a1 /src/libsyntax/ext/ifmt.rs | |
| parent | 617850131b795312c4dd404ae7d853b54d883105 (diff) | |
| download | rust-539f37925c4364aa46e984df6ae2ec7e66cecc21.tar.gz rust-539f37925c4364aa46e984df6ae2ec7e66cecc21.zip | |
Modernized a few type names in rustc and syntax
Diffstat (limited to 'src/libsyntax/ext/ifmt.rs')
| -rw-r--r-- | src/libsyntax/ext/ifmt.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/ext/ifmt.rs b/src/libsyntax/ext/ifmt.rs index d4274746a4e..eab5f657775 100644 --- a/src/libsyntax/ext/ifmt.rs +++ b/src/libsyntax/ext/ifmt.rs @@ -9,7 +9,7 @@ // except according to those terms. use ast; -use codemap::{span, respan}; +use codemap::{Span, respan}; use ext::base::*; use ext::base; use ext::build::AstBuilder; @@ -30,7 +30,7 @@ enum ArgumentType { struct Context { ecx: @ExtCtxt, - fmtsp: span, + fmtsp: Span, // Parsed argument expressions and the types that we've found so far for // them. @@ -53,7 +53,7 @@ struct Context { impl Context { /// Parses the arguments from the given list of tokens, returning None if /// there's a parse error so we can continue parsing other fmt! expressions. - fn parse_args(&mut self, sp: span, + fn parse_args(&mut self, sp: Span, leading_expr: bool, tts: &[ast::token_tree]) -> (Option<@ast::expr>, Option<@ast::expr>) { @@ -294,7 +294,7 @@ impl Context { /// /// Obviously `Some(Some(x)) != Some(Some(y))`, but we consider it true /// that: `Some(None) == Some(Some(x))` - fn verify_same(&self, sp: span, ty: ArgumentType, + fn verify_same(&self, sp: Span, ty: ArgumentType, before: Option<ArgumentType>) { if ty == Unknown { return } let cur = match before { @@ -636,7 +636,7 @@ impl Context { self.ecx.expr_block(self.ecx.block(self.fmtsp, lets, Some(result))) } - fn format_arg(&self, sp: span, arg: Either<uint, @str>, + fn format_arg(&self, sp: Span, arg: Either<uint, @str>, ident: ast::ident) -> @ast::expr { let ty = match arg { Left(i) => self.arg_types[i].unwrap(), @@ -697,22 +697,22 @@ impl Context { } } -pub fn expand_format(ecx: @ExtCtxt, sp: span, +pub fn expand_format(ecx: @ExtCtxt, sp: Span, tts: &[ast::token_tree]) -> base::MacResult { expand_ifmt(ecx, sp, tts, false, false, "format") } -pub fn expand_write(ecx: @ExtCtxt, sp: span, +pub fn expand_write(ecx: @ExtCtxt, sp: Span, tts: &[ast::token_tree]) -> base::MacResult { expand_ifmt(ecx, sp, tts, true, false, "write") } -pub fn expand_writeln(ecx: @ExtCtxt, sp: span, +pub fn expand_writeln(ecx: @ExtCtxt, sp: Span, tts: &[ast::token_tree]) -> base::MacResult { expand_ifmt(ecx, sp, tts, true, true, "write") } -fn expand_ifmt(ecx: @ExtCtxt, sp: span, tts: &[ast::token_tree], +fn expand_ifmt(ecx: @ExtCtxt, sp: Span, tts: &[ast::token_tree], leading_arg: bool, append_newline: bool, function: &str) -> base::MacResult { let mut cx = Context { |
