summary refs log tree commit diff
path: root/src/libsyntax/parse/attr.rs
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-02-11 13:36:24 -0800
committerJohn Clements <clements@racket-lang.org>2013-02-21 16:17:06 -0800
commit27b06777e6e2469cf4acee00b5702c5c7fb6d414 (patch)
tree5299b5ec41e54e2ce5fefebb33d7b4f802a05518 /src/libsyntax/parse/attr.rs
parent4a5e8c52183a980f6c2fc63a668245d73ecac200 (diff)
downloadrust-27b06777e6e2469cf4acee00b5702c5c7fb6d414.tar.gz
rust-27b06777e6e2469cf4acee00b5702c5c7fb6d414.zip
Cleanup, commenting, trivial renaming
Diffstat (limited to 'src/libsyntax/parse/attr.rs')
-rw-r--r--src/libsyntax/parse/attr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index 5803c607191..4f64d7bed31 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -18,6 +18,7 @@ use parse::token;
 
 use core::either::{Either, Left, Right};
 
+// a parser that can parse attributes.
 pub trait parser_attr {
     fn parse_outer_attributes() -> ~[ast::attribute];
     fn parse_attribute(style: ast::attr_style) -> ast::attribute;
@@ -81,6 +82,9 @@ impl parser_attr for Parser {
     // attribute of the next item (since we can't know whether the attribute
     // is an inner attribute of the containing item or an outer attribute of
     // the first contained item until we see the semi).
+
+    // you can make the 'next' field an Option, but the result is going to be
+    // more useful as a vector.
     fn parse_inner_attrs_and_next() ->
         (~[ast::attribute], ~[ast::attribute]) {
         let mut inner_attrs: ~[ast::attribute] = ~[];