Skip to content

Commit 3621c67

Browse files
committed
comments
1 parent 0c31c93 commit 3621c67

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

src/libsyntax/parse/token.rs

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,22 +310,23 @@ pub fn is_bar(t: &Token) -> bool {
310310
match *t { BINOP(OR) | OROR => true, _ => false }
311311
}
312312

313-
314313
pub mod special_idents {
315314
use ast::Ident;
316315

317-
pub static underscore : Ident = Ident { name: 0, ctxt: 0};
316+
pub static underscore : Ident = Ident { name: 0, ctxt: 0}; // apparently unused?
318317
pub static anon : Ident = Ident { name: 1, ctxt: 0};
319318
pub static invalid : Ident = Ident { name: 2, ctxt: 0}; // ''
320-
pub static unary : Ident = Ident { name: 3, ctxt: 0};
321-
pub static not_fn : Ident = Ident { name: 4, ctxt: 0};
322-
pub static idx_fn : Ident = Ident { name: 5, ctxt: 0};
323-
pub static unary_minus_fn : Ident = Ident { name: 6, ctxt: 0};
319+
pub static unary : Ident = Ident { name: 3, ctxt: 0}; // apparently unused?
320+
pub static not_fn : Ident = Ident { name: 4, ctxt: 0}; // apparently unused?
321+
pub static idx_fn : Ident = Ident { name: 5, ctxt: 0}; // apparently unused?
322+
pub static unary_minus_fn : Ident = Ident { name: 6, ctxt: 0}; // apparently unused?
324323
pub static clownshoes_extensions : Ident = Ident { name: 7, ctxt: 0};
325324

326325
pub static self_ : Ident = Ident { name: 8, ctxt: 0}; // 'self'
327326

328327
/* for matcher NTs */
328+
// none of these appear to be used, but perhaps references to
329+
// these are artificially fabricated by the macro system....
329330
pub static item : Ident = Ident { name: 9, ctxt: 0};
330331
pub static block : Ident = Ident { name: 10, ctxt: 0};
331332
pub static stmt : Ident = Ident { name: 11, ctxt: 0};
@@ -337,7 +338,7 @@ pub mod special_idents {
337338
pub static tt : Ident = Ident { name: 17, ctxt: 0};
338339
pub static matchers : Ident = Ident { name: 18, ctxt: 0};
339340

340-
pub static str : Ident = Ident { name: 19, ctxt: 0}; // for the type
341+
pub static str : Ident = Ident { name: 19, ctxt: 0}; // for the type // apparently unused?
341342

342343
/* outside of libsyntax */
343344
pub static arg : Ident = Ident { name: 20, ctxt: 0};
@@ -350,10 +351,32 @@ pub mod special_idents {
350351
pub static statik : Ident = Ident { name: 27, ctxt: 0};
351352
pub static clownshoes_foreign_mod: Ident = Ident { name: 28, ctxt: 0};
352353
pub static unnamed_field: Ident = Ident { name: 29, ctxt: 0};
353-
pub static c_abi: Ident = Ident { name: 30, ctxt: 0};
354+
pub static c_abi: Ident = Ident { name: 30, ctxt: 0}; // apparently unused?
354355
pub static type_self: Ident = Ident { name: 31, ctxt: 0}; // `Self`
355356
}
356357

358+
// here are the ones that actually occur in the source. Maybe the rest
359+
// should be removed?
360+
/*
361+
special_idents::anon
362+
special_idents::arg
363+
special_idents::blk
364+
special_idents::clownshoe_abi
365+
special_idents::clownshoe_stack_shim
366+
special_idents::clownshoes_extensions
367+
special_idents::clownshoes_foreign_mod
368+
special_idents::descrim
369+
special_idents::invalid
370+
special_idents::main
371+
special_idents::matchers
372+
special_idents::opaque
373+
special_idents::self_
374+
special_idents::statik
375+
special_idents::tt
376+
special_idents::type_self
377+
special_idents::unnamed_field
378+
*/
379+
357380
/**
358381
* Maps a token to a record specifying the corresponding binary
359382
* operator

0 commit comments

Comments
 (0)