blob: 37c84d80255dd4d27be6dd7fe9b90554ba1e8082 [file] [log] [blame] [view]
David Tolnay8d1ffa32018-01-01 00:17:46 -05001Parse a Rust source file into a `syn::File` and print out a debug representation
2of the syntax tree.
3
4Use the following command from this directory to test this program by running it
5on its own source code:
6
7```
David Tolnayf91eab42019-03-09 22:21:45 -08008cargo run -- src/main.rs
David Tolnay8d1ffa32018-01-01 00:17:46 -05009```
10
11The output will begin with:
12
13```
14File {
15 shebang: None,
16 attrs: [
17 Attribute {
18 pound_token: Pound,
19 style: Inner(
20 Bang
21 ),
22 bracket_token: Bracket,
23 path: Path {
24 leading_colon: None,
25 segments: [
26 ...
27}
28```