Reformat a bunch of recent churn.
This commit is contained in:
parent
eb9969f546
commit
b84fffaa4e
26 changed files with 471 additions and 470 deletions
|
|
@ -245,13 +245,16 @@ tag expr_ {
|
|||
expr_alt(@expr, vec[arm], ann);
|
||||
expr_fn(_fn, ann);
|
||||
expr_block(block, ann);
|
||||
expr_move(@expr /* TODO: @expr|is_lval */, @expr, ann);
|
||||
expr_assign(@expr /* TODO: @expr|is_lval */, @expr, ann);
|
||||
expr_swap(@expr /* TODO: @expr|is_lval */,
|
||||
@expr /* TODO: @expr|is_lval */, ann);
|
||||
expr_assign_op(binop, @expr /* TODO: @expr|is_lval */, @expr, ann);
|
||||
expr_send(@expr /* TODO: @expr|is_lval */, @expr, ann);
|
||||
expr_recv(@expr /* TODO: @expr|is_lval */, @expr, ann);
|
||||
/*
|
||||
* FIXME: many of these @exprs should be constrained with
|
||||
* is_lval once we have constrained types working.
|
||||
*/
|
||||
expr_move(@expr, @expr, ann);
|
||||
expr_assign(@expr,@expr, ann);
|
||||
expr_swap(@expr, @expr, ann);
|
||||
expr_assign_op(binop, @expr, @expr, ann);
|
||||
expr_send(@expr, @expr, ann);
|
||||
expr_recv(@expr, @expr, ann);
|
||||
expr_field(@expr, ident, ann);
|
||||
expr_index(@expr, @expr, ann);
|
||||
expr_path(path, ann);
|
||||
|
|
@ -366,16 +369,14 @@ type constr_arg = constr_arg_general[uint];
|
|||
|
||||
type constr_arg_general[T] = spanned[constr_arg_general_[T]];
|
||||
|
||||
type constr_ = rec(path path,
|
||||
vec[@constr_arg_general[uint]] args,
|
||||
ann ann);
|
||||
type constr_ = rec(path path, vec[@constr_arg_general[uint]] args, ann ann);
|
||||
|
||||
type constr = spanned[constr_];
|
||||
|
||||
|
||||
/* The parser generates ast::constrs; resolve generates
|
||||
a mapping from each function to a list of ty::constr_defs,
|
||||
corresponding to these. */
|
||||
|
||||
type arg = rec(mode mode, @ty ty, ident ident, def_id id);
|
||||
|
||||
type fn_decl =
|
||||
|
|
@ -464,12 +465,14 @@ tag attr_style { attr_outer; attr_inner; }
|
|||
|
||||
type attribute_ = rec(attr_style style, meta_item value);
|
||||
|
||||
type item = rec(ident ident,
|
||||
vec[attribute] attrs,
|
||||
def_id id, // For objs, this is the type def_id
|
||||
ann ann,
|
||||
item_ node,
|
||||
span span);
|
||||
type item =
|
||||
rec(ident ident,
|
||||
vec[attribute] attrs,
|
||||
def_id id, // For objs, this is the type def_id
|
||||
|
||||
ann ann,
|
||||
item_ node,
|
||||
span span);
|
||||
|
||||
tag item_ {
|
||||
item_const(@ty, @expr);
|
||||
|
|
@ -478,7 +481,9 @@ tag item_ {
|
|||
item_native_mod(native_mod);
|
||||
item_ty(@ty, vec[ty_param]);
|
||||
item_tag(vec[variant], vec[ty_param]);
|
||||
item_obj(_obj, vec[ty_param], def_id /* constructor id */);
|
||||
item_obj(_obj, vec[ty_param], def_id);
|
||||
/* constructor id */
|
||||
|
||||
}
|
||||
|
||||
type native_item = spanned[native_item_];
|
||||
|
|
@ -521,9 +526,9 @@ fn is_exported(ident i, _mod m) -> bool {
|
|||
case (_) {/* fall through */ }
|
||||
}
|
||||
}
|
||||
|
||||
// If there are no declared exports then
|
||||
// everything not imported is exported
|
||||
|
||||
ret count == 0u && !nonlocal;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -478,8 +478,7 @@ fn tag_variant_ids(&ebml::doc item, int this_cnum) -> vec[ast::def_id] {
|
|||
|
||||
fn get_metadata_section(str filename) -> option::t[vec[u8]] {
|
||||
auto b = str::buf(filename);
|
||||
auto mb =
|
||||
llvm::LLVMRustCreateMemoryBufferWithContentsOfFile(b);
|
||||
auto mb = llvm::LLVMRustCreateMemoryBufferWithContentsOfFile(b);
|
||||
if (mb as int == 0) { ret option::none[vec[u8]]; }
|
||||
auto of = mk_object_file(mb);
|
||||
auto si = mk_section_iter(of.llof);
|
||||
|
|
|
|||
|
|
@ -294,8 +294,9 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
|
|||
cx.p.set_def(next_id._1);
|
||||
cx.chpos = p0.get_chpos();
|
||||
cx.next_ann = p0.next_ann_num();
|
||||
auto i = front::parser::mk_item(cx.p, cdir.span.lo, cdir.span.hi,
|
||||
id, ast::item_mod(m0), []);
|
||||
auto i =
|
||||
front::parser::mk_item(cx.p, cdir.span.lo, cdir.span.hi, id,
|
||||
ast::item_mod(m0), []);
|
||||
vec::push[@ast::item](items, i);
|
||||
}
|
||||
case (ast::cdir_dir_mod(?id, ?dir_opt, ?cdirs)) {
|
||||
|
|
@ -303,8 +304,9 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
|
|||
alt (dir_opt) { case (some(?d)) { path = d; } case (none) { } }
|
||||
auto full_path = prefix + std::fs::path_sep() + path;
|
||||
auto m0 = eval_crate_directives_to_mod(cx, e, cdirs, full_path);
|
||||
auto i = front::parser::mk_item
|
||||
(cx.p, cdir.span.lo, cdir.span.hi, id, ast::item_mod(m0), []);
|
||||
auto i =
|
||||
front::parser::mk_item(cx.p, cdir.span.lo, cdir.span.hi, id,
|
||||
ast::item_mod(m0), []);
|
||||
vec::push[@ast::item](items, i);
|
||||
}
|
||||
case (ast::cdir_view_item(?vi)) {
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ fn scan_number(char c, &reader rdr) -> token::token {
|
|||
rdr.bump();
|
||||
ret token::LIT_MACH_FLOAT(util::common::ty_f64,
|
||||
intern(*rdr.get_interner(),
|
||||
float_str));
|
||||
float_str));
|
||||
/* FIXME: if this is out of range for either a 32-bit or
|
||||
64-bit float, it won't be noticed till the back-end */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue