#include namespace pslang::ast { namespace { struct get_location_visitor { location operator()(expression_ptr const & node) { return get_location(*node); } template location operator()(Node const & node) { return node.location; } }; } location get_location(pre_statement const & statement) { return std::visit(get_location_visitor{}, statement); } location get_location(statement const & statement) { return std::visit(get_location_visitor{}, statement); } }