Camel case various core constructors

This commit is contained in:
Brian Anderson 2012-08-27 14:22:25 -07:00
parent 4ba9fdd362
commit 161a82e433
113 changed files with 530 additions and 545 deletions

View file

@ -2,7 +2,7 @@
import to_str::ToStr;
import dvec::dvec;
import dvec::DVec;
import ast::ident;
import util::interner;

View file

@ -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(),

View file

@ -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.

View file

@ -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 {

View file

@ -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,