about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorGareth Daniel Smith <garethdanielsmith@gmail.com>2012-07-04 22:53:12 +0100
committerBrian Anderson <banderson@mozilla.com>2012-07-04 19:18:13 -0700
commitbe0141666dd12316034499db12ee9fcf9ba648dd (patch)
tree7d4c985a73e9a85de0e6c1bf2beeed44ebbd0102 /src/libsyntax/parse
parentbfa43ca3011bd1296cb1797ad3ea1c5dc4056749 (diff)
downloadrust-be0141666dd12316034499db12ee9fcf9ba648dd.tar.gz
rust-be0141666dd12316034499db12ee9fcf9ba648dd.zip
convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer.rs2
-rw-r--r--src/libsyntax/parse/parser.rs2
-rw-r--r--src/libsyntax/parse/prec.rs16
-rw-r--r--src/libsyntax/parse/token.rs47
4 files changed, 35 insertions, 32 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index 8a32ecdac64..a85e791696f 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -24,7 +24,7 @@ enum tt_frame_up { /* to break a circularity */
 }
 
 /* TODO: figure out how to have a uniquely linked stack, and change to `~` */
-#[doc = "an unzipping of `token_tree`s"]
+/// an unzipping of `token_tree`s
 type tt_frame = @{
     readme: ~[ast::token_tree],
     mut idx: uint,
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 747ca07bee5..c9292308810 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1057,7 +1057,7 @@ class parser {
     }
 
     fn parse_token_tree() -> token_tree {
-        #[doc="what's the opposite delimiter?"]
+        /// what's the opposite delimiter?
         fn flip(&t: token::token) -> token::token {
             alt t {
               token::LPAREN { token::RPAREN }
diff --git a/src/libsyntax/parse/prec.rs b/src/libsyntax/parse/prec.rs
index e2e35447af3..8ea7306e180 100644
--- a/src/libsyntax/parse/prec.rs
+++ b/src/libsyntax/parse/prec.rs
@@ -6,17 +6,19 @@ import token::*;
 import token::token;
 import ast::*;
 
-#[doc = "Unary operators have higher precedence than binary"]
+/// Unary operators have higher precedence than binary
 const unop_prec: uint = 100u;
 
-#[doc = "
-Precedence of the `as` operator, which is a binary operator
-but is not represented in the precedence table.
-"]
+/**
+ * Precedence of the `as` operator, which is a binary operator
+ * but is not represented in the precedence table.
+ */
 const as_prec: uint = 11u;
 
-#[doc = "Maps a token to a record specifying the corresponding binary
-         operator and its precedence"]
+/**
+ * Maps a token to a record specifying the corresponding binary
+ * operator and its precedence
+ */
 fn token_to_binop(tok: token) -> option<ast::binop> {
   alt tok {
       BINOP(STAR)    { some(mul) }
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 4c573b45a1f..c4ae9269914 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -85,7 +85,7 @@ enum token {
 }
 
 #[auto_serialize]
-#[doc = "For interpolation during macro expansion."]
+/// For interpolation during macro expansion.
 enum whole_nt {
     w_item(@ast::item),
     w_block(ast::blk),
@@ -233,14 +233,14 @@ pure fn is_bar(t: token) -> bool {
     alt t { BINOP(OR) | OROR { true } _ { false } }
 }
 
-#[doc = "
-All the valid words that have meaning in the Rust language.
-
-Rust keywords are either 'contextual' or 'restricted'. Contextual
-keywords may be used as identifiers because their appearance in
-the grammar is unambiguous. Restricted keywords may not appear
-in positions that might otherwise contain _value identifiers_.
-"]
+/**
+ * All the valid words that have meaning in the Rust language.
+ *
+ * Rust keywords are either 'contextual' or 'restricted'. Contextual
+ * keywords may be used as identifiers because their appearance in
+ * the grammar is unambiguous. Restricted keywords may not appear
+ * in positions that might otherwise contain _value identifiers_.
+ */
 fn keyword_table() -> hashmap<str, ()> {
     let keywords = str_hash();
     for contextual_keyword_table().each_key |word| {
@@ -252,7 +252,7 @@ fn keyword_table() -> hashmap<str, ()> {
     keywords
 }
 
-#[doc = "Keywords that may be used as identifiers"]
+/// Keywords that may be used as identifiers
 fn contextual_keyword_table() -> hashmap<str, ()> {
     let words = str_hash();
     let keys = ~[
@@ -274,19 +274,20 @@ fn contextual_keyword_table() -> hashmap<str, ()> {
     words
 }
 
-#[doc = "
-Keywords that may not appear in any position that might otherwise contain a
-_value identifier_. Restricted keywords may still be used as other types of
-identifiers.
-
-Reasons:
-
-* For some (most?), if used at the start of a line, they will cause the line
-  to be interpreted as a specific kind of statement, which would be confusing.
-
-* `true` or `false` as identifiers would always be shadowed by
-  the boolean constants
-"]
+/**
+ * Keywords that may not appear in any position that might otherwise contain a
+ * _value identifier_. Restricted keywords may still be used as other types of
+ * identifiers.
+ *
+ * Reasons:
+ *
+ * * For some (most?), if used at the start of a line, they will cause the
+ *   line to be interpreted as a specific kind of statement, which would be
+ *   confusing.
+ *
+ * * `true` or `false` as identifiers would always be shadowed by
+ *   the boolean constants
+ */
 fn restricted_keyword_table() -> hashmap<str, ()> {
     let words = str_hash();
     let keys = ~[