https://github.com/agentcooper/cpp-ast-example
Examples of representing and traversing AST (Abstract Syntax Tree) in C++
https://github.com/agentcooper/cpp-ast-example
ast cpp
Last synced: about 1 year ago
JSON representation
Examples of representing and traversing AST (Abstract Syntax Tree) in C++
- Host: GitHub
- URL: https://github.com/agentcooper/cpp-ast-example
- Owner: agentcooper
- Created: 2023-10-13T18:03:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-13T18:19:24.000Z (over 2 years ago)
- Last Synced: 2025-01-13T05:29:51.902Z (about 1 year ago)
- Topics: ast, cpp
- Language: C++
- Homepage:
- Size: 2.93 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Examples of representing and traversing AST (Abstract Syntax Tree) in C++:
1. Using inheritance and visitor pattern ([ast_inheritance.cpp](ast_inheritance.cpp))
2. Using `std::variant` and `std::visit` ([ast_variant_visit.cpp](ast_variant_visit.cpp))
# Build
```bash
make all
```