Examples of representing and traversing AST (Abstract Syntax Tree) in C++:
- Using inheritance and visitor pattern (ast_inheritance.cpp)
- Using
std::variantandstd::visit(ast_variant_visit.cpp) - Using
std::variantandstd::visitand arena allocation (ast_variant_visit_arena.cpp)
make all