diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 22:37:22 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 23:17:34 -0800 |
| commit | 04a2887f8791bb080b4e76a55949a7c1954dbb97 (patch) | |
| tree | f072b2cc1e0b41270041a3a10a4fc313d3fa1a89 /src/comp/driver | |
| parent | ca7cfbe3d0251766217e5d4e559903e655e7549b (diff) | |
| download | rust-04a2887f8791bb080b4e76a55949a7c1954dbb97.tar.gz rust-04a2887f8791bb080b4e76a55949a7c1954dbb97.zip | |
Remove '.' after nullary tags in patterns
Does what it says on the tin. The next commit will remove support for this syntax.
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/diagnostic.rs | 20 | ||||
| -rw-r--r-- | src/comp/driver/driver.rs | 24 | ||||
| -rw-r--r-- | src/comp/driver/session.rs | 6 |
3 files changed, 25 insertions, 25 deletions
diff --git a/src/comp/driver/diagnostic.rs b/src/comp/driver/diagnostic.rs index 3ec8a46e852..6a44c5763de 100644 --- a/src/comp/driver/diagnostic.rs +++ b/src/comp/driver/diagnostic.rs @@ -91,7 +91,7 @@ fn mk_handler(cm: codemap::codemap, let emit = alt emitter { some(e) { e } - none. { + none { let f = fn@(cmsp: option<(codemap::codemap, span)>, msg: str, t: level) { emit(cmsp, msg, t); @@ -116,19 +116,19 @@ tag level { fn diagnosticstr(lvl: level) -> str { alt lvl { - fatal. { "error" } - error. { "error" } - warning. { "warning" } - note. { "note" } + fatal { "error" } + error { "error" } + warning { "warning" } + note { "note" } } } fn diagnosticcolor(lvl: level) -> u8 { alt lvl { - fatal. { term::color_bright_red } - error. { term::color_bright_red } - warning. { term::color_bright_yellow } - note. { term::color_bright_green } + fatal { term::color_bright_red } + error { term::color_bright_red } + warning { term::color_bright_yellow } + note { term::color_bright_green } } } @@ -155,7 +155,7 @@ fn emit(cmsp: option<(codemap::codemap, span)>, print_diagnostic(ss, lvl, msg); highlight_lines(cm, sp, lines); } - none. { + none { print_diagnostic("", lvl, msg); } } diff --git a/src/comp/driver/driver.rs b/src/comp/driver/driver.rs index cae0cda7e70..5b804611335 100644 --- a/src/comp/driver/driver.rs +++ b/src/comp/driver/driver.rs @@ -280,22 +280,22 @@ fn pretty_print_input(sess: session, cfg: ast::crate_cfg, input: str, // from stdin, we're going to just suck the source into a string // so both the parser and pretty-printer can use it. let upto = alt ppm { - ppm_expanded. { cu_expand } - ppm_typed. { cu_typeck } + ppm_expanded { cu_expand } + ppm_typed { cu_typeck } _ { cu_parse } }; let {crate, tcx, src} = compile_upto(sess, cfg, input, upto, none); let ann: pprust::pp_ann = pprust::no_ann(); alt ppm { - ppm_typed. { + ppm_typed { ann = {pre: ann_paren_for_expr, post: bind ann_typed_post(option::get(tcx), _)}; } - ppm_identified. { + ppm_identified { ann = {pre: ann_paren_for_expr, post: ann_identified_post}; } - ppm_expanded. | ppm_normal. {} + ppm_expanded | ppm_normal {} } pprust::print_crate(sess.codemap, sess.diagnostic, crate, input, io::string_reader(src), io::stdout(), ann); @@ -332,11 +332,11 @@ fn build_target_config(sopts: @session::options, demitter: diagnostic::emitter) -> @session::config { let os = alt get_os(sopts.target_triple) { some(os) { os } - none. { early_error(demitter, "Unknown operating system!") } + none { early_error(demitter, "Unknown operating system!") } }; let arch = alt get_arch(sopts.target_triple) { some(arch) { arch } - none. { early_error(demitter, + none { early_error(demitter, "Unknown architecture! " + sopts.target_triple) } }; let (int_type, uint_type, float_type) = alt arch { @@ -429,7 +429,7 @@ fn build_session_options(match: getopts::match, } else { 0u }; let target = alt target_opt { - none. { host_triple() } + none { host_triple() } some(s) { s } }; @@ -538,8 +538,8 @@ fn build_output_filenames(ifile: str, let obj_suffix = alt sopts.output_type { - link::output_type_none. { "none" } - link::output_type_bitcode. { "bc" } + link::output_type_none { "none" } + link::output_type_bitcode { "bc" } link::output_type_assembly. { "s" } link::output_type_llvm_assembly. { "ll" } // Object and exe output both use the '.o' extension here @@ -549,13 +549,13 @@ fn build_output_filenames(ifile: str, }; alt ofile { - none. { + none { // "-" as input file will cause the parser to read from stdin so we // have to make up a name // We want to toss everything after the final '.' let dirname = alt odir { some(d) { d } - none. { + none { if input_is_stdin(ifile) { std::os::getcwd() } else { diff --git a/src/comp/driver/session.rs b/src/comp/driver/session.rs index 0d2679999ff..ad1da33673e 100644 --- a/src/comp/driver/session.rs +++ b/src/comp/driver/session.rs @@ -114,9 +114,9 @@ impl session for session { fn building_library(req_crate_type: crate_type, crate: @ast::crate, testing: bool) -> bool { alt req_crate_type { - bin_crate. { false } - lib_crate. { true } - unknown_crate. { + bin_crate { false } + lib_crate { true } + unknown_crate { if testing { false } else { |
