David Tolnay | 8d1ffa3 | 2018-01-01 00:17:46 -0500 | [diff] [blame] | 1 | Parse a Rust source file into a `syn::File` and print out a debug representation |
2 | of the syntax tree. | ||||
3 | |||||
4 | Use the following command from this directory to test this program by running it | ||||
5 | on its own source code: | ||||
6 | |||||
7 | ``` | ||||
8 | cargo run -- main.rs | ||||
9 | ``` | ||||
10 | |||||
11 | The output will begin with: | ||||
12 | |||||
13 | ``` | ||||
14 | File { | ||||
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 | ``` |