diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-27 14:22:25 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-27 17:22:18 -0700 |
| commit | 161a82e433fbfbc0bd57a4d951ac37656a8a30f6 (patch) | |
| tree | c59e3d6a32f471299a8fde09506ebf6cff8f44db /src/libsyntax | |
| parent | 4ba9fdd3627869f04ee39d6146023df822e0936e (diff) | |
| download | rust-161a82e433fbfbc0bd57a4d951ac37656a8a30f6.tar.gz rust-161a82e433fbfbc0bd57a4d951ac37656a8a30f6.zip | |
Camel case various core constructors
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/codemap.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/proto.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/qquote.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/simplext.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/print/pp.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/util/interner.rs | 4 |
10 files changed, 22 insertions, 22 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index ed2e2589ab1..31e725988a6 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -1,4 +1,4 @@ -import dvec::{DVec, dvec}; +import dvec::DVec; export filename; export filemap; @@ -52,7 +52,7 @@ type codemap = @{files: DVec<filemap>}; type loc = {file: filemap, line: uint, col: uint}; -fn new_codemap() -> codemap { @{files: dvec()} } +fn new_codemap() -> codemap { @{files: DVec()} } fn new_filemap_w_substr(+filename: filename, +substr: file_substr, src: @~str, diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index f527d9f79f3..6d45bfe4142 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -2,7 +2,7 @@ import to_str::ToStr; -import dvec::dvec; +import dvec::DVec; import ast::ident; import util::interner; diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs index 7f9b9acd8e2..6c9dd577060 100644 --- a/src/libsyntax/ext/pipes/proto.rs +++ b/src/libsyntax/ext/pipes/proto.rs @@ -1,5 +1,5 @@ import to_str::ToStr; -import dvec::{DVec, dvec}; +import dvec::DVec; import ast_builder::{path, append_types}; @@ -119,7 +119,7 @@ struct protocol_ { new(name: ~str, span: span) { self.name = name; self.span = span; - self.states = dvec(); + self.states = DVec(); self.bounded = None; } @@ -164,7 +164,7 @@ struct protocol_ { impl protocol { fn add_state_poly(name: ~str, ident: ast::ident, dir: direction, +ty_params: ~[ast::ty_param]) -> state { - let messages = dvec(); + let messages = DVec(); let state = state_(@{ id: self.states.len(), diff --git a/src/libsyntax/ext/qquote.rs b/src/libsyntax/ext/qquote.rs index 38108861b47..47f551a9e98 100644 --- a/src/libsyntax/ext/qquote.rs +++ b/src/libsyntax/ext/qquote.rs @@ -2,7 +2,7 @@ import ast::{crate, expr_, mac_invoc, mac_aq, mac_var}; import parse::parser; import parse::parser::parse_from_source_str; -import dvec::{DVec, dvec}; +import dvec::DVec; import parse::token::ident_interner; import fold::*; @@ -119,7 +119,7 @@ fn gather_anti_quotes<N: qq_helper>(lo: uint, node: N) -> aq_ctxt let v = @{visit_expr: |node, &&cx, v| visit_aq(node, ~"from_expr", cx, v), visit_ty: |node, &&cx, v| visit_aq(node, ~"from_ty", cx, v) with *default_visitor()}; - let cx = @{lo:lo, gather: dvec()}; + let cx = @{lo:lo, gather: DVec()}; node.visit(cx, mk_vt(v)); // FIXME (#2250): Maybe this is an overkill (merge_sort), it might // be better to just keep the gather array in sorted order. diff --git a/src/libsyntax/ext/simplext.rs b/src/libsyntax/ext/simplext.rs index f7cc1a88620..3097c70478a 100644 --- a/src/libsyntax/ext/simplext.rs +++ b/src/libsyntax/ext/simplext.rs @@ -1,6 +1,6 @@ import codemap::span; import std::map::{hashmap, str_hash, uint_hash}; -import dvec::{DVec, dvec}; +import dvec::DVec; import base::*; @@ -136,7 +136,7 @@ fn acumm_bindings(_cx: ext_ctxt, _b_dest: bindings, _b_src: bindings) { } fn pattern_to_selectors(cx: ext_ctxt, e: @expr) -> binders { let res: binders = {real_binders: uint_hash::<selector>(), - literal_ast_matchers: dvec()}; + literal_ast_matchers: DVec()}; //this oughta return binders instead, but macro args are a sequence of //expressions, rather than a single expression fn trivial_selector(m: matchable) -> match_result { diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 3b04fd502f4..db96ce484be 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -7,7 +7,7 @@ import parse::parser::{parser,SOURCE_FILE}; //import parse::common::parser_common; import parse::common::*; //resolve bug? import parse::parse_sess; -import dvec::{DVec, dvec}; +import dvec::DVec; import ast::{matcher, match_tok, match_seq, match_nonterminal, ident}; import ast_util::mk_sp; import std::map::{hashmap, uint_hash}; @@ -137,7 +137,7 @@ fn initial_matcher_pos(ms: ~[matcher], sep: Option<token>, lo: uint) } } ~{elts: ms, sep: sep, mut idx: 0u, mut up: matcher_pos_up(None), - matches: copy vec::from_fn(count_names(ms), |_i| dvec::dvec()), + matches: copy vec::from_fn(count_names(ms), |_i| dvec::DVec()), match_lo: 0u, match_hi: match_idx_hi, sp_lo: lo} } @@ -296,7 +296,7 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher]) } let matches = vec::map(ei.matches, // fresh, same size: - |_m| dvec::<@named_match>()); + |_m| DVec::<@named_match>()); let ei_t <- ei; vec::push(cur_eis, ~{ elts: matchers, sep: sep, mut idx: 0u, diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f73d4163e9c..8bc78a53548 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -13,7 +13,7 @@ import prec::{as_prec, token_to_binop}; import attr::parser_attr; import common::{seq_sep_trailing_disallowed, seq_sep_trailing_allowed, seq_sep_none, token_to_str}; -import dvec::dvec; +import dvec::DVec; import vec::{push}; import ast::{_mod, add, alt_check, alt_exhaustive, arg, arm, attribute, bind_by_ref, bind_by_implicit_ref, bind_by_value, bind_by_move, @@ -3427,7 +3427,7 @@ struct parser { items_allowed = false } - let (view_items, items) = (dvec(), dvec()); + let (view_items, items) = (DVec(), DVec()); loop { match self.parse_item_or_view_item(attrs, items_allowed) { iovi_none => diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index be770281faa..d1f7235dc1b 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -1,5 +1,5 @@ import io::WriterUtil; -import dvec::{DVec, dvec}; +import dvec::DVec; /* * This pretty-printer is a direct reimplementation of Philip Karlton's @@ -117,7 +117,7 @@ fn mk_printer(out: io::Writer, linewidth: uint) -> printer { mut scan_stack_empty: true, mut top: 0u, mut bottom: 0u, - print_stack: dvec(), + print_stack: DVec(), mut pending_indentation: 0, mut token_tree_last_was_ident: false}) } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 4ebdcd03040..3465ca20565 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -6,7 +6,7 @@ import pp::{break_offset, word, printer, import diagnostic; import ast::{required, provided}; import ast_util::{operator_prec}; -import dvec::{DVec, dvec}; +import dvec::DVec; import parse::classify::*; import parse::token::ident_interner; @@ -53,7 +53,7 @@ fn rust_printer(writer: io::Writer, intr: ident_interner) -> ps { literals: None::<~[comments::lit]>, mut cur_cmnt: 0u, mut cur_lit: 0u, - boxes: dvec(), + boxes: DVec(), ann: no_ann()}; } @@ -82,7 +82,7 @@ fn print_crate(cm: codemap, intr: ident_interner, literals: if is_expanded { None } else { Some(r.lits) }, mut cur_cmnt: 0u, mut cur_lit: 0u, - boxes: dvec(), + boxes: DVec(), ann: ann}; print_crate_(s, crate); } diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index 9f738fdc6a2..73459bbaf5f 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -3,7 +3,7 @@ // type, and vice versa. import std::map; import std::map::{hashmap, hashfn, eqfn}; -import dvec::{DVec, dvec}; +import dvec::DVec; type hash_interner<T: const> = {map: hashmap<T, uint>, @@ -14,7 +14,7 @@ type hash_interner<T: const> = fn mk<T: const copy>(+hasher: hashfn<T>, +eqer: eqfn<T>) -> interner<T> { let m = map::hashmap::<T, uint>(copy hasher, copy eqer); let hi: hash_interner<T> = - {map: m, vect: dvec(), hasher: hasher, eqer: eqer}; + {map: m, vect: DVec(), hasher: hasher, eqer: eqer}; return hi as interner::<T>; } |
