#include namespace pslang::ast { namespace { location get_location_impl(expression_ptr const & statement) { return get_location(*statement); } template location get_location_impl(Statement const & statement) { return statement.location; } location get_location_impl(statement const & statement) { return std::visit([](auto const & statement){ return get_location_impl(statement); }, statement); } } location get_location(statement const & statement) { return get_location_impl(statement); } }