aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/ast.rs12
-rw-r--r--src/comp/front/parser.rs7
2 files changed, 9 insertions, 10 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index 51977b5f..d2bc6578 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -372,12 +372,12 @@ type _obj = rec(vec[obj_field] fields,
vec[@method] methods,
option::t[@method] dtor);
-
-// Hmm. An anon_obj might extend an existing object, in which case it'll
-// probably add fields and methods.
-type anon_obj = rec(option.t[vec[obj_field]] fields,
- vec[@method] methods,
- option.t[ident] with_obj);
+type anon_obj = rec(
+ // New fields and methods, if they exist.
+ Option.t[vec[obj_field]] fields,
+ vec[@method] methods,
+ // with_obj: the original object being extended, if it exists.
+ Option.t[ident] with_obj);
tag mod_index_entry {
mie_view_item(@view_item);
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index f395ea16..cb7435d8 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -795,7 +795,6 @@ fn parse_bottom_expr(parser p) -> @ast::expr {
} else {
unexpected(p, p.peek());
}
-
}
ex = ast::expr_rec(fields, base, p.get_ann());
@@ -836,9 +835,9 @@ fn parse_bottom_expr(parser p) -> @ast::expr {
hi = p.get_hi_pos();
expect(p, token.RBRACE);
- // fields and methods may be *additional* or *overriding* fields
- // and methods if there's a with_obj, or they may be the *only*
- // fields and methods if there's no with_obj.
+ // fields and methods may be *additional* or *overriding* fields and
+ // methods if there's a with_obj, or they may be the *only* fields and
+ // methods if there's no with_obj.
// We don't need to pull ".node" out of fields because it's not a
// "spanned".