]> git.lizzy.rs Git - rust.git/commit
ast_map: Added iterator over all node id's that match a path suffix.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 7 Aug 2014 09:22:42 +0000 (11:22 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Sat, 9 Aug 2014 08:17:31 +0000 (10:17 +0200)
commit4c2ff0ab1790208e5a81abdcebd29d9e7d5c2ccf
tree95f43c73738533af476aef53870196b442248c2c
parent0ba2d042244ba321258deb016d6d6e3a28546e0e
ast_map: Added iterator over all node id's that match a path suffix.

This is useful e.g. for tools need a node-id, such as the flowgraph
pretty printer, since it can avoids the need to first pretty-print the
whole expanded,identified input in order to find out what the node-id
actually is.

It currently only supports path suffixes thst are made up of module
names (e.g. you cannot use the type instantiation form `a::<int>::b`
or `option::Option::unwrap_or` as a path suffix for this tool, though
the tool will produce paths that have non-modulues in the portion of
the path that is not included in the suffix).

(addressed review feedback too)
src/libsyntax/ast_map/mod.rs