about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-01-31 17:05:20 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-01-31 17:05:20 -0800
commite5d095d67e3926fa104ac495076fe9d4cd4f5562 (patch)
tree07be94199b1062e4ba99be9c014178d26543a0aa /src/comp/syntax/parse
parent1f795ff3b0c0cac31c1d9fd2406d0d53e774683a (diff)
downloadrust-e5d095d67e3926fa104ac495076fe9d4cd4f5562.tar.gz
rust-e5d095d67e3926fa104ac495076fe9d4cd4f5562.zip
Change option::t to option
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.

The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/eval.rs6
-rw-r--r--src/comp/syntax/parse/lexer.rs2
-rw-r--r--src/comp/syntax/parse/parser.rs22
3 files changed, 15 insertions, 15 deletions
diff --git a/src/comp/syntax/parse/eval.rs b/src/comp/syntax/parse/eval.rs
index 2530c794c94..74d2259c51e 100644
--- a/src/comp/syntax/parse/eval.rs
+++ b/src/comp/syntax/parse/eval.rs
@@ -25,7 +25,7 @@ fn eval_crate_directives(cx: ctx, cdirs: [@ast::crate_directive], prefix: str,
 }
 
 fn eval_crate_directives_to_mod(cx: ctx, cdirs: [@ast::crate_directive],
-                                prefix: str, suffix: option::t<str>)
+                                prefix: str, suffix: option<str>)
     -> (ast::_mod, [ast::attribute]) {
     #debug("eval crate prefix: %s", prefix);
     #debug("eval crate suffix: %s",
@@ -50,10 +50,10 @@ companion mod is a .rs file with the same name as the directory.
 We build the path to the companion mod by combining the prefix and the
 optional suffix then adding the .rs extension.
 */
-fn parse_companion_mod(cx: ctx, prefix: str, suffix: option::t<str>)
+fn parse_companion_mod(cx: ctx, prefix: str, suffix: option<str>)
     -> ([@ast::view_item], [@ast::item], [ast::attribute]) {
 
-    fn companion_file(prefix: str, suffix: option::t<str>) -> str {
+    fn companion_file(prefix: str, suffix: option<str>) -> str {
         ret alt suffix {
           option::some(s) { fs::connect(prefix, s) }
           option::none { prefix }
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index ae31f1b3434..03fc4017106 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -148,7 +148,7 @@ fn consume_block_comment(rdr: reader) {
     be consume_whitespace_and_comments(rdr);
 }
 
-fn scan_exponent(rdr: reader) -> option::t<str> {
+fn scan_exponent(rdr: reader) -> option<str> {
     let c = rdr.curr;
     let rslt = "";
     if c == 'e' || c == 'E' {
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 95c37b9b8e9..06f4e78372d 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -542,7 +542,7 @@ fn parse_fn_block_arg(p: parser) -> ast::arg {
     ret {mode: m, ty: t, ident: i, id: p.get_id()};
 }
 
-fn parse_seq_to_before_gt<T: copy>(sep: option::t<token::token>,
+fn parse_seq_to_before_gt<T: copy>(sep: option<token::token>,
                                   f: fn(parser) -> T,
                                   p: parser) -> [T] {
     let first = true;
@@ -559,7 +559,7 @@ fn parse_seq_to_before_gt<T: copy>(sep: option::t<token::token>,
     ret v;
 }
 
-fn parse_seq_to_gt<T: copy>(sep: option::t<token::token>,
+fn parse_seq_to_gt<T: copy>(sep: option<token::token>,
                            f: fn(parser) -> T, p: parser) -> [T] {
     let v = parse_seq_to_before_gt(sep, f, p);
     expect_gt(p);
@@ -567,7 +567,7 @@ fn parse_seq_to_gt<T: copy>(sep: option::t<token::token>,
     ret v;
 }
 
-fn parse_seq_lt_gt<T: copy>(sep: option::t<token::token>,
+fn parse_seq_lt_gt<T: copy>(sep: option<token::token>,
                            f: fn(parser) -> T,
                            p: parser) -> spanned<[T]> {
     let lo = p.span.lo;
@@ -586,7 +586,7 @@ fn parse_seq_to_end<T: copy>(ket: token::token, sep: seq_sep,
 }
 
 type seq_sep = {
-    sep: option::t<token::token>,
+    sep: option<token::token>,
     trailing_opt: bool   // is trailing separator optional?
 };
 
@@ -845,7 +845,7 @@ fn parse_bottom_expr(p: parser) -> pexpr {
         ret pexpr(mk_mac_expr(p, lo, p.span.hi, ast::mac_ellipsis));
     } else if eat_word(p, "bind") {
         let e = parse_expr_res(p, RESTRICT_NO_CALL_EXPRS);
-        fn parse_expr_opt(p: parser) -> option::t<@ast::expr> {
+        fn parse_expr_opt(p: parser) -> option<@ast::expr> {
             alt p.token {
               token::UNDERSCORE { p.bump(); ret none; }
               _ { ret some(parse_expr(p)); }
@@ -1202,13 +1202,13 @@ fn parse_assign_expr(p: parser) -> @ast::expr {
 fn parse_if_expr_1(p: parser) ->
    {cond: @ast::expr,
     then: ast::blk,
-    els: option::t<@ast::expr>,
+    els: option<@ast::expr>,
     lo: uint,
     hi: uint} {
     let lo = p.last_span.lo;
     let cond = parse_expr(p);
     let thn = parse_block(p);
-    let els: option::t<@ast::expr> = none;
+    let els: option<@ast::expr> = none;
     let hi = thn.span.hi;
     if eat_word(p, "else") {
         let elexpr = parse_else_expr(p);
@@ -1364,7 +1364,7 @@ fn parse_expr_res(p: parser, r: restriction) -> @ast::expr {
     ret e;
 }
 
-fn parse_initializer(p: parser) -> option::t<ast::initializer> {
+fn parse_initializer(p: parser) -> option<ast::initializer> {
     alt p.token {
       token::EQ {
         p.bump();
@@ -2143,7 +2143,7 @@ fn fn_expr_lookahead(tok: token::token) -> bool {
     }
 }
 
-fn parse_item(p: parser, attrs: [ast::attribute]) -> option::t<@ast::item> {
+fn parse_item(p: parser, attrs: [ast::attribute]) -> option<@ast::item> {
     if eat_word(p, "const") {
         ret some(parse_item_const(p, attrs));
     } else if eat_word(p, "inline") {
@@ -2178,7 +2178,7 @@ fn parse_item(p: parser, attrs: [ast::attribute]) -> option::t<@ast::item> {
 
 // A type to distingush between the parsing of item attributes or syntax
 // extensions, which both begin with token.POUND
-type attr_or_ext = option::t<either::t<[ast::attribute], @ast::expr>>;
+type attr_or_ext = option<either::t<[ast::attribute], @ast::expr>>;
 
 fn parse_outer_attrs_or_ext(
     p: parser,
@@ -2292,7 +2292,7 @@ fn parse_use(p: parser) -> ast::view_item_ {
 }
 
 fn parse_rest_import_name(p: parser, first: ast::ident,
-                          def_ident: option::t<ast::ident>) ->
+                          def_ident: option<ast::ident>) ->
    ast::view_item_ {
     let identifiers: [ast::ident] = [first];
     let glob: bool = false;