third_party_rust_syn/examples/dump-syntax
徐未来 76b407eb79 syn 1.0.107升级至2.0.48
Signed-off-by: 徐未来 <xuweilai2@huawei.com>
2024-04-02 16:51:27 +08:00
..
src syn 1.0.107升级至2.0.48 2024-04-02 16:51:27 +08:00
Cargo.toml syn 1.0.107升级至2.0.48 2024-04-02 16:51:27 +08:00
README.md Update path to dump-syntax main.rs in example invocation 2019-03-09 22:21:45 -08:00

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: [
    ...
}