tree: 3bcd26403958fd00442d71fe2c1978f457b55f22 [path history] [tgz]
  1. src/
  2. Cargo.toml
  3. README.md
examples/dump-syntax/README.md

Parse a Rust source file into a syn::File and print out a debug representation of the syntax tree.

Use the following command from this directory to test this program by running it on its own source code:

cargo run -- src/main.rs

The output will begin with:

File {
    shebang: None,
    attrs: [
        Attribute {
            pound_token: Pound,
            style: Inner(
                Bang
            ),
            bracket_token: Bracket,
            path: Path {
                leading_colon: None,
                segments: [
    ...
}