diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-12-04 21:13:02 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-12-04 21:13:02 -0800 |
| commit | b8cfd5c4142c28dde844678f2d506ccaf058dc78 (patch) | |
| tree | 9f947bc89c7faa03d1f5455f52c9dee5a69e6580 /src/libsyntax/ext | |
| parent | 01cd53baf0ea241b17132e857ba356b9b9a14908 (diff) | |
| download | rust-b8cfd5c4142c28dde844678f2d506ccaf058dc78.tar.gz rust-b8cfd5c4142c28dde844678f2d506ccaf058dc78.zip | |
librustc: Long lines. rs=rustbot
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/simplext.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 13 |
5 files changed, 19 insertions, 8 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 6efca050fa5..9bbe9568f26 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -283,7 +283,7 @@ fn expand_stmt(exts: HashMap<~str, syntax_extension>, cx: ext_ctxt, -> (stmt_, span) { let (mac, pth, tts, semi) = biased_match! ( - (s) ~ (stmt_mac(ref mac, semi)) else return orig(s, sp, fld); + (s) ~ (stmt_mac(ref mac, semi)) else return orig(s, sp, fld); ((*mac).node) ~ (mac_invoc_tt(pth, ref tts)) else { cx.span_bug((*mac).span, ~"naked syntactic bit") }; diff --git a/src/libsyntax/ext/simplext.rs b/src/libsyntax/ext/simplext.rs index 1bf24670aab..f13c5c9aff9 100644 --- a/src/libsyntax/ext/simplext.rs +++ b/src/libsyntax/ext/simplext.rs @@ -422,7 +422,9 @@ fn transcribe_block(cx: ext_ctxt, b: bindings, idx_path: @mut ~[uint], return match block_to_ident(blk) { Some(id) => { match follow_for_trans(cx, b.find(id), idx_path) { - Some(match_block(ref new_blk)) => ((*new_blk).node, (*new_blk).span), + Some(match_block(ref new_blk)) => { + ((*new_blk).node, (*new_blk).span) + } // possibly allow promotion of ident/path/expr to blocks? Some(ref m) => match_error(cx, (*m), ~"a block"), diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index e782a183430..ad4677942ac 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -185,7 +185,9 @@ fn nameize(p_s: parse_sess, ms: ~[matcher], res: ~[@named_match]) match m { {node: match_tok(_), span: _} => (), {node: match_seq(ref more_ms, _, _, _, _), span: _} => { - for (*more_ms).each() |next_m| { n_rec(p_s, *next_m, res, ret_val) }; + for (*more_ms).each() |next_m| { + n_rec(p_s, *next_m, res, ret_val) + }; } {node: match_nonterminal(bind_name, _, idx), span: sp} => { if ret_val.contains_key(bind_name) { diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 09415703260..f33c8b80204 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -94,7 +94,9 @@ fn add_new_extension(cx: ext_ctxt, sp: span, name: ident, @matched_nonterminal(nt_tt(@ref tt)) => { match (*tt) { // cut off delimiters; don't parse 'em - tt_delim(ref tts) => (*tts).slice(1u,(*tts).len()-1u), + tt_delim(ref tts) => { + (*tts).slice(1u,(*tts).len()-1u) + } _ => cx.span_fatal( sp, ~"macro rhs must be delimited") } diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 3d901039188..19b5975c147 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -199,8 +199,8 @@ fn tt_next_token(&&r: tt_reader) -> {tok: Token, sp: span} { ~"attempted to repeat an expression containing no syntax \ variables matched as repeating at this depth"); } - lis_contradiction(ref msg) => { /* FIXME #2887 blame macro invoker - instead*/ + lis_contradiction(ref msg) => { + /* FIXME #2887 blame macro invoker instead*/ r.sp_diag.span_fatal(sp, (*msg)); } lis_constraint(len, _) => { @@ -217,8 +217,13 @@ fn tt_next_token(&&r: tt_reader) -> {tok: Token, sp: span} { } else { r.repeat_len.push(len); r.repeat_idx.push(0u); - r.cur = @{readme: (*tts), mut idx: 0u, dotdotdoted: true, - sep: (*sep), up: tt_frame_up(option::Some(r.cur))}; + r.cur = @{ + readme: (*tts), + mut idx: 0u, + dotdotdoted: true, + sep: (*sep), + up: tt_frame_up(option::Some(r.cur)) + }; } } } |
