diff --git a/include/tint/tint.h b/include/tint/tint.h
index 77cd7ab..be6270f 100644
--- a/include/tint/tint.h
+++ b/include/tint/tint.h
@@ -60,7 +60,7 @@
 #endif  // TINT_BUILD_HLSL_WRITER
 
 #if TINT_BUILD_GLSL_WRITER
-#include "src/tint/lang/glsl/ast_writer/generator.h"
+#include "src/tint/lang/glsl/writer/writer.h"
 #endif  // TINT_BUILD_GLSL_WRITER
 
 namespace tint {
diff --git a/src/dawn/native/opengl/ShaderModuleGL.cpp b/src/dawn/native/opengl/ShaderModuleGL.cpp
index d541f0b..d0ca586 100644
--- a/src/dawn/native/opengl/ShaderModuleGL.cpp
+++ b/src/dawn/native/opengl/ShaderModuleGL.cpp
@@ -45,12 +45,12 @@
     UNREACHABLE();
 }
 
-tint::writer::glsl::Version::Standard ToTintGLStandard(opengl::OpenGLVersion::Standard standard) {
+tint::glsl::writer::Version::Standard ToTintGLStandard(opengl::OpenGLVersion::Standard standard) {
     switch (standard) {
         case opengl::OpenGLVersion::Standard::Desktop:
-            return tint::writer::glsl::Version::Standard::kDesktop;
+            return tint::glsl::writer::Version::Standard::kDesktop;
         case opengl::OpenGLVersion::Standard::ES:
-            return tint::writer::glsl::Version::Standard::kES;
+            return tint::glsl::writer::Version::Standard::kES;
     }
     UNREACHABLE();
 }
@@ -219,8 +219,8 @@
                                        program, r.entryPointName.c_str(), r.limits));
             }
 
-            tint::writer::glsl::Options tintOptions;
-            tintOptions.version = tint::writer::glsl::Version(ToTintGLStandard(r.glVersionStandard),
+            tint::glsl::writer::Options tintOptions;
+            tintOptions.version = tint::glsl::writer::Version(ToTintGLStandard(r.glVersionStandard),
                                                               r.glVersionMajor, r.glVersionMinor);
 
             // TODO(crbug.com/dawn/1686): Robustness causes shader compilation failures.
@@ -264,7 +264,7 @@
             tintOptions.binding_points = std::move(r.glBindings);
             tintOptions.allow_collisions = true;
 
-            auto result = tint::writer::glsl::Generate(&program, tintOptions, r.entryPointName);
+            auto result = tint::glsl::writer::Generate(&program, tintOptions, r.entryPointName);
             DAWN_INVALID_IF(!result.success, "An error occured while generating GLSL: %s.",
                             result.error);
 
diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn
index 1281bbf..2a10c63 100644
--- a/src/tint/BUILD.gn
+++ b/src/tint/BUILD.gn
@@ -1162,12 +1162,15 @@
 
 libtint_source_set("libtint_glsl_writer_src") {
   sources = [
-    "lang/glsl/ast_writer/generator.cc",
-    "lang/glsl/ast_writer/generator.h",
-    "lang/glsl/ast_writer/generator_impl.cc",
-    "lang/glsl/ast_writer/generator_impl.h",
-    "lang/glsl/ast_writer/options.h",
-    "lang/glsl/ast_writer/version.h",
+    "lang/glsl/writer/ast_printer/ast_printer.cc",
+    "lang/glsl/writer/ast_printer/ast_printer.h",
+    "lang/glsl/writer/options.cc",
+    "lang/glsl/writer/options.h",
+    "lang/glsl/writer/result.cc",
+    "lang/glsl/writer/result.h",
+    "lang/glsl/writer/version.h",
+    "lang/glsl/writer/writer.cc",
+    "lang/glsl/writer/writer.h",
   ]
 
   deps = [
@@ -2283,38 +2286,38 @@
 
   tint_unittests_source_set("tint_unittests_glsl_writer_src") {
     sources = [
-      "lang/glsl/ast_writer/generator_impl_array_accessor_test.cc",
-      "lang/glsl/ast_writer/generator_impl_assign_test.cc",
-      "lang/glsl/ast_writer/generator_impl_binary_test.cc",
-      "lang/glsl/ast_writer/generator_impl_bitcast_test.cc",
-      "lang/glsl/ast_writer/generator_impl_block_test.cc",
-      "lang/glsl/ast_writer/generator_impl_break_test.cc",
-      "lang/glsl/ast_writer/generator_impl_builtin_test.cc",
-      "lang/glsl/ast_writer/generator_impl_builtin_texture_test.cc",
-      "lang/glsl/ast_writer/generator_impl_call_test.cc",
-      "lang/glsl/ast_writer/generator_impl_case_test.cc",
-      "lang/glsl/ast_writer/generator_impl_cast_test.cc",
-      "lang/glsl/ast_writer/generator_impl_constructor_test.cc",
-      "lang/glsl/ast_writer/generator_impl_continue_test.cc",
-      "lang/glsl/ast_writer/generator_impl_discard_test.cc",
-      "lang/glsl/ast_writer/generator_impl_function_test.cc",
-      "lang/glsl/ast_writer/generator_impl_identifier_test.cc",
-      "lang/glsl/ast_writer/generator_impl_if_test.cc",
-      "lang/glsl/ast_writer/generator_impl_import_test.cc",
-      "lang/glsl/ast_writer/generator_impl_loop_test.cc",
-      "lang/glsl/ast_writer/generator_impl_member_accessor_test.cc",
-      "lang/glsl/ast_writer/generator_impl_module_constant_test.cc",
-      "lang/glsl/ast_writer/generator_impl_return_test.cc",
-      "lang/glsl/ast_writer/generator_impl_sanitizer_test.cc",
-      "lang/glsl/ast_writer/generator_impl_storage_buffer_test.cc",
-      "lang/glsl/ast_writer/generator_impl_switch_test.cc",
-      "lang/glsl/ast_writer/generator_impl_test.cc",
-      "lang/glsl/ast_writer/generator_impl_type_test.cc",
-      "lang/glsl/ast_writer/generator_impl_unary_op_test.cc",
-      "lang/glsl/ast_writer/generator_impl_uniform_buffer_test.cc",
-      "lang/glsl/ast_writer/generator_impl_variable_decl_statement_test.cc",
-      "lang/glsl/ast_writer/generator_impl_workgroup_var_test.cc",
-      "lang/glsl/ast_writer/test_helper.h",
+      "lang/glsl/writer/ast_printer/array_accessor_test.cc",
+      "lang/glsl/writer/ast_printer/assign_test.cc",
+      "lang/glsl/writer/ast_printer/ast_printer_test.cc",
+      "lang/glsl/writer/ast_printer/binary_test.cc",
+      "lang/glsl/writer/ast_printer/bitcast_test.cc",
+      "lang/glsl/writer/ast_printer/block_test.cc",
+      "lang/glsl/writer/ast_printer/break_test.cc",
+      "lang/glsl/writer/ast_printer/builtin_test.cc",
+      "lang/glsl/writer/ast_printer/builtin_texture_test.cc",
+      "lang/glsl/writer/ast_printer/call_test.cc",
+      "lang/glsl/writer/ast_printer/case_test.cc",
+      "lang/glsl/writer/ast_printer/cast_test.cc",
+      "lang/glsl/writer/ast_printer/constructor_test.cc",
+      "lang/glsl/writer/ast_printer/continue_test.cc",
+      "lang/glsl/writer/ast_printer/discard_test.cc",
+      "lang/glsl/writer/ast_printer/function_test.cc",
+      "lang/glsl/writer/ast_printer/identifier_test.cc",
+      "lang/glsl/writer/ast_printer/if_test.cc",
+      "lang/glsl/writer/ast_printer/import_test.cc",
+      "lang/glsl/writer/ast_printer/loop_test.cc",
+      "lang/glsl/writer/ast_printer/member_accessor_test.cc",
+      "lang/glsl/writer/ast_printer/module_constant_test.cc",
+      "lang/glsl/writer/ast_printer/return_test.cc",
+      "lang/glsl/writer/ast_printer/sanitizer_test.cc",
+      "lang/glsl/writer/ast_printer/storage_buffer_test.cc",
+      "lang/glsl/writer/ast_printer/switch_test.cc",
+      "lang/glsl/writer/ast_printer/test_helper.h",
+      "lang/glsl/writer/ast_printer/type_test.cc",
+      "lang/glsl/writer/ast_printer/unary_op_test.cc",
+      "lang/glsl/writer/ast_printer/uniform_buffer_test.cc",
+      "lang/glsl/writer/ast_printer/variable_decl_statement_test.cc",
+      "lang/glsl/writer/ast_printer/workgroup_var_test.cc",
     ]
 
     deps = [
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index e32495e..16cc0db 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -714,12 +714,15 @@
 
 if(${TINT_BUILD_GLSL_WRITER})
   list(APPEND TINT_LIB_SRCS
-    lang/glsl/ast_writer/generator.cc
-    lang/glsl/ast_writer/generator.h
-    lang/glsl/ast_writer/generator_impl.cc
-    lang/glsl/ast_writer/generator_impl.h
-    lang/glsl/ast_writer/options.h
-    lang/glsl/ast_writer/version.h
+    lang/glsl/writer/ast_printer/ast_printer.cc
+    lang/glsl/writer/ast_printer/ast_printer.h
+    lang/glsl/writer/writer.cc
+    lang/glsl/writer/writer.h
+    lang/glsl/writer/options.cc
+    lang/glsl/writer/options.h
+    lang/glsl/writer/result.cc
+    lang/glsl/writer/result.h
+    lang/glsl/writer/version.h
   )
 endif()
 
@@ -1512,38 +1515,38 @@
 
   if (${TINT_BUILD_GLSL_WRITER})
     list(APPEND TINT_TEST_SRCS
-      lang/glsl/ast_writer/generator_impl_array_accessor_test.cc
-      lang/glsl/ast_writer/generator_impl_assign_test.cc
-      lang/glsl/ast_writer/generator_impl_binary_test.cc
-      lang/glsl/ast_writer/generator_impl_bitcast_test.cc
-      lang/glsl/ast_writer/generator_impl_block_test.cc
-      lang/glsl/ast_writer/generator_impl_break_test.cc
-      lang/glsl/ast_writer/generator_impl_builtin_test.cc
-      lang/glsl/ast_writer/generator_impl_builtin_texture_test.cc
-      lang/glsl/ast_writer/generator_impl_call_test.cc
-      lang/glsl/ast_writer/generator_impl_case_test.cc
-      lang/glsl/ast_writer/generator_impl_cast_test.cc
-      lang/glsl/ast_writer/generator_impl_constructor_test.cc
-      lang/glsl/ast_writer/generator_impl_continue_test.cc
-      lang/glsl/ast_writer/generator_impl_discard_test.cc
-      lang/glsl/ast_writer/generator_impl_function_test.cc
-      lang/glsl/ast_writer/generator_impl_identifier_test.cc
-      lang/glsl/ast_writer/generator_impl_if_test.cc
-      lang/glsl/ast_writer/generator_impl_import_test.cc
-      lang/glsl/ast_writer/generator_impl_loop_test.cc
-      lang/glsl/ast_writer/generator_impl_member_accessor_test.cc
-      lang/glsl/ast_writer/generator_impl_module_constant_test.cc
-      lang/glsl/ast_writer/generator_impl_return_test.cc
-      lang/glsl/ast_writer/generator_impl_sanitizer_test.cc
-      lang/glsl/ast_writer/generator_impl_storage_buffer_test.cc
-      lang/glsl/ast_writer/generator_impl_switch_test.cc
-      lang/glsl/ast_writer/generator_impl_test.cc
-      lang/glsl/ast_writer/generator_impl_type_test.cc
-      lang/glsl/ast_writer/generator_impl_unary_op_test.cc
-      lang/glsl/ast_writer/generator_impl_uniform_buffer_test.cc
-      lang/glsl/ast_writer/generator_impl_variable_decl_statement_test.cc
-      lang/glsl/ast_writer/generator_impl_workgroup_var_test.cc
-      lang/glsl/ast_writer/test_helper.h
+      lang/glsl/writer/ast_printer/array_accessor_test.cc
+      lang/glsl/writer/ast_printer/assign_test.cc
+      lang/glsl/writer/ast_printer/ast_printer_test.cc
+      lang/glsl/writer/ast_printer/binary_test.cc
+      lang/glsl/writer/ast_printer/bitcast_test.cc
+      lang/glsl/writer/ast_printer/block_test.cc
+      lang/glsl/writer/ast_printer/break_test.cc
+      lang/glsl/writer/ast_printer/builtin_test.cc
+      lang/glsl/writer/ast_printer/builtin_texture_test.cc
+      lang/glsl/writer/ast_printer/call_test.cc
+      lang/glsl/writer/ast_printer/case_test.cc
+      lang/glsl/writer/ast_printer/cast_test.cc
+      lang/glsl/writer/ast_printer/constructor_test.cc
+      lang/glsl/writer/ast_printer/continue_test.cc
+      lang/glsl/writer/ast_printer/discard_test.cc
+      lang/glsl/writer/ast_printer/function_test.cc
+      lang/glsl/writer/ast_printer/identifier_test.cc
+      lang/glsl/writer/ast_printer/if_test.cc
+      lang/glsl/writer/ast_printer/import_test.cc
+      lang/glsl/writer/ast_printer/loop_test.cc
+      lang/glsl/writer/ast_printer/member_accessor_test.cc
+      lang/glsl/writer/ast_printer/module_constant_test.cc
+      lang/glsl/writer/ast_printer/return_test.cc
+      lang/glsl/writer/ast_printer/sanitizer_test.cc
+      lang/glsl/writer/ast_printer/storage_buffer_test.cc
+      lang/glsl/writer/ast_printer/switch_test.cc
+      lang/glsl/writer/ast_printer/type_test.cc
+      lang/glsl/writer/ast_printer/unary_op_test.cc
+      lang/glsl/writer/ast_printer/uniform_buffer_test.cc
+      lang/glsl/writer/ast_printer/variable_decl_statement_test.cc
+      lang/glsl/writer/ast_printer/workgroup_var_test.cc
+      lang/glsl/writer/ast_printer/test_helper.h
     )
   endif()
 
@@ -1721,7 +1724,7 @@
   )
 
   if (${TINT_BUILD_GLSL_WRITER})
-    list(APPEND TINT_BENCHMARK_SRCS lang/glsl/ast_writer/generator_bench.cc)
+    list(APPEND TINT_BENCHMARK_SRCS lang/glsl/writer/writer_bench.cc)
   endif()
   if (${TINT_BUILD_HLSL_WRITER})
     list(APPEND TINT_BENCHMARK_SRCS lang/hlsl/writer/writer_bench.cc)
diff --git a/src/tint/cmd/loopy.cc b/src/tint/cmd/loopy.cc
index 0a56bba..4fc07f8 100644
--- a/src/tint/cmd/loopy.cc
+++ b/src/tint/cmd/loopy.cc
@@ -266,10 +266,10 @@
 /// @returns true on success
 bool GenerateGlsl(const tint::Program* program) {
 #if TINT_BUILD_GLSL_WRITER
-    tint::writer::glsl::Options gen_options;
+    tint::glsl::writer::Options gen_options;
     gen_options.external_texture_options.bindings_map =
         tint::cmd::GenerateExternalTextureBindings(program);
-    auto result = tint::writer::glsl::Generate(program, gen_options, "");
+    auto result = tint::glsl::writer::Generate(program, gen_options, "");
     if (!result.success) {
         tint::cmd::PrintWGSL(std::cerr, *program);
         std::cerr << "Failed to generate: " << result.error << std::endl;
diff --git a/src/tint/cmd/main.cc b/src/tint/cmd/main.cc
index 5fe63ea..cc7b8ac 100644
--- a/src/tint/cmd/main.cc
+++ b/src/tint/cmd/main.cc
@@ -826,11 +826,11 @@
     }
 
     auto generate = [&](const tint::Program* prg, const std::string entry_point_name) -> bool {
-        tint::writer::glsl::Options gen_options;
+        tint::glsl::writer::Options gen_options;
         gen_options.disable_robustness = !options.enable_robustness;
         gen_options.external_texture_options.bindings_map =
             tint::cmd::GenerateExternalTextureBindings(prg);
-        auto result = tint::writer::glsl::Generate(prg, gen_options, entry_point_name);
+        auto result = tint::glsl::writer::Generate(prg, gen_options, entry_point_name);
         if (!result.success) {
             tint::cmd::PrintWGSL(std::cerr, *prg);
             std::cerr << "Failed to generate: " << result.error << std::endl;
diff --git a/src/tint/fuzzers/tint_concurrency_fuzzer.cc b/src/tint/fuzzers/tint_concurrency_fuzzer.cc
index 3cd7f95..6b3523c 100644
--- a/src/tint/fuzzers/tint_concurrency_fuzzer.cc
+++ b/src/tint/fuzzers/tint_concurrency_fuzzer.cc
@@ -20,7 +20,7 @@
 #include <thread>
 
 #include "src/tint/fuzzers/apply_substitute_overrides.h"
-#include "src/tint/lang/glsl/ast_writer/generator.h"
+#include "src/tint/lang/glsl/writer/writer.h"
 #include "src/tint/lang/hlsl/writer/writer.h"
 #include "src/tint/lang/msl/writer/writer.h"
 #include "src/tint/lang/spirv/ast_writer/generator.h"
@@ -103,7 +103,7 @@
 
 #if TINT_BUILD_GLSL_WRITER
                 case Writer::kGLSL: {
-                    tint::writer::glsl::Generate(&program, {}, entry_point);
+                    tint::glsl::writer::Generate(&program, {}, entry_point);
                     break;
                 }
 #endif  // TINT_BUILD_GLSL_WRITER
diff --git a/src/tint/lang/glsl/ast_writer/generator.h b/src/tint/lang/glsl/ast_writer/generator.h
deleted file mode 100644
index 4340083..0000000
--- a/src/tint/lang/glsl/ast_writer/generator.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef SRC_TINT_LANG_GLSL_AST_WRITER_GENERATOR_H_
-#define SRC_TINT_LANG_GLSL_AST_WRITER_GENERATOR_H_
-
-#include <memory>
-#include <string>
-#include <unordered_map>
-#include <utility>
-#include <vector>
-
-#include "src/tint/lang/core/builtin/access.h"
-#include "src/tint/lang/glsl/ast_writer/options.h"
-#include "src/tint/lang/glsl/ast_writer/version.h"
-#include "src/tint/lang/wgsl/ast/pipeline_stage.h"
-#include "src/tint/lang/wgsl/sem/sampler_texture_pair.h"
-#include "tint/binding_point.h"
-#include "tint/external_texture_options.h"
-
-// Forward declarations
-namespace tint {
-class Program;
-}  // namespace tint
-
-namespace tint::writer::glsl {
-
-/// The result produced when generating GLSL.
-struct Result {
-    /// Constructor
-    Result();
-
-    /// Destructor
-    ~Result();
-
-    /// Copy constructor
-    Result(const Result&);
-
-    /// True if generation was successful.
-    bool success = false;
-
-    /// The errors generated during code generation, if any.
-    std::string error;
-
-    /// The generated GLSL.
-    std::string glsl = "";
-
-    /// The list of entry points in the generated GLSL.
-    std::vector<std::pair<std::string, ast::PipelineStage>> entry_points;
-};
-
-/// Generate GLSL for a program, according to a set of configuration options.
-/// The result will contain the GLSL, as well as success status and diagnostic
-/// information.
-/// @param program the program to translate to GLSL
-/// @param options the configuration options to use when generating GLSL
-/// @param entry_point the entry point to generate GLSL for
-/// @returns the resulting GLSL and supplementary information
-Result Generate(const Program* program, const Options& options, const std::string& entry_point);
-
-}  // namespace tint::writer::glsl
-
-#endif  // SRC_TINT_LANG_GLSL_AST_WRITER_GENERATOR_H_
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_array_accessor_test.cc b/src/tint/lang/glsl/writer/ast_printer/array_accessor_test.cc
similarity index 79%
rename from src/tint/lang/glsl/ast_writer/generator_impl_array_accessor_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/array_accessor_test.cc
index 1a02e79..06be52a 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_array_accessor_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/array_accessor_test.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "src/tint/utils/text/string_stream.h"
 
@@ -20,17 +20,17 @@
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Expression = TestHelper;
+using GlslASTPrinterTest_Expression = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Expression, IndexAccessor) {
+TEST_F(GlslASTPrinterTest_Expression, IndexAccessor) {
     GlobalVar("ary", ty.array<i32, 10>(), builtin::AddressSpace::kPrivate);
     auto* expr = IndexAccessor("ary", 5_i);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -39,4 +39,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_assign_test.cc b/src/tint/lang/glsl/writer/ast_printer/assign_test.cc
similarity index 79%
rename from src/tint/lang/glsl/ast_writer/generator_impl_assign_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/assign_test.cc
index dc81e26..15f9d88 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_assign_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/assign_test.cc
@@ -12,22 +12,22 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Assign = TestHelper;
+using GlslASTPrinterTest_Assign = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Assign, Emit_Assign) {
+TEST_F(GlslASTPrinterTest_Assign, Emit_Assign) {
     GlobalVar("lhs", ty.i32(), builtin::AddressSpace::kPrivate);
     GlobalVar("rhs", ty.i32(), builtin::AddressSpace::kPrivate);
     auto* assign = Assign("lhs", "rhs");
     WrapInFunction(assign);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
 
@@ -37,4 +37,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl.cc b/src/tint/lang/glsl/writer/ast_printer/ast_printer.cc
similarity index 91%
rename from src/tint/lang/glsl/ast_writer/generator_impl.cc
rename to src/tint/lang/glsl/writer/ast_printer/ast_printer.cc
index 0681815..5eaf72b 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/ast_printer.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/generator_impl.h"
+#include "src/tint/lang/glsl/writer/ast_printer/ast_printer.h"
 
 #include <algorithm>
 #include <cmath>
@@ -32,7 +32,7 @@
 #include "src/tint/lang/core/type/sampled_texture.h"
 #include "src/tint/lang/core/type/storage_texture.h"
 #include "src/tint/lang/core/type/texture_dimension.h"
-#include "src/tint/lang/glsl/ast_writer/options.h"
+#include "src/tint/lang/glsl/writer/options.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/lang/wgsl/ast/id_attribute.h"
 #include "src/tint/lang/wgsl/ast/internal_attribute.h"
@@ -88,7 +88,7 @@
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 const char kTempNamePrefix[] = "tint_tmp";
@@ -131,7 +131,7 @@
     } else if (std::isnan(value)) {
         out << "0.0f /* nan */";
     } else {
-        out << FloatToString(value) << "f";
+        out << tint::writer::FloatToString(value) << "f";
     }
 }
 
@@ -141,7 +141,7 @@
     } else if (std::isnan(value)) {
         out << "0.0hf /* nan */";
     } else {
-        out << FloatToString(value) << "hf";
+        out << tint::writer::FloatToString(value) << "hf";
     }
 }
 
@@ -255,12 +255,12 @@
     return result;
 }
 
-GeneratorImpl::GeneratorImpl(const Program* program, const Version& version)
+ASTPrinter::ASTPrinter(const Program* program, const Version& version)
     : builder_(ProgramBuilder::Wrap(program)), version_(version) {}
 
-GeneratorImpl::~GeneratorImpl() = default;
+ASTPrinter::~ASTPrinter() = default;
 
-void GeneratorImpl::Generate() {
+void ASTPrinter::Generate() {
     {
         auto out = Line();
         out << "#version " << version_.major_version << version_.minor_version << "0";
@@ -340,7 +340,7 @@
     }
 }
 
-void GeneratorImpl::RecordExtension(const ast::Enable* enable) {
+void ASTPrinter::RecordExtension(const ast::Enable* enable) {
     // Deal with extension node here, recording it within the generator for later emition.
 
     if (enable->HasExtension(builtin::Extension::kF16)) {
@@ -348,15 +348,15 @@
     }
 }
 
-void GeneratorImpl::EmitIndexAccessor(utils::StringStream& out,
-                                      const ast::IndexAccessorExpression* expr) {
+void ASTPrinter::EmitIndexAccessor(utils::StringStream& out,
+                                   const ast::IndexAccessorExpression* expr) {
     EmitExpression(out, expr->object);
     out << "[";
     EmitExpression(out, expr->index);
     out << "]";
 }
 
-void GeneratorImpl::EmitBitcast(utils::StringStream& out, const ast::BitcastExpression* expr) {
+void ASTPrinter::EmitBitcast(utils::StringStream& out, const ast::BitcastExpression* expr) {
     auto* src_type = TypeOf(expr->expr)->UnwrapRef();
     auto* dst_type = TypeOf(expr)->UnwrapRef();
 
@@ -516,7 +516,7 @@
     }
 }
 
-void GeneratorImpl::EmitAssign(const ast::AssignmentStatement* stmt) {
+void ASTPrinter::EmitAssign(const ast::AssignmentStatement* stmt) {
     auto out = Line();
     EmitExpression(out, stmt->lhs);
     out << " = ";
@@ -524,8 +524,7 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitVectorRelational(utils::StringStream& out,
-                                         const ast::BinaryExpression* expr) {
+void ASTPrinter::EmitVectorRelational(utils::StringStream& out, const ast::BinaryExpression* expr) {
     switch (expr->op) {
         case ast::BinaryOp::kEqual:
             out << "equal";
@@ -554,7 +553,7 @@
     EmitExpression(out, expr->rhs);
 }
 
-void GeneratorImpl::EmitBitwiseBoolOp(utils::StringStream& out, const ast::BinaryExpression* expr) {
+void ASTPrinter::EmitBitwiseBoolOp(utils::StringStream& out, const ast::BinaryExpression* expr) {
     auto* bool_type = TypeOf(expr->lhs)->UnwrapRef();
     auto* uint_type = BoolTypeToUint(bool_type);
 
@@ -587,7 +586,7 @@
     }
 }
 
-void GeneratorImpl::EmitFloatModulo(utils::StringStream& out, const ast::BinaryExpression* expr) {
+void ASTPrinter::EmitFloatModulo(utils::StringStream& out, const ast::BinaryExpression* expr) {
     std::string fn;
     auto* ret_ty = TypeOf(expr)->UnwrapRef();
     auto* lhs_ty = TypeOf(expr->lhs)->UnwrapRef();
@@ -634,7 +633,7 @@
     }
 }
 
-void GeneratorImpl::EmitBinary(utils::StringStream& out, const ast::BinaryExpression* expr) {
+void ASTPrinter::EmitBinary(utils::StringStream& out, const ast::BinaryExpression* expr) {
     if (IsRelational(expr->op) && !TypeOf(expr->lhs)->UnwrapRef()->Is<type::Scalar>()) {
         EmitVectorRelational(out, expr);
         return;
@@ -751,35 +750,35 @@
     EmitExpression(out, expr->rhs);
 }
 
-void GeneratorImpl::EmitStatements(utils::VectorRef<const ast::Statement*> stmts) {
+void ASTPrinter::EmitStatements(utils::VectorRef<const ast::Statement*> stmts) {
     for (auto* s : stmts) {
         EmitStatement(s);
     }
 }
 
-void GeneratorImpl::EmitStatementsWithIndent(utils::VectorRef<const ast::Statement*> stmts) {
+void ASTPrinter::EmitStatementsWithIndent(utils::VectorRef<const ast::Statement*> stmts) {
     ScopedIndent si(this);
     EmitStatements(stmts);
 }
 
-void GeneratorImpl::EmitBlock(const ast::BlockStatement* stmt) {
+void ASTPrinter::EmitBlock(const ast::BlockStatement* stmt) {
     Line() << "{";
     EmitStatementsWithIndent(stmt->statements);
     Line() << "}";
 }
 
-void GeneratorImpl::EmitBreak(const ast::BreakStatement*) {
+void ASTPrinter::EmitBreak(const ast::BreakStatement*) {
     Line() << "break;";
 }
 
-void GeneratorImpl::EmitBreakIf(const ast::BreakIfStatement* b) {
+void ASTPrinter::EmitBreakIf(const ast::BreakIfStatement* b) {
     auto out = Line();
     out << "if (";
     EmitExpression(out, b->condition);
     out << ") { break; }";
 }
 
-void GeneratorImpl::EmitCall(utils::StringStream& out, const ast::CallExpression* expr) {
+void ASTPrinter::EmitCall(utils::StringStream& out, const ast::CallExpression* expr) {
     auto* call = builder_.Sem().Get<sem::Call>(expr);
     Switch(
         call->Target(),  //
@@ -793,9 +792,9 @@
         });
 }
 
-void GeneratorImpl::EmitFunctionCall(utils::StringStream& out,
-                                     const sem::Call* call,
-                                     const sem::Function* fn) {
+void ASTPrinter::EmitFunctionCall(utils::StringStream& out,
+                                  const sem::Call* call,
+                                  const sem::Function* fn) {
     const auto& args = call->Arguments();
     auto* ident = fn->Declaration()->name;
 
@@ -813,9 +812,9 @@
     }
 }
 
-void GeneratorImpl::EmitBuiltinCall(utils::StringStream& out,
-                                    const sem::Call* call,
-                                    const sem::Builtin* builtin) {
+void ASTPrinter::EmitBuiltinCall(utils::StringStream& out,
+                                 const sem::Call* call,
+                                 const sem::Builtin* builtin) {
     auto* expr = call->Declaration();
     if (builtin->IsTexture()) {
         EmitTextureCall(out, call, builtin);
@@ -877,18 +876,18 @@
     }
 }
 
-void GeneratorImpl::EmitValueConversion(utils::StringStream& out,
-                                        const sem::Call* call,
-                                        const sem::ValueConversion* conv) {
+void ASTPrinter::EmitValueConversion(utils::StringStream& out,
+                                     const sem::Call* call,
+                                     const sem::ValueConversion* conv) {
     EmitType(out, conv->Target(), builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite,
              "");
     ScopedParen sp(out);
     EmitExpression(out, call->Arguments()[0]->Declaration());
 }
 
-void GeneratorImpl::EmitValueConstructor(utils::StringStream& out,
-                                         const sem::Call* call,
-                                         const sem::ValueConstructor* ctor) {
+void ASTPrinter::EmitValueConstructor(utils::StringStream& out,
+                                      const sem::Call* call,
+                                      const sem::ValueConstructor* ctor) {
     auto* type = ctor->ReturnType();
 
     // If the value constructor is empty then we need to construct with the zero value for all
@@ -912,9 +911,9 @@
     }
 }
 
-void GeneratorImpl::EmitWorkgroupAtomicCall(utils::StringStream& out,
-                                            const ast::CallExpression* expr,
-                                            const sem::Builtin* builtin) {
+void ASTPrinter::EmitWorkgroupAtomicCall(utils::StringStream& out,
+                                         const ast::CallExpression* expr,
+                                         const sem::Builtin* builtin) {
     auto call = [&](const char* name) {
         out << name;
         {
@@ -1023,13 +1022,13 @@
     TINT_UNREACHABLE(Writer, diagnostics_) << "unsupported atomic builtin: " << builtin->Type();
 }
 
-void GeneratorImpl::EmitArrayLength(utils::StringStream& out, const ast::CallExpression* expr) {
+void ASTPrinter::EmitArrayLength(utils::StringStream& out, const ast::CallExpression* expr) {
     out << "uint(";
     EmitExpression(out, expr->args[0]);
     out << ".length())";
 }
 
-void GeneratorImpl::EmitExtractBits(utils::StringStream& out, const ast::CallExpression* expr) {
+void ASTPrinter::EmitExtractBits(utils::StringStream& out, const ast::CallExpression* expr) {
     out << "bitfieldExtract(";
     EmitExpression(out, expr->args[0]);
     out << ", int(";
@@ -1039,7 +1038,7 @@
     out << "))";
 }
 
-void GeneratorImpl::EmitInsertBits(utils::StringStream& out, const ast::CallExpression* expr) {
+void ASTPrinter::EmitInsertBits(utils::StringStream& out, const ast::CallExpression* expr) {
     out << "bitfieldInsert(";
     EmitExpression(out, expr->args[0]);
     out << ", ";
@@ -1051,7 +1050,7 @@
     out << "))";
 }
 
-void GeneratorImpl::EmitEmulatedFMA(utils::StringStream& out, const ast::CallExpression* expr) {
+void ASTPrinter::EmitEmulatedFMA(utils::StringStream& out, const ast::CallExpression* expr) {
     out << "((";
     EmitExpression(out, expr->args[0]);
     out << ") * (";
@@ -1061,8 +1060,7 @@
     out << "))";
 }
 
-void GeneratorImpl::EmitCountOneBitsCall(utils::StringStream& out,
-                                         const ast::CallExpression* expr) {
+void ASTPrinter::EmitCountOneBitsCall(utils::StringStream& out, const ast::CallExpression* expr) {
     // GLSL's bitCount returns an integer type, so cast it to the appropriate
     // unsigned type.
     EmitType(out, TypeOf(expr)->UnwrapRef(), builtin::AddressSpace::kUndefined,
@@ -1072,9 +1070,9 @@
     out << "))";
 }
 
-void GeneratorImpl::EmitSelectCall(utils::StringStream& out,
-                                   const ast::CallExpression* expr,
-                                   const sem::Builtin* builtin) {
+void ASTPrinter::EmitSelectCall(utils::StringStream& out,
+                                const ast::CallExpression* expr,
+                                const sem::Builtin* builtin) {
     // GLSL does not support ternary expressions with a bool vector conditional,
     // so polyfill with a helper.
     if (auto* vec = builtin->Parameters()[2]->Type()->As<type::Vector>()) {
@@ -1112,9 +1110,9 @@
     EmitExpression(out, expr_false);
 }
 
-void GeneratorImpl::EmitDotCall(utils::StringStream& out,
-                                const ast::CallExpression* expr,
-                                const sem::Builtin* builtin) {
+void ASTPrinter::EmitDotCall(utils::StringStream& out,
+                             const ast::CallExpression* expr,
+                             const sem::Builtin* builtin) {
     auto* vec_ty = builtin->Parameters()[0]->Type()->As<type::Vector>();
     std::string fn = "dot";
     if (vec_ty->type()->is_integer_scalar()) {
@@ -1167,9 +1165,9 @@
     EmitExpression(out, expr->args[1]);
 }
 
-void GeneratorImpl::EmitModfCall(utils::StringStream& out,
-                                 const ast::CallExpression* expr,
-                                 const sem::Builtin* builtin) {
+void ASTPrinter::EmitModfCall(utils::StringStream& out,
+                              const ast::CallExpression* expr,
+                              const sem::Builtin* builtin) {
     TINT_ASSERT(Writer, expr->args.Length() == 1);
     CallBuiltinHelper(out, expr, builtin,
                       [&](TextBuffer* b, const std::vector<std::string>& params) {
@@ -1188,9 +1186,9 @@
                       });
 }
 
-void GeneratorImpl::EmitFrexpCall(utils::StringStream& out,
-                                  const ast::CallExpression* expr,
-                                  const sem::Builtin* builtin) {
+void ASTPrinter::EmitFrexpCall(utils::StringStream& out,
+                               const ast::CallExpression* expr,
+                               const sem::Builtin* builtin) {
     TINT_ASSERT(Writer, expr->args.Length() == 1);
     CallBuiltinHelper(out, expr, builtin,
                       [&](TextBuffer* b, const std::vector<std::string>& params) {
@@ -1209,9 +1207,9 @@
                       });
 }
 
-void GeneratorImpl::EmitDegreesCall(utils::StringStream& out,
-                                    const ast::CallExpression* expr,
-                                    const sem::Builtin* builtin) {
+void ASTPrinter::EmitDegreesCall(utils::StringStream& out,
+                                 const ast::CallExpression* expr,
+                                 const sem::Builtin* builtin) {
     auto* return_elem_type = builtin->ReturnType()->DeepestElement();
     const std::string suffix = Is<type::F16>(return_elem_type) ? "hf" : "f";
     CallBuiltinHelper(out, expr, builtin,
@@ -1221,9 +1219,9 @@
                       });
 }
 
-void GeneratorImpl::EmitRadiansCall(utils::StringStream& out,
-                                    const ast::CallExpression* expr,
-                                    const sem::Builtin* builtin) {
+void ASTPrinter::EmitRadiansCall(utils::StringStream& out,
+                                 const ast::CallExpression* expr,
+                                 const sem::Builtin* builtin) {
     auto* return_elem_type = builtin->ReturnType()->DeepestElement();
     const std::string suffix = Is<type::F16>(return_elem_type) ? "hf" : "f";
     CallBuiltinHelper(out, expr, builtin,
@@ -1233,9 +1231,9 @@
                       });
 }
 
-void GeneratorImpl::EmitQuantizeToF16Call(utils::StringStream& out,
-                                          const ast::CallExpression* expr,
-                                          const sem::Builtin* builtin) {
+void ASTPrinter::EmitQuantizeToF16Call(utils::StringStream& out,
+                                       const ast::CallExpression* expr,
+                                       const sem::Builtin* builtin) {
     // Emulate by casting to f16 and back again.
     CallBuiltinHelper(
         out, expr, builtin, [&](TextBuffer* b, const std::vector<std::string>& params) {
@@ -1264,7 +1262,7 @@
         });
 }
 
-void GeneratorImpl::EmitBarrierCall(utils::StringStream& out, const sem::Builtin* builtin) {
+void ASTPrinter::EmitBarrierCall(utils::StringStream& out, const sem::Builtin* builtin) {
     // TODO(crbug.com/tint/661): Combine sequential barriers to a single
     // instruction.
     if (builtin->Type() == builtin::Function::kWorkgroupBarrier) {
@@ -1277,7 +1275,7 @@
     }
 }
 
-const ast::Expression* GeneratorImpl::CreateF32Zero(const sem::Statement* stmt) {
+const ast::Expression* ASTPrinter::CreateF32Zero(const sem::Statement* stmt) {
     auto* zero = builder_.Expr(0_f);
     auto* f32 = builder_.create<type::F32>();
     auto* sem_zero = builder_.create<sem::ValueExpression>(
@@ -1287,9 +1285,9 @@
     return zero;
 }
 
-void GeneratorImpl::EmitTextureCall(utils::StringStream& out,
-                                    const sem::Call* call,
-                                    const sem::Builtin* builtin) {
+void ASTPrinter::EmitTextureCall(utils::StringStream& out,
+                                 const sem::Call* call,
+                                 const sem::Builtin* builtin) {
     using Usage = sem::ParameterUsage;
 
     auto& signature = builtin->Signature();
@@ -1495,7 +1493,8 @@
 
     if (auto* array_index = arg(Usage::kArrayIndex)) {
         // Array index needs to be appended to the coordinates.
-        param_coords = AppendVector(&builder_, param_coords, array_index)->Declaration();
+        param_coords =
+            tint::writer::AppendVector(&builder_, param_coords, array_index)->Declaration();
     }
 
     // GLSL requires Dref to be appended to the coordinates, *unless* it's
@@ -1512,7 +1511,8 @@
             // append zero here.
             depth_ref = CreateF32Zero(builder_.Sem().Get(param_coords)->Stmt());
         }
-        param_coords = AppendVector(&builder_, param_coords, depth_ref)->Declaration();
+        param_coords =
+            tint::writer::AppendVector(&builder_, param_coords, depth_ref)->Declaration();
     }
 
     emit_expr_as_signed(param_coords);
@@ -1585,7 +1585,7 @@
     }
 }
 
-std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
+std::string ASTPrinter::generate_builtin_name(const sem::Builtin* builtin) {
     switch (builtin->Type()) {
         case builtin::Function::kAbs:
         case builtin::Function::kAcos:
@@ -1704,7 +1704,7 @@
     return "";
 }
 
-void GeneratorImpl::EmitCase(const ast::CaseStatement* stmt) {
+void ASTPrinter::EmitCase(const ast::CaseStatement* stmt) {
     auto* sem = builder_.Sem().Get<sem::CaseStatement>(stmt);
     for (auto* selector : sem->Selectors()) {
         auto out = Line();
@@ -1732,20 +1732,20 @@
     Line() << "}";
 }
 
-void GeneratorImpl::EmitContinue(const ast::ContinueStatement*) {
+void ASTPrinter::EmitContinue(const ast::ContinueStatement*) {
     if (emit_continuing_) {
         emit_continuing_();
     }
     Line() << "continue;";
 }
 
-void GeneratorImpl::EmitDiscard(const ast::DiscardStatement*) {
+void ASTPrinter::EmitDiscard(const ast::DiscardStatement*) {
     // TODO(dsinclair): Verify this is correct when the discard semantics are
     // defined for WGSL (https://github.com/gpuweb/gpuweb/issues/361)
     Line() << "discard;";
 }
 
-void GeneratorImpl::EmitExpression(utils::StringStream& out, const ast::Expression* expr) {
+void ASTPrinter::EmitExpression(utils::StringStream& out, const ast::Expression* expr) {
     if (auto* sem = builder_.Sem().GetVal(expr)) {
         if (auto* constant = sem->ConstantValue()) {
             EmitConstant(out, constant);
@@ -1768,12 +1768,11 @@
         });
 }
 
-void GeneratorImpl::EmitIdentifier(utils::StringStream& out,
-                                   const ast::IdentifierExpression* expr) {
+void ASTPrinter::EmitIdentifier(utils::StringStream& out, const ast::IdentifierExpression* expr) {
     out << expr->identifier->symbol.Name();
 }
 
-void GeneratorImpl::EmitIf(const ast::IfStatement* stmt) {
+void ASTPrinter::EmitIf(const ast::IfStatement* stmt) {
     {
         auto out = Line();
         out << "if (";
@@ -1793,7 +1792,7 @@
     Line() << "}";
 }
 
-void GeneratorImpl::EmitFunction(const ast::Function* func) {
+void ASTPrinter::EmitFunction(const ast::Function* func) {
     auto* sem = builder_.Sem().Get(func);
 
     if (ast::HasAttribute<ast::InternalAttribute>(func->attributes)) {
@@ -1844,7 +1843,7 @@
     Line();
 }
 
-void GeneratorImpl::EmitGlobalVariable(const ast::Variable* global) {
+void ASTPrinter::EmitGlobalVariable(const ast::Variable* global) {
     Switch(
         global,  //
         [&](const ast::Var* var) {
@@ -1897,7 +1896,7 @@
         });
 }
 
-void GeneratorImpl::EmitUniformVariable(const ast::Var* var, const sem::Variable* sem) {
+void ASTPrinter::EmitUniformVariable(const ast::Var* var, const sem::Variable* sem) {
     auto* type = sem->Type()->UnwrapRef();
     auto* str = type->As<type::Struct>();
     if (TINT_UNLIKELY(!str)) {
@@ -1916,7 +1915,7 @@
     Line();
 }
 
-void GeneratorImpl::EmitStorageVariable(const ast::Var* var, const sem::Variable* sem) {
+void ASTPrinter::EmitStorageVariable(const ast::Var* var, const sem::Variable* sem) {
     auto* type = sem->Type()->UnwrapRef();
     auto* str = type->As<type::Struct>();
     if (TINT_UNLIKELY(!str)) {
@@ -1932,7 +1931,7 @@
     Line();
 }
 
-void GeneratorImpl::EmitHandleVariable(const ast::Var* var, const sem::Variable* sem) {
+void ASTPrinter::EmitHandleVariable(const ast::Var* var, const sem::Variable* sem) {
     auto out = Line();
 
     auto name = var->name->symbol.Name();
@@ -2007,7 +2006,7 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitPrivateVariable(const sem::Variable* var) {
+void ASTPrinter::EmitPrivateVariable(const sem::Variable* var) {
     auto* decl = var->Declaration();
     auto out = Line();
 
@@ -2024,7 +2023,7 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitWorkgroupVariable(const sem::Variable* var) {
+void ASTPrinter::EmitWorkgroupVariable(const sem::Variable* var) {
     auto* decl = var->Declaration();
     auto out = Line();
 
@@ -2042,7 +2041,7 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitIOVariable(const sem::GlobalVariable* var) {
+void ASTPrinter::EmitIOVariable(const sem::GlobalVariable* var) {
     auto* decl = var->Declaration();
 
     if (auto* attr = ast::GetAttribute<ast::BuiltinAttribute>(decl->attributes)) {
@@ -2070,9 +2069,8 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitInterpolationQualifiers(
-    utils::StringStream& out,
-    utils::VectorRef<const ast::Attribute*> attributes) {
+void ASTPrinter::EmitInterpolationQualifiers(utils::StringStream& out,
+                                             utils::VectorRef<const ast::Attribute*> attributes) {
     for (auto* attr : attributes) {
         if (auto* interpolate = attr->As<ast::InterpolateAttribute>()) {
             auto& sem = builder_.Sem();
@@ -2107,9 +2105,9 @@
     }
 }
 
-void GeneratorImpl::EmitAttributes(utils::StringStream& out,
-                                   const sem::GlobalVariable* var,
-                                   utils::VectorRef<const ast::Attribute*> attributes) {
+void ASTPrinter::EmitAttributes(utils::StringStream& out,
+                                const sem::GlobalVariable* var,
+                                utils::VectorRef<const ast::Attribute*> attributes) {
     if (attributes.IsEmpty()) {
         return;
     }
@@ -2130,7 +2128,7 @@
     }
 }
 
-void GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
+void ASTPrinter::EmitEntryPointFunction(const ast::Function* func) {
     auto* func_sem = builder_.Sem().Get(func);
 
     if (func->PipelineStage() == ast::PipelineStage::kFragment) {
@@ -2209,7 +2207,7 @@
     Line() << "}";
 }
 
-void GeneratorImpl::EmitConstant(utils::StringStream& out, const constant::Value* constant) {
+void ASTPrinter::EmitConstant(utils::StringStream& out, const constant::Value* constant) {
     Switch(
         constant->Type(),  //
         [&](const type::Bool*) { out << (constant->ValueAs<AInt>() ? "true" : "false"); },
@@ -2285,7 +2283,7 @@
         });
 }
 
-void GeneratorImpl::EmitLiteral(utils::StringStream& out, const ast::LiteralExpression* lit) {
+void ASTPrinter::EmitLiteral(utils::StringStream& out, const ast::LiteralExpression* lit) {
     Switch(
         lit,  //
         [&](const ast::BoolLiteralExpression* l) { out << (l->value ? "true" : "false"); },
@@ -2313,7 +2311,7 @@
         [&](Default) { diagnostics_.add_error(diag::System::Writer, "unknown literal type"); });
 }
 
-void GeneratorImpl::EmitZeroValue(utils::StringStream& out, const type::Type* type) {
+void ASTPrinter::EmitZeroValue(utils::StringStream& out, const type::Type* type) {
     if (type->Is<type::Bool>()) {
         out << "false";
     } else if (type->Is<type::F32>()) {
@@ -2376,7 +2374,7 @@
     }
 }
 
-void GeneratorImpl::EmitLoop(const ast::LoopStatement* stmt) {
+void ASTPrinter::EmitLoop(const ast::LoopStatement* stmt) {
     auto emit_continuing = [this, stmt] {
         if (stmt->continuing && !stmt->continuing->Empty()) {
             EmitBlock(stmt->continuing);
@@ -2393,7 +2391,7 @@
     Line() << "}";
 }
 
-void GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
+void ASTPrinter::EmitForLoop(const ast::ForLoopStatement* stmt) {
     // Nest a for loop with a new block. In HLSL the initializer scope is not
     // nested by the for-loop, so we may get variable redefinitions.
     Line() << "{";
@@ -2484,7 +2482,7 @@
     }
 }
 
-void GeneratorImpl::EmitWhile(const ast::WhileStatement* stmt) {
+void ASTPrinter::EmitWhile(const ast::WhileStatement* stmt) {
     TextBuffer cond_pre;
     utils::StringStream cond_buf;
     {
@@ -2527,8 +2525,8 @@
     }
 }
 
-void GeneratorImpl::EmitMemberAccessor(utils::StringStream& out,
-                                       const ast::MemberAccessorExpression* expr) {
+void ASTPrinter::EmitMemberAccessor(utils::StringStream& out,
+                                    const ast::MemberAccessorExpression* expr) {
     EmitExpression(out, expr->object);
     out << ".";
 
@@ -2549,7 +2547,7 @@
         });
 }
 
-void GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) {
+void ASTPrinter::EmitReturn(const ast::ReturnStatement* stmt) {
     if (stmt->value) {
         auto out = Line();
         out << "return ";
@@ -2560,7 +2558,7 @@
     }
 }
 
-void GeneratorImpl::EmitStatement(const ast::Statement* stmt) {
+void ASTPrinter::EmitStatement(const ast::Statement* stmt) {
     Switch(
         stmt,  //
         [&](const ast::AssignmentStatement* a) { EmitAssign(a); },
@@ -2602,7 +2600,7 @@
         });
 }
 
-void GeneratorImpl::EmitSwitch(const ast::SwitchStatement* stmt) {
+void ASTPrinter::EmitSwitch(const ast::SwitchStatement* stmt) {
     {  // switch(expr) {
         auto out = Line();
         out << "switch(";
@@ -2620,12 +2618,12 @@
     Line() << "}";
 }
 
-void GeneratorImpl::EmitType(utils::StringStream& out,
-                             const type::Type* type,
-                             builtin::AddressSpace address_space,
-                             builtin::Access access,
-                             const std::string& name,
-                             bool* name_printed /* = nullptr */) {
+void ASTPrinter::EmitType(utils::StringStream& out,
+                          const type::Type* type,
+                          builtin::AddressSpace address_space,
+                          builtin::Access access,
+                          const std::string& name,
+                          bool* name_printed /* = nullptr */) {
     if (name_printed) {
         *name_printed = false;
     }
@@ -2789,11 +2787,11 @@
     }
 }
 
-void GeneratorImpl::EmitTypeAndName(utils::StringStream& out,
-                                    const type::Type* type,
-                                    builtin::AddressSpace address_space,
-                                    builtin::Access access,
-                                    const std::string& name) {
+void ASTPrinter::EmitTypeAndName(utils::StringStream& out,
+                                 const type::Type* type,
+                                 builtin::AddressSpace address_space,
+                                 builtin::Access access,
+                                 const std::string& name) {
     bool printed_name = false;
     EmitType(out, type, address_space, access, name, &printed_name);
     if (!name.empty() && !printed_name) {
@@ -2801,7 +2799,7 @@
     }
 }
 
-void GeneratorImpl::EmitStructType(TextBuffer* b, const type::Struct* str) {
+void ASTPrinter::EmitStructType(TextBuffer* b, const type::Struct* str) {
     auto it = emitted_structs_.emplace(str);
     if (!it.second) {
         return;
@@ -2814,7 +2812,7 @@
     Line(b);
 }
 
-void GeneratorImpl::EmitStructMembers(TextBuffer* b, const type::Struct* str) {
+void ASTPrinter::EmitStructMembers(TextBuffer* b, const type::Struct* str) {
     ScopedIndent si(b);
     for (auto* mem : str->Members()) {
         auto name = mem->Name().Name();
@@ -2827,7 +2825,7 @@
     }
 }
 
-void GeneratorImpl::EmitUnaryOp(utils::StringStream& out, const ast::UnaryOpExpression* expr) {
+void ASTPrinter::EmitUnaryOp(utils::StringStream& out, const ast::UnaryOpExpression* expr) {
     switch (expr->op) {
         case ast::UnaryOp::kIndirection:
         case ast::UnaryOp::kAddressOf:
@@ -2852,7 +2850,7 @@
     EmitExpression(out, expr->expr);
 }
 
-void GeneratorImpl::EmitVar(const ast::Var* var) {
+void ASTPrinter::EmitVar(const ast::Var* var) {
     auto* sem = builder_.Sem().Get(var);
     auto* type = sem->Type()->UnwrapRef();
 
@@ -2869,7 +2867,7 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitLet(const ast::Let* let) {
+void ASTPrinter::EmitLet(const ast::Let* let) {
     auto* sem = builder_.Sem().Get(let);
     auto* type = sem->Type()->UnwrapRef();
 
@@ -2883,7 +2881,7 @@
     out << ";";
 }
 
-void GeneratorImpl::EmitProgramConstVariable(const ast::Variable* var) {
+void ASTPrinter::EmitProgramConstVariable(const ast::Variable* var) {
     auto* sem = builder_.Sem().Get(var);
     auto* type = sem->Type();
 
@@ -2897,10 +2895,10 @@
 }
 
 template <typename F>
-void GeneratorImpl::CallBuiltinHelper(utils::StringStream& out,
-                                      const ast::CallExpression* call,
-                                      const sem::Builtin* builtin,
-                                      F&& build) {
+void ASTPrinter::CallBuiltinHelper(utils::StringStream& out,
+                                   const ast::CallExpression* call,
+                                   const sem::Builtin* builtin,
+                                   F&& build) {
     // Generate the helper function if it hasn't been created already
     auto fn = utils::GetOrCreate(builtins_, builtin, [&]() -> std::string {
         TextBuffer b;
@@ -2955,7 +2953,7 @@
     }
 }
 
-type::Type* GeneratorImpl::BoolTypeToUint(const type::Type* type) {
+type::Type* ASTPrinter::BoolTypeToUint(const type::Type* type) {
     auto* u32 = builder_.create<type::U32>();
     if (type->Is<type::Bool>()) {
         return u32;
@@ -2966,8 +2964,8 @@
     }
 }
 
-std::string GeneratorImpl::UniqueIdentifier(const std::string& prefix /* = "" */) {
+std::string ASTPrinter::UniqueIdentifier(const std::string& prefix /* = "" */) {
     return builder_.Symbols().New(prefix).Name();
 }
 
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl.h b/src/tint/lang/glsl/writer/ast_printer/ast_printer.h
similarity index 97%
rename from src/tint/lang/glsl/ast_writer/generator_impl.h
rename to src/tint/lang/glsl/writer/ast_printer/ast_printer.h
index 2cb0269..54d7228 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl.h
+++ b/src/tint/lang/glsl/writer/ast_printer/ast_printer.h
@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef SRC_TINT_LANG_GLSL_AST_WRITER_GENERATOR_IMPL_H_
-#define SRC_TINT_LANG_GLSL_AST_WRITER_GENERATOR_IMPL_H_
+#ifndef SRC_TINT_LANG_GLSL_WRITER_AST_PRINTER_AST_PRINTER_H_
+#define SRC_TINT_LANG_GLSL_WRITER_AST_PRINTER_AST_PRINTER_H_
 
 #include <string>
 #include <tuple>
@@ -22,7 +22,7 @@
 #include <utility>
 
 #include "src/tint/lang/core/builtin/builtin_value.h"
-#include "src/tint/lang/glsl/ast_writer/version.h"
+#include "src/tint/lang/glsl/writer/version.h"
 #include "src/tint/lang/wgsl/program/program_builder.h"
 #include "src/tint/utils/containers/scope_stack.h"
 #include "src/tint/utils/math/hash.h"
@@ -36,11 +36,11 @@
 class ValueConstructor;
 class ValueConversion;
 }  // namespace tint::sem
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 struct Options;
 }
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 
 /// The result of sanitizing a program for generation.
 struct SanitizedResult {
@@ -65,13 +65,13 @@
                          const std::string& entry_point);
 
 /// Implementation class for GLSL generator
-class GeneratorImpl : public utils::TextGenerator {
+class ASTPrinter : public utils::TextGenerator {
   public:
     /// Constructor
     /// @param program the program to generate
     /// @param version the GLSL version to use
-    GeneratorImpl(const Program* program, const Version& version);
-    ~GeneratorImpl() override;
+    ASTPrinter(const Program* program, const Version& version);
+    ~ASTPrinter() override;
 
     /// Generates the GLSL shader
     void Generate();
@@ -470,6 +470,6 @@
     Version version_;
 };
 
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
 
-#endif  // SRC_TINT_LANG_GLSL_AST_WRITER_GENERATOR_IMPL_H_
+#endif  // SRC_TINT_LANG_GLSL_WRITER_AST_PRINTER_AST_PRINTER_H_
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_test.cc b/src/tint/lang/glsl/writer/ast_printer/ast_printer_test.cc
similarity index 78%
rename from src/tint/lang/glsl/ast_writer/generator_impl_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/ast_printer_test.cc
index d9a38a7..d3fed8d 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/ast_printer_test.cc
@@ -12,16 +12,16 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest = TestHelper;
+using GlslASTPrinterTest = TestHelper;
 
-TEST_F(GlslGeneratorImplTest, InvalidProgram) {
+TEST_F(GlslASTPrinterTest, InvalidProgram) {
     Diagnostics().add_error(diag::System::Writer, "make the program invalid");
     ASSERT_FALSE(IsValid());
     auto program = std::make_unique<Program>(std::move(*this));
@@ -30,10 +30,10 @@
     EXPECT_EQ(result.error, "input program is not valid");
 }
 
-TEST_F(GlslGeneratorImplTest, Generate) {
+TEST_F(GlslASTPrinterTest, Generate) {
     Func("my_func", utils::Empty, ty.void_(), utils::Empty);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -44,10 +44,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest, GenerateDesktop) {
+TEST_F(GlslASTPrinterTest, GenerateDesktop) {
     Func("my_func", utils::Empty, ty.void_(), utils::Empty);
 
-    GeneratorImpl& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
+    ASTPrinter& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 440
@@ -58,7 +58,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest, GenerateSampleIndexES) {
+TEST_F(GlslASTPrinterTest, GenerateSampleIndexES) {
     GlobalVar("gl_SampleID", ty.i32(),
               utils::Vector{
                   Builtin(builtin::BuiltinValue::kSampleIndex),
@@ -70,7 +70,7 @@
              Return(Expr("gl_SampleID")),
          });
 
-    GeneratorImpl& gen = Build(Version(Version::Standard::kES, 3, 1));
+    ASTPrinter& gen = Build(Version(Version::Standard::kES, 3, 1));
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -83,7 +83,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest, GenerateSampleIndexDesktop) {
+TEST_F(GlslASTPrinterTest, GenerateSampleIndexDesktop) {
     GlobalVar("gl_SampleID", ty.i32(),
               utils::Vector{
                   Builtin(builtin::BuiltinValue::kSampleIndex),
@@ -95,7 +95,7 @@
              Return(Expr("gl_SampleID")),
          });
 
-    GeneratorImpl& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
+    ASTPrinter& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 440
@@ -108,4 +108,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_binary_test.cc b/src/tint/lang/glsl/writer/ast_printer/binary_test.cc
similarity index 87%
rename from src/tint/lang/glsl/ast_writer/generator_impl_binary_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/binary_test.cc
index dd88dd0..0a793b4 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_binary_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/binary_test.cc
@@ -12,20 +12,20 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/lang/wgsl/ast/variable_decl_statement.h"
 #include "src/tint/utils/text/string_stream.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_Binary = TestHelper;
+using GlslASTPrinterTest_Binary = TestHelper;
 
 struct BinaryData {
     const char* result;
@@ -59,7 +59,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -88,7 +88,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -108,7 +108,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -133,7 +133,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -141,7 +141,7 @@
     EXPECT_EQ(out.str(), params.result);
 }
 INSTANTIATE_TEST_SUITE_P(
-    GlslGeneratorImplTest,
+    GlslASTPrinterTest,
     GlslBinaryTest,
     testing::Values(BinaryData{"(left & right)", ast::BinaryOp::kAnd},
                     BinaryData{"(left | right)", ast::BinaryOp::kOr},
@@ -160,7 +160,7 @@
                     BinaryData{"(left / right)", ast::BinaryOp::kDivide},
                     BinaryData{"(left % right)", ast::BinaryOp::kModulo}));
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_VectorScalar_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_VectorScalar_f32) {
     GlobalVar("a", Call<vec3<f32>>(1_f, 1_f, 1_f), builtin::AddressSpace::kPrivate);
     auto* lhs = Expr("a");
     auto* rhs = Expr(1_f);
@@ -169,7 +169,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -177,7 +177,7 @@
     EXPECT_EQ(out.str(), "(a * 1.0f)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_VectorScalar_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_VectorScalar_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", Call<vec3<f16>>(1_h, 1_h, 1_h), builtin::AddressSpace::kPrivate);
@@ -188,7 +188,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -196,7 +196,7 @@
     EXPECT_EQ(out.str(), "(a * 1.0hf)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_ScalarVector_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_ScalarVector_f32) {
     GlobalVar("a", Call<vec3<f32>>(1_f, 1_f, 1_f), builtin::AddressSpace::kPrivate);
     auto* lhs = Expr(1_f);
     auto* rhs = Expr("a");
@@ -205,7 +205,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -213,7 +213,7 @@
     EXPECT_EQ(out.str(), "(1.0f * a)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_ScalarVector_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_ScalarVector_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", Call<vec3<f16>>(1_h, 1_h, 1_h), builtin::AddressSpace::kPrivate);
@@ -224,7 +224,7 @@
 
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -232,7 +232,7 @@
     EXPECT_EQ(out.str(), "(1.0hf * a)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixScalar_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_MatrixScalar_f32) {
     GlobalVar("mat", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
     auto* lhs = Expr("mat");
     auto* rhs = Expr(1_f);
@@ -240,7 +240,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -248,7 +248,7 @@
     EXPECT_EQ(out.str(), "(mat * 1.0f)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixScalar_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_MatrixScalar_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("mat", ty.mat3x3<f16>(), builtin::AddressSpace::kPrivate);
@@ -258,7 +258,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -266,7 +266,7 @@
     EXPECT_EQ(out.str(), "(mat * 1.0hf)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_ScalarMatrix_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_ScalarMatrix_f32) {
     GlobalVar("mat", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
     auto* lhs = Expr(1_f);
     auto* rhs = Expr("mat");
@@ -274,7 +274,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -282,7 +282,7 @@
     EXPECT_EQ(out.str(), "(1.0f * mat)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_ScalarMatrix_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_ScalarMatrix_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("mat", ty.mat3x3<f16>(), builtin::AddressSpace::kPrivate);
@@ -292,7 +292,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -300,7 +300,7 @@
     EXPECT_EQ(out.str(), "(1.0hf * mat)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixVector_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_MatrixVector_f32) {
     GlobalVar("mat", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
     auto* lhs = Expr("mat");
     auto* rhs = Call<vec3<f32>>(1_f, 1_f, 1_f);
@@ -308,7 +308,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -316,7 +316,7 @@
     EXPECT_EQ(out.str(), "(mat * vec3(1.0f))");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixVector_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_MatrixVector_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("mat", ty.mat3x3<f16>(), builtin::AddressSpace::kPrivate);
@@ -326,7 +326,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -334,7 +334,7 @@
     EXPECT_EQ(out.str(), "(mat * f16vec3(1.0hf))");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_VectorMatrix_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_VectorMatrix_f32) {
     GlobalVar("mat", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
     auto* lhs = Call<vec3<f32>>(1_f, 1_f, 1_f);
     auto* rhs = Expr("mat");
@@ -342,7 +342,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -350,7 +350,7 @@
     EXPECT_EQ(out.str(), "(vec3(1.0f) * mat)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_VectorMatrix_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_VectorMatrix_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("mat", ty.mat3x3<f16>(), builtin::AddressSpace::kPrivate);
@@ -360,7 +360,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, lhs, rhs);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -368,14 +368,14 @@
     EXPECT_EQ(out.str(), "(f16vec3(1.0hf) * mat)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixMatrix_f32) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_MatrixMatrix_f32) {
     GlobalVar("lhs", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
     GlobalVar("rhs", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, Expr("lhs"), Expr("rhs"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -383,7 +383,7 @@
     EXPECT_EQ(out.str(), "(lhs * rhs)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixMatrix_f16) {
+TEST_F(GlslASTPrinterTest_Binary, Multiply_MatrixMatrix_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("lhs", ty.mat3x3<f16>(), builtin::AddressSpace::kPrivate);
@@ -392,7 +392,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, Expr("lhs"), Expr("rhs"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -400,14 +400,14 @@
     EXPECT_EQ(out.str(), "(lhs * rhs)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModF32) {
+TEST_F(GlslASTPrinterTest_Binary, ModF32) {
     GlobalVar("a", ty.f32(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.f32(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -415,7 +415,7 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModF16) {
+TEST_F(GlslASTPrinterTest_Binary, ModF16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", ty.f16(), builtin::AddressSpace::kPrivate);
@@ -424,7 +424,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -432,14 +432,14 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModVec3F32) {
+TEST_F(GlslASTPrinterTest_Binary, ModVec3F32) {
     GlobalVar("a", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -447,7 +447,7 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModVec3F16) {
+TEST_F(GlslASTPrinterTest_Binary, ModVec3F16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", ty.vec3<f16>(), builtin::AddressSpace::kPrivate);
@@ -456,7 +456,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -464,14 +464,14 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModVec3F32ScalarF32) {
+TEST_F(GlslASTPrinterTest_Binary, ModVec3F32ScalarF32) {
     GlobalVar("a", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.f32(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -479,7 +479,7 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModVec3F16ScalarF16) {
+TEST_F(GlslASTPrinterTest_Binary, ModVec3F16ScalarF16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", ty.vec3<f16>(), builtin::AddressSpace::kPrivate);
@@ -488,7 +488,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -496,14 +496,14 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModScalarF32Vec3F32) {
+TEST_F(GlslASTPrinterTest_Binary, ModScalarF32Vec3F32) {
     GlobalVar("a", ty.f32(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -511,7 +511,7 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModScalarF16Vec3F16) {
+TEST_F(GlslASTPrinterTest_Binary, ModScalarF16Vec3F16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", ty.f16(), builtin::AddressSpace::kPrivate);
@@ -520,7 +520,7 @@
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -528,7 +528,7 @@
     EXPECT_EQ(out.str(), "tint_float_modulo(a, b)");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModMixedVec3ScalarF32) {
+TEST_F(GlslASTPrinterTest_Binary, ModMixedVec3ScalarF32) {
     GlobalVar("a", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.f32(), builtin::AddressSpace::kPrivate);
 
@@ -540,7 +540,7 @@
         create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("b"), Expr("a"));
     WrapInFunction(expr_vec_mod_vec, expr_vec_mod_scalar, expr_scalar_mod_vec);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -571,7 +571,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, ModMixedVec3ScalarF16) {
+TEST_F(GlslASTPrinterTest_Binary, ModMixedVec3ScalarF16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", ty.vec3<f16>(), builtin::AddressSpace::kPrivate);
@@ -585,7 +585,7 @@
         create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("b"), Expr("a"));
     WrapInFunction(expr_vec_mod_vec, expr_vec_mod_scalar, expr_scalar_mod_vec);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -617,14 +617,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Logical_And) {
+TEST_F(GlslASTPrinterTest_Binary, Logical_And) {
     GlobalVar("a", ty.bool_(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.bool_(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kLogicalAnd, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -637,7 +637,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Logical_Multi) {
+TEST_F(GlslASTPrinterTest_Binary, Logical_Multi) {
     // (a && b) || (c || d)
     GlobalVar("a", ty.bool_(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.bool_(), builtin::AddressSpace::kPrivate);
@@ -650,7 +650,7 @@
         create<ast::BinaryExpression>(ast::BinaryOp::kLogicalOr, Expr("c"), Expr("d")));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -671,14 +671,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Logical_Or) {
+TEST_F(GlslASTPrinterTest_Binary, Logical_Or) {
     GlobalVar("a", ty.bool_(), builtin::AddressSpace::kPrivate);
     GlobalVar("b", ty.bool_(), builtin::AddressSpace::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kLogicalOr, Expr("a"), Expr("b"));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, expr);
@@ -691,7 +691,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, If_WithLogical) {
+TEST_F(GlslASTPrinterTest_Binary, If_WithLogical) {
     // if (a && b) {
     //   return 1i;
     // } else if (b || c) {
@@ -711,7 +711,7 @@
                    Block(Return(2_i)), Else(Block(Return(3_i))))));
     Func("func", utils::Empty, ty.i32(), utils::Vector{WrapInStatement(expr)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.EmitStatement(expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -735,7 +735,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Return_WithLogical) {
+TEST_F(GlslASTPrinterTest_Binary, Return_WithLogical) {
     // return (a && b) || c;
 
     GlobalVar("a", ty.bool_(), builtin::AddressSpace::kPrivate);
@@ -748,7 +748,7 @@
         Expr("c")));
     Func("func", utils::Empty, ty.bool_(), utils::Vector{WrapInStatement(expr)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.EmitStatement(expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -764,7 +764,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Assign_WithLogical) {
+TEST_F(GlslASTPrinterTest_Binary, Assign_WithLogical) {
     // a = (b || c) && d;
 
     GlobalVar("a", ty.bool_(), builtin::AddressSpace::kPrivate);
@@ -780,7 +780,7 @@
                    Expr("d")));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.EmitStatement(expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -796,7 +796,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Decl_WithLogical) {
+TEST_F(GlslASTPrinterTest_Binary, Decl_WithLogical) {
     // var a : bool = (b && c) || d;
 
     GlobalVar("b", ty.bool_(), builtin::AddressSpace::kPrivate);
@@ -813,7 +813,7 @@
     auto* decl = Decl(var);
     WrapInFunction(decl);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.EmitStatement(decl);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -829,7 +829,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Binary, Call_WithLogical) {
+TEST_F(GlslASTPrinterTest_Binary, Call_WithLogical) {
     // foo(a && b, c || d, (a || c) && (b || d))
 
     Func("foo",
@@ -856,7 +856,7 @@
     auto* expr = CallStmt(Call("foo", params));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.EmitStatement(expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -885,4 +885,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_bitcast_test.cc b/src/tint/lang/glsl/writer/ast_printer/bitcast_test.cc
similarity index 87%
rename from src/tint/lang/glsl/ast_writer/generator_impl_bitcast_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/bitcast_test.cc
index 8ec4194..e8b4c9d 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_bitcast_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/bitcast_test.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "src/tint/utils/text/string_stream.h"
 
@@ -21,17 +21,17 @@
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Bitcast = TestHelper;
+using GlslASTPrinterTest_Bitcast = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_Float) {
+TEST_F(GlslASTPrinterTest_Bitcast, EmitExpression_Bitcast_Float) {
     auto* a = Let("a", Expr(1_i));
     auto* bitcast = Bitcast<f32>(Expr("a"));
     WrapInFunction(a, bitcast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, bitcast);
@@ -39,12 +39,12 @@
     EXPECT_EQ(out.str(), "intBitsToFloat(a)");
 }
 
-TEST_F(GlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_Int) {
+TEST_F(GlslASTPrinterTest_Bitcast, EmitExpression_Bitcast_Int) {
     auto* a = Let("a", Expr(1_u));
     auto* bitcast = Bitcast<i32>(Expr("a"));
     WrapInFunction(a, bitcast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, bitcast);
@@ -52,12 +52,12 @@
     EXPECT_EQ(out.str(), "int(a)");
 }
 
-TEST_F(GlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_Uint) {
+TEST_F(GlslASTPrinterTest_Bitcast, EmitExpression_Bitcast_Uint) {
     auto* a = Let("a", Expr(1_i));
     auto* bitcast = Bitcast<u32>(Expr("a"));
     WrapInFunction(a, bitcast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, bitcast);
@@ -65,7 +65,7 @@
     EXPECT_EQ(out.str(), "uint(a)");
 }
 
-TEST_F(GlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_F16_Vec2) {
+TEST_F(GlslASTPrinterTest_Bitcast, EmitExpression_Bitcast_F16_Vec2) {
     Enable(builtin::Extension::kF16);
 
     auto* a = Let("a", Call<vec2<f16>>(1_h, 2_h));
@@ -77,7 +77,7 @@
     auto* g = Let("g", Bitcast<vec2<f16>>(Expr("f")));
     WrapInFunction(a, b, c, d, e, f, g);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -123,7 +123,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_F16_Vec4) {
+TEST_F(GlslASTPrinterTest_Bitcast, EmitExpression_Bitcast_F16_Vec4) {
     Enable(builtin::Extension::kF16);
 
     auto* a = Let("a", Call<vec4<f16>>(1_h, 2_h, 3_h, 4_h));
@@ -135,7 +135,7 @@
     auto* g = Let("g", Bitcast<vec4<f16>>(Expr("f")));
     WrapInFunction(a, b, c, d, e, f, g);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -188,4 +188,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_block_test.cc b/src/tint/lang/glsl/writer/ast_printer/block_test.cc
similarity index 77%
rename from src/tint/lang/glsl/ast_writer/generator_impl_block_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/block_test.cc
index 90bf130..a8e4669 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_block_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/block_test.cc
@@ -12,20 +12,20 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Block = TestHelper;
+using GlslASTPrinterTest_Block = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Block, Emit_Block) {
+TEST_F(GlslASTPrinterTest_Block, Emit_Block) {
     auto* b = Block(Return());
     WrapInFunction(b);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(b);
@@ -37,4 +37,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_break_test.cc b/src/tint/lang/glsl/writer/ast_printer/break_test.cc
similarity index 77%
rename from src/tint/lang/glsl/ast_writer/generator_impl_break_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/break_test.cc
index ea14381..c9db340 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_break_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/break_test.cc
@@ -12,20 +12,20 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Break = TestHelper;
+using GlslASTPrinterTest_Break = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Break, Emit_Break) {
+TEST_F(GlslASTPrinterTest_Break, Emit_Break) {
     auto* b = create<ast::BreakStatement>();
     WrapInFunction(Loop(Block(b)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(b);
@@ -34,4 +34,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_builtin_test.cc b/src/tint/lang/glsl/writer/ast_printer/builtin_test.cc
similarity index 89%
rename from src/tint/lang/glsl/ast_writer/generator_impl_builtin_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/builtin_test.cc
index ba7d257..a5b0083 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_builtin_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/builtin_test.cc
@@ -13,20 +13,20 @@
 // limitations under the License.
 
 #include "gmock/gmock.h"
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 #include "src/tint/lang/wgsl/sem/call.h"
 #include "src/tint/utils/text/string_stream.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using ::testing::HasSubstr;
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_Builtin = TestHelper;
+using GlslASTPrinterTest_Builtin = TestHelper;
 
 enum class CallParamType {
     kF32,
@@ -219,7 +219,7 @@
          },
          utils::Vector{create<ast::StageAttribute>(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     auto* sem = program->Sem().Get<sem::Call>(call);
     ASSERT_NE(sem, nullptr);
@@ -231,7 +231,7 @@
     EXPECT_EQ(gen.generate_builtin_name(builtin), param.glsl_name);
 }
 INSTANTIATE_TEST_SUITE_P(
-    GlslGeneratorImplTest_Builtin,
+    GlslASTPrinterTest_Builtin,
     GlslBuiltinTest,
     testing::
         Values(/* Logical built-in */
@@ -339,7 +339,7 @@
                BuiltinData{builtin::Function::kFwidthCoarse, CallParamType::kF32, "fwidth"},
                BuiltinData{builtin::Function::kFwidthFine, CallParamType::kF32, "fwidth"}));
 
-TEST_F(GlslGeneratorImplTest_Builtin, Builtin_Call) {
+TEST_F(GlslASTPrinterTest_Builtin, Builtin_Call) {
     auto* call = Call("dot", "param1", "param2");
 
     GlobalVar("param1", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
@@ -347,7 +347,7 @@
 
     WrapInFunction(Decl(Var("r", call)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     utils::StringStream out;
@@ -356,12 +356,12 @@
     EXPECT_EQ(out.str(), "dot(param1, param2)");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Select_Scalar) {
+TEST_F(GlslASTPrinterTest_Builtin, Select_Scalar) {
     GlobalVar("a", Expr(1_f), builtin::AddressSpace::kPrivate);
     GlobalVar("b", Expr(2_f), builtin::AddressSpace::kPrivate);
     auto* call = Call("select", "a", "b", true);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     utils::StringStream out;
@@ -370,12 +370,12 @@
     EXPECT_EQ(out.str(), "(true ? b : a)");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Select_Vector) {
+TEST_F(GlslASTPrinterTest_Builtin, Select_Vector) {
     GlobalVar("a", Call<vec2<i32>>(1_i, 2_i), builtin::AddressSpace::kPrivate);
     GlobalVar("b", Call<vec2<i32>>(3_i, 4_i), builtin::AddressSpace::kPrivate);
     auto* call = Call("select", "a", "b", Call<vec2<bool>>(true, false));
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     utils::StringStream out;
@@ -384,7 +384,7 @@
     EXPECT_EQ(out.str(), "tint_select(a, b, bvec2(true, false))");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, FMA_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, FMA_f32) {
     auto* call = Call("fma", "a", "b", "c");
 
     GlobalVar("a", ty.vec3<f32>(), builtin::AddressSpace::kPrivate);
@@ -393,7 +393,7 @@
 
     WrapInFunction(Decl(Var("r", call)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     utils::StringStream out;
@@ -402,7 +402,7 @@
     EXPECT_EQ(out.str(), "((a) * (b) + (c))");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, FMA_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, FMA_f16) {
     Enable(builtin::Extension::kF16);
 
     GlobalVar("a", ty.vec3<f16>(), builtin::AddressSpace::kPrivate);
@@ -412,7 +412,7 @@
     auto* call = Call("fma", "a", "b", "c");
     WrapInFunction(Decl(Var("r", call)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     utils::StringStream out;
@@ -421,11 +421,11 @@
     EXPECT_EQ(out.str(), "((a) * (b) + (c))");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Modf_Scalar_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Modf_Scalar_f32) {
     WrapInFunction(Decl(Let("f", Expr(1.5_f))),  //
                    Decl(Let("v", Call("modf", "f"))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -456,13 +456,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Modf_Scalar_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Modf_Scalar_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Decl(Let("f", Expr(1.5_h))),  //
                    Decl(Let("v", Call("modf", "f"))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -494,11 +494,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Modf_Vector_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Modf_Vector_f32) {
     WrapInFunction(Decl(Let("f", Call<vec3<f32>>(1.5_f, 2.5_f, 3.5_f))),  //
                    Decl(Let("v", Call("modf", "f"))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -529,13 +529,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Modf_Vector_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Modf_Vector_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Decl(Let("f", Call<vec3<f16>>(1.5_h, 2.5_h, 3.5_h))),  //
                    Decl(Let("v", Call("modf", "f"))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -567,10 +567,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Modf_Scalar_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Modf_Scalar_f32) {
     WrapInFunction(Decl(Let("v", Call("modf", 1.5_f))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -594,12 +594,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Modf_Scalar_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Modf_Scalar_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Decl(Let("v", Call("modf", 1.5_h))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -624,10 +624,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Modf_Vector_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Modf_Vector_f32) {
     WrapInFunction(Decl(Let("v", Call("modf", Call<vec3<f32>>(1.5_f, 2.5_f, 3.5_f)))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -651,12 +651,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Modf_Vector_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Modf_Vector_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Decl(Let("v", Call("modf", Call<vec3<f16>>(1.5_h, 2.5_h, 3.5_h)))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -681,11 +681,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Frexp_Scalar_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Frexp_Scalar_f32) {
     WrapInFunction(Var("f", Expr(1_f)),  //
                    Var("v", Call("frexp", "f")));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -716,13 +716,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Frexp_Scalar_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Frexp_Scalar_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Var("f", Expr(1_h)),  //
                    Var("v", Call("frexp", "f")));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -754,11 +754,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Frexp_Vector_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Frexp_Vector_f32) {
     WrapInFunction(Var("f", Call<vec3<f32>>()),  //
                    Var("v", Call("frexp", "f")));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -789,13 +789,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Runtime_Frexp_Vector_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Runtime_Frexp_Vector_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Var("f", Call<vec3<f16>>()),  //
                    Var("v", Call("frexp", "f")));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -827,10 +827,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Frexp_Scalar_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Frexp_Scalar_f32) {
     WrapInFunction(Decl(Let("v", Call("frexp", 1_f))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -854,12 +854,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Frexp_Scalar_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Frexp_Scalar_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Decl(Let("v", Call("frexp", 1_h))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -884,10 +884,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Frexp_Vector_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Frexp_Vector_f32) {
     WrapInFunction(Decl(Let("v", Call("frexp", Call<vec3<f32>>()))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -911,12 +911,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Const_Frexp_Vector_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Const_Frexp_Vector_f16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Decl(Let("v", Call("frexp", Call<vec3<f16>>()))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -941,12 +941,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Degrees_Scalar_f32) {
     auto* val = Var("val", ty.f32());
     auto* call = Call("degrees", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -970,12 +970,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Vector_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Degrees_Vector_f32) {
     auto* val = Var("val", ty.vec3<f32>());
     auto* call = Call("degrees", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -999,14 +999,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Degrees_Scalar_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* val = Var("val", ty.f16());
     auto* call = Call("degrees", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1031,14 +1031,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Vector_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Degrees_Vector_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* val = Var("val", ty.vec3<f16>());
     auto* call = Call("degrees", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1063,12 +1063,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Radians_Scalar_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Radians_Scalar_f32) {
     auto* val = Var("val", ty.f32());
     auto* call = Call("radians", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1092,12 +1092,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Radians_Vector_f32) {
+TEST_F(GlslASTPrinterTest_Builtin, Radians_Vector_f32) {
     auto* val = Var("val", ty.vec3<f32>());
     auto* call = Call("radians", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1121,14 +1121,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Radians_Scalar_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Radians_Scalar_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* val = Var("val", ty.f16());
     auto* call = Call("radians", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1153,14 +1153,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Radians_Vector_f16) {
+TEST_F(GlslASTPrinterTest_Builtin, Radians_Vector_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* val = Var("val", ty.vec3<f16>());
     auto* call = Call("radians", val);
     WrapInFunction(val, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1185,14 +1185,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, ExtractBits) {
+TEST_F(GlslASTPrinterTest_Builtin, ExtractBits) {
     auto* v = Var("v", ty.vec3<u32>());
     auto* offset = Var("offset", ty.u32());
     auto* count = Var("count", ty.u32());
     auto* call = Call("extractBits", v, offset, count);
     WrapInFunction(v, offset, count, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1219,7 +1219,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, InsertBits) {
+TEST_F(GlslASTPrinterTest_Builtin, InsertBits) {
     auto* v = Var("v", ty.vec3<u32>());
     auto* n = Var("n", ty.vec3<u32>());
     auto* offset = Var("offset", ty.u32());
@@ -1227,7 +1227,7 @@
     auto* call = Call("insertBits", v, n, offset, count);
     WrapInFunction(v, n, offset, count, call);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1255,11 +1255,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Snorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Pack4x8Snorm) {
     auto* call = Call("pack4x8snorm", "p1");
     GlobalVar("p1", ty.vec4<f32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1274,11 +1274,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Unorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Pack4x8Unorm) {
     auto* call = Call("pack4x8unorm", "p1");
     GlobalVar("p1", ty.vec4<f32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1293,11 +1293,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Snorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Pack2x16Snorm) {
     auto* call = Call("pack2x16snorm", "p1");
     GlobalVar("p1", ty.vec2<f32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1312,11 +1312,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Unorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Pack2x16Unorm) {
     auto* call = Call("pack2x16unorm", "p1");
     GlobalVar("p1", ty.vec2<f32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1331,11 +1331,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Float) {
+TEST_F(GlslASTPrinterTest_Builtin, Pack2x16Float) {
     auto* call = Call("pack2x16float", "p1");
     GlobalVar("p1", ty.vec2<f32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1350,11 +1350,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Snorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Unpack4x8Snorm) {
     auto* call = Call("unpack4x8snorm", "p1");
     GlobalVar("p1", ty.u32(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1369,11 +1369,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Unorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Unpack4x8Unorm) {
     auto* call = Call("unpack4x8unorm", "p1");
     GlobalVar("p1", ty.u32(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1388,11 +1388,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Snorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Unpack2x16Snorm) {
     auto* call = Call("unpack2x16snorm", "p1");
     GlobalVar("p1", ty.u32(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1407,11 +1407,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Unorm) {
+TEST_F(GlslASTPrinterTest_Builtin, Unpack2x16Unorm) {
     auto* call = Call("unpack2x16unorm", "p1");
     GlobalVar("p1", ty.u32(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1426,11 +1426,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Float) {
+TEST_F(GlslASTPrinterTest_Builtin, Unpack2x16Float) {
     auto* call = Call("unpack2x16float", "p1");
     GlobalVar("p1", ty.u32(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", call)));
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1445,7 +1445,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, StorageBarrier) {
+TEST_F(GlslASTPrinterTest_Builtin, StorageBarrier) {
     Func("main", utils::Empty, ty.void_(),
          utils::Vector{
              CallStmt(Call("storageBarrier")),
@@ -1455,7 +1455,7 @@
              WorkgroupSize(1_i),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1469,7 +1469,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, WorkgroupBarrier) {
+TEST_F(GlslASTPrinterTest_Builtin, WorkgroupBarrier) {
     Func("main", utils::Empty, ty.void_(),
          utils::Vector{
              CallStmt(Call("workgroupBarrier")),
@@ -1479,7 +1479,7 @@
              WorkgroupSize(1_i),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1493,11 +1493,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, DotI32) {
+TEST_F(GlslASTPrinterTest_Builtin, DotI32) {
     GlobalVar("v", ty.vec3<i32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", Call("dot", "v", "v"))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1520,11 +1520,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, DotU32) {
+TEST_F(GlslASTPrinterTest_Builtin, DotU32) {
     GlobalVar("v", ty.vec3<u32>(), builtin::AddressSpace::kPrivate);
     WrapInFunction(Decl(Var("r", Call("dot", "v", "v"))));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1547,11 +1547,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, QuantizeToF16_Scalar) {
+TEST_F(GlslASTPrinterTest_Builtin, QuantizeToF16_Scalar) {
     GlobalVar("v", Expr(2_f), builtin::AddressSpace::kPrivate);
     WrapInFunction(Call("quantizeToF16", "v"));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1575,11 +1575,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, QuantizeToF16_Vec2) {
+TEST_F(GlslASTPrinterTest_Builtin, QuantizeToF16_Vec2) {
     GlobalVar("v", Call<vec2<f32>>(2_f), builtin::AddressSpace::kPrivate);
     WrapInFunction(Call("quantizeToF16", "v"));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1603,11 +1603,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, QuantizeToF16_Vec3) {
+TEST_F(GlslASTPrinterTest_Builtin, QuantizeToF16_Vec3) {
     GlobalVar("v", Call<vec3<f32>>(2_f), builtin::AddressSpace::kPrivate);
     WrapInFunction(Call("quantizeToF16", "v"));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1633,11 +1633,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Builtin, QuantizeToF16_Vec4) {
+TEST_F(GlslASTPrinterTest_Builtin, QuantizeToF16_Vec4) {
     GlobalVar("v", Call<vec4<f32>>(2_f), builtin::AddressSpace::kPrivate);
     WrapInFunction(Call("quantizeToF16", "v"));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -1664,4 +1664,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_builtin_texture_test.cc b/src/tint/lang/glsl/writer/ast_printer/builtin_texture_test.cc
similarity index 98%
rename from src/tint/lang/glsl/ast_writer/generator_impl_builtin_texture_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/builtin_texture_test.cc
index f6cdaa0..320b45c 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_builtin_texture_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/builtin_texture_test.cc
@@ -13,12 +13,12 @@
 // limitations under the License.
 
 #include "gmock/gmock.h"
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/builtin_texture_helper_test.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using ::testing::HasSubstr;
@@ -286,7 +286,7 @@
     Func("main", utils::Empty, ty.void_(), utils::Vector{stmt},
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -302,4 +302,4 @@
                          testing::ValuesIn(ast::test::TextureOverloadCase::ValidCases()));
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_call_test.cc b/src/tint/lang/glsl/writer/ast_printer/call_test.cc
similarity index 82%
rename from src/tint/lang/glsl/ast_writer/generator_impl_call_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/call_test.cc
index 9abe085..fb1cfbf 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_call_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/call_test.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/utils/text/string_stream.h"
 
@@ -20,18 +20,18 @@
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Call = TestHelper;
+using GlslASTPrinterTest_Call = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Call, EmitExpression_Call_WithoutParams) {
+TEST_F(GlslASTPrinterTest_Call, EmitExpression_Call_WithoutParams) {
     Func("my_func", utils::Empty, ty.f32(), utils::Vector{Return(1.23_f)});
 
     auto* call = Call("my_func");
     WrapInFunction(call);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, call);
@@ -39,7 +39,7 @@
     EXPECT_EQ(out.str(), "my_func()");
 }
 
-TEST_F(GlslGeneratorImplTest_Call, EmitExpression_Call_WithParams) {
+TEST_F(GlslASTPrinterTest_Call, EmitExpression_Call_WithParams) {
     Func("my_func",
          utils::Vector{
              Param(Sym(), ty.f32()),
@@ -52,7 +52,7 @@
     auto* call = Call("my_func", "param1", "param2");
     WrapInFunction(call);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, call);
@@ -60,7 +60,7 @@
     EXPECT_EQ(out.str(), "my_func(param1, param2)");
 }
 
-TEST_F(GlslGeneratorImplTest_Call, EmitStatement_Call) {
+TEST_F(GlslASTPrinterTest_Call, EmitStatement_Call) {
     Func("my_func",
          utils::Vector{
              Param(Sym(), ty.f32()),
@@ -73,7 +73,7 @@
     auto* call = CallStmt(Call("my_func", "param1", "param2"));
     WrapInFunction(call);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(call);
@@ -82,4 +82,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_case_test.cc b/src/tint/lang/glsl/writer/ast_printer/case_test.cc
similarity index 78%
rename from src/tint/lang/glsl/ast_writer/generator_impl_case_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/case_test.cc
index a3b8b83..cee46db 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_case_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/case_test.cc
@@ -12,23 +12,23 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Case = TestHelper;
+using GlslASTPrinterTest_Case = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Case, Emit_Case) {
+TEST_F(GlslASTPrinterTest_Case, Emit_Case) {
     auto* s =
         Switch(1_i, Case(CaseSelector(5_i), Block(create<ast::BreakStatement>())), DefaultCase());
     WrapInFunction(s);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitCase(s->body[0]);
@@ -38,11 +38,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Case, Emit_Case_BreaksByDefault) {
+TEST_F(GlslASTPrinterTest_Case, Emit_Case_BreaksByDefault) {
     auto* s = Switch(1_i, Case(CaseSelector(5_i), Block()), DefaultCase());
     WrapInFunction(s);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitCase(s->body[0]);
@@ -53,7 +53,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Case, Emit_Case_MultipleSelectors) {
+TEST_F(GlslASTPrinterTest_Case, Emit_Case_MultipleSelectors) {
     auto* s = Switch(1_i,
                      Case(
                          utils::Vector{
@@ -64,7 +64,7 @@
                      DefaultCase());
     WrapInFunction(s);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitCase(s->body[0]);
@@ -76,11 +76,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Case, Emit_Case_Default) {
+TEST_F(GlslASTPrinterTest_Case, Emit_Case_Default) {
     auto* s = Switch(1_i, DefaultCase(Block(create<ast::BreakStatement>())));
     WrapInFunction(s);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitCase(s->body[0]);
@@ -92,4 +92,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_cast_test.cc b/src/tint/lang/glsl/writer/ast_printer/cast_test.cc
similarity index 77%
rename from src/tint/lang/glsl/ast_writer/generator_impl_cast_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/cast_test.cc
index 2a147ec..3393b65 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_cast_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/cast_test.cc
@@ -12,24 +12,24 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/utils/text/string_stream.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_Cast = TestHelper;
+using GlslASTPrinterTest_Cast = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Cast, EmitExpression_Cast_Scalar) {
+TEST_F(GlslASTPrinterTest_Cast, EmitExpression_Cast_Scalar) {
     auto* cast = Call<f32>(1_i);
     WrapInFunction(cast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, cast);
@@ -37,11 +37,11 @@
     EXPECT_EQ(out.str(), "1.0f");
 }
 
-TEST_F(GlslGeneratorImplTest_Cast, EmitExpression_Cast_Vector) {
+TEST_F(GlslASTPrinterTest_Cast, EmitExpression_Cast_Vector) {
     auto* cast = Call<vec3<f32>>(Call<vec3<i32>>(1_i, 2_i, 3_i));
     WrapInFunction(cast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, cast);
@@ -50,4 +50,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_constructor_test.cc b/src/tint/lang/glsl/writer/ast_printer/constructor_test.cc
similarity index 76%
rename from src/tint/lang/glsl/ast_writer/generator_impl_constructor_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/constructor_test.cc
index 436205b..a717356 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_constructor_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/constructor_test.cc
@@ -13,250 +13,250 @@
 // limitations under the License.
 
 #include "gmock/gmock.h"
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using ::testing::HasSubstr;
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_Constructor = TestHelper;
+using GlslASTPrinterTest_Constructor = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Constructor, Bool) {
+TEST_F(GlslASTPrinterTest_Constructor, Bool) {
     WrapInFunction(Expr(false));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("false"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Int) {
+TEST_F(GlslASTPrinterTest_Constructor, Int) {
     WrapInFunction(Expr(-12345_i));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("-12345"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, UInt) {
+TEST_F(GlslASTPrinterTest_Constructor, UInt) {
     WrapInFunction(Expr(56779_u));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("56779u"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Float) {
+TEST_F(GlslASTPrinterTest_Constructor, Float) {
     // Use a number close to 1<<30 but whose decimal representation ends in 0.
     WrapInFunction(Expr(f32((1 << 30) - 4)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("1073741824.0f"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, F16) {
+TEST_F(GlslASTPrinterTest_Constructor, F16) {
     Enable(builtin::Extension::kF16);
 
     // Use a number close to 1<<16 but whose decimal representation ends in 0.
     WrapInFunction(Expr(f16((1 << 15) - 8)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("32752.0hf"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Float) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Float) {
     WrapInFunction(Call<f32>(-1.2e-5_f));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("-0.00001200000042445026f"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_F16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Call<f16>(-1.2e-3_h));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("-0.0011997222900390625hf"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Bool) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Bool) {
     WrapInFunction(Call<bool>(true));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("true"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Int) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Int) {
     WrapInFunction(Call<i32>(-12345_i));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("-12345"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Uint) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Uint) {
     WrapInFunction(Call<u32>(12345_u));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("12345u"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_F32) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_F32) {
     WrapInFunction(Call<vec3<f32>>(1_f, 2_f, 3_f));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("vec3(1.0f, 2.0f, 3.0f)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_F16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Call<vec3<f16>>(1_h, 2_h, 3_h));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("f16vec3(1.0hf, 2.0hf, 3.0hf)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_Empty_F32) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_Empty_F32) {
     WrapInFunction(Call<vec3<f32>>());
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("vec3(0.0f)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_Empty_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_Empty_F16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Call<vec3<f16>>());
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("f16vec3(0.0hf)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_F32_Literal) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_F32_Literal) {
     WrapInFunction(Call<vec3<f32>>(2_f));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("vec3(2.0f)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_F16_Literal) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_F16_Literal) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Call<vec3<f16>>(2_h));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("f16vec3(2.0hf)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_F32_Var) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_F32_Var) {
     auto* var = Var("v", Expr(2_f));
     auto* cast = Call<vec3<f32>>(var);
     WrapInFunction(var, cast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(R"(float v = 2.0f;
   vec3 tint_symbol = vec3(v);)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_F16_Var) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_F16_Var) {
     Enable(builtin::Extension::kF16);
 
     auto* var = Var("v", Expr(2_h));
     auto* cast = Call<vec3<f16>>(var);
     WrapInFunction(var, cast);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(R"(float16_t v = 2.0hf;
   f16vec3 tint_symbol = f16vec3(v);)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_Bool) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_Bool) {
     WrapInFunction(Call<vec3<bool>>(true));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("bvec3(true)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_Int) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_Int) {
     WrapInFunction(Call<vec3<i32>>(2_i));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("ivec3(2)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Vec_SingleScalar_UInt) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Vec_SingleScalar_UInt) {
     WrapInFunction(Call<vec3<u32>>(2_u));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("uvec3(2u)"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_F32) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_F32) {
     WrapInFunction(
         Call<mat2x3<f32>>(Call<vec3<f32>>(1_f, 2_f, 3_f), Call<vec3<f32>>(3_f, 4_f, 5_f)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("mat2x3(vec3(1.0f, 2.0f, 3.0f), vec3(3.0f, 4.0f, 5.0f))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_F16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(
         Call<mat2x3<f16>>(Call<vec3<f16>>(1_h, 2_h, 3_h), Call<vec3<f16>>(3_h, 4_h, 5_h)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(),
                 HasSubstr("f16mat2x3(f16vec3(1.0hf, 2.0hf, 3.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_Complex_F32) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_Complex_F32) {
     // mat4x4<f32>(
     //     vec4<f32>(2.0f, 3.0f, 4.0f, 8.0f),
     //     vec4<f32>(),
@@ -275,14 +275,14 @@
 
     WrapInFunction(ctor);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("mat4(vec4(2.0f, 3.0f, 4.0f, 8.0f), vec4(0.0f), "
                                         "vec4(7.0f), vec4(42.0f, 21.0f, 6.0f, -5.0f))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_Complex_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_Complex_F16) {
     // mat4x4<f16>(
     //     vec4<f16>(2.0h, 3.0h, 4.0h, 8.0h),
     //     vec4<f16>(),
@@ -303,7 +303,7 @@
 
     WrapInFunction(ctor);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(),
@@ -311,28 +311,28 @@
                           "f16vec4(7.0hf), f16vec4(42.0hf, 21.0hf, 6.0hf, -5.0hf))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_Empty_F32) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_Empty_F32) {
     WrapInFunction(Call<mat2x3<f32>>());
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("mat2x3 tint_symbol = mat2x3(vec3(0.0f), vec3(0.0f))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_Empty_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_Empty_F16) {
     Enable(builtin::Extension::kF16);
 
     WrapInFunction(Call<mat2x3<f16>>());
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(),
                 HasSubstr("f16mat2x3 tint_symbol = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_Identity_F32) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_Identity_F32) {
     // fn f() {
     //     var m_1: mat4x4<f32> = mat4x4<f32>();
     //     var m_2: mat4x4<f32> = mat4x4<f32>(m_1);
@@ -343,13 +343,13 @@
 
     WrapInFunction(m_1, m_2);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("mat4 m_2 = mat4(m_1);"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Mat_Identity_F16) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Mat_Identity_F16) {
     // fn f() {
     //     var m_1: mat4x4<f16> = mat4x4<f16>();
     //     var m_2: mat4x4<f16> = mat4x4<f16>(m_1);
@@ -362,18 +362,18 @@
 
     WrapInFunction(m_1, m_2);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("f16mat4 m_2 = f16mat4(m_1);"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Array) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Array) {
     WrapInFunction(Call<array<vec3<f32>, 3>>(Call<vec3<f32>>(1_f, 2_f, 3_f),
                                              Call<vec3<f32>>(4_f, 5_f, 6_f),
                                              Call<vec3<f32>>(7_f, 8_f, 9_f)));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("vec3[3](vec3(1.0f, 2.0f, 3.0f), "
@@ -381,16 +381,16 @@
                                         "vec3(7.0f, 8.0f, 9.0f))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Array_Empty) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Array_Empty) {
     WrapInFunction(Call<array<vec3<f32>, 3>>());
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("vec3[3](vec3(0.0f), vec3(0.0f), vec3(0.0f))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Struct) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Struct) {
     auto* str = Structure("S", utils::Vector{
                                    Member("a", ty.i32()),
                                    Member("b", ty.f32()),
@@ -399,13 +399,13 @@
 
     WrapInFunction(Call(ty.Of(str), 1_i, 2_f, Call<vec3<i32>>(3_i, 4_i, 5_i)));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("S(1, 2.0f, ivec3(3, 4, 5))"));
 }
 
-TEST_F(GlslGeneratorImplTest_Constructor, Type_Struct_Empty) {
+TEST_F(GlslASTPrinterTest_Constructor, Type_Struct_Empty) {
     auto* str = Structure("S", utils::Vector{
                                    Member("a", ty.i32()),
                                    Member("b", ty.f32()),
@@ -414,11 +414,11 @@
 
     WrapInFunction(Call(ty.Of(str)));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("S(0"));
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_continue_test.cc b/src/tint/lang/glsl/writer/ast_printer/continue_test.cc
similarity index 78%
rename from src/tint/lang/glsl/ast_writer/generator_impl_continue_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/continue_test.cc
index cde403b..e689af6 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_continue_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/continue_test.cc
@@ -12,20 +12,20 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Continue = TestHelper;
+using GlslASTPrinterTest_Continue = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Continue, Emit_Continue) {
+TEST_F(GlslASTPrinterTest_Continue, Emit_Continue) {
     auto* loop = Loop(Block(If(false, Block(Break())), Continue()));
     WrapInFunction(loop);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
 
@@ -41,4 +41,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_discard_test.cc b/src/tint/lang/glsl/writer/ast_printer/discard_test.cc
similarity index 78%
rename from src/tint/lang/glsl/ast_writer/generator_impl_discard_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/discard_test.cc
index 68a3b94..34c543a 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_discard_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/discard_test.cc
@@ -12,22 +12,22 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Discard = TestHelper;
+using GlslASTPrinterTest_Discard = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Discard, Emit_Discard) {
+TEST_F(GlslASTPrinterTest_Discard, Emit_Discard) {
     auto* stmt = Discard();
 
     Func("F", utils::Empty, ty.void_(), utils::Vector{stmt},
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(stmt);
@@ -36,4 +36,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_function_test.cc b/src/tint/lang/glsl/writer/ast_printer/function_test.cc
similarity index 86%
rename from src/tint/lang/glsl/ast_writer/generator_impl_function_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/function_test.cc
index 23e91a2..672ba84 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_function_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/function_test.cc
@@ -13,28 +13,28 @@
 // limitations under the License.
 
 #include "gmock/gmock.h"
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 #include "src/tint/lang/wgsl/ast/variable_decl_statement.h"
 #include "src/tint/lang/wgsl/ast/workgroup_attribute.h"
 
 using ::testing::HasSubstr;
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_Function = TestHelper;
+using GlslASTPrinterTest_Function = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Function) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Function) {
     Func("my_func", utils::Empty, ty.void_(),
          utils::Vector{
              Return(),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.Generate();
@@ -48,13 +48,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Function_Name_Collision) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Function_Name_Collision) {
     Func("centroid", utils::Empty, ty.void_(),
          utils::Vector{
              Return(),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.IncrementIndent();
     gen.Generate();
@@ -64,7 +64,7 @@
   })"));
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Function_WithParams) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Function_WithParams) {
     Func("my_func",
          utils::Vector{
              Param("a", ty.f32()),
@@ -75,7 +75,7 @@
              Return(),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.Generate();
@@ -89,13 +89,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_NoReturn_Void) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_NoReturn_Void) {
     Func("func", utils::Empty, ty.void_(), utils::Empty /* no explicit return */,
          utils::Vector{
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -107,14 +107,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, PtrParameter) {
+TEST_F(GlslASTPrinterTest_Function, PtrParameter) {
     // fn f(foo : ptr<function, f32>) -> f32 {
     //   return *foo;
     // }
     Func("f", utils::Vector{Param("foo", ty.ptr<function, f32>())}, ty.f32(),
          utils::Vector{Return(Deref("foo"))});
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(R"(float f(inout float foo) {
@@ -123,7 +123,7 @@
 )"));
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_WithInOutVars) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_WithInOutVars) {
     // fn frag_main(@location(0) foo : f32) -> @location(1) f32 {
     //   return foo;
     // }
@@ -142,7 +142,7 @@
              Location(1_a),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -162,7 +162,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_WithInOut_Builtins) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_WithInOut_Builtins) {
     // fn frag_main(@position(0) coord : vec4<f32>) -> @frag_depth f32 {
     //   return coord.x;
     // }
@@ -183,7 +183,7 @@
              Builtin(builtin::BuiltinValue::kFragDepth),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -201,7 +201,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_SharedStruct_DifferentStages) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_SharedStruct_DifferentStages) {
     // struct Interface {
     //   @builtin(position) pos : vec4<f32>;
     //   @location(1) col1 : f32;
@@ -235,7 +235,7 @@
          },
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -281,7 +281,7 @@
 }
 
 #if 0
-TEST_F(GlslGeneratorImplTest_Function,
+TEST_F(GlslASTPrinterTest_Function,
        Emit_Attribute_EntryPoint_SharedStruct_HelperFunction) {
   // struct VertexOutput {
   //   @builtin(position) pos : vec4<f32>;
@@ -314,7 +314,7 @@
                          Expr(Call("foo", Expr(0.25_f)))))},
        {Stage(ast::PipelineStage::kVertex)});
 
-  GeneratorImpl& gen = SanitizeAndBuild();
+  ASTPrinter& gen = SanitizeAndBuild();
 
   ASSERT_TRUE(gen.Generate()) << gen.Diagnostics();
   EXPECT_EQ(gen.Result(), R"(struct VertexOutput {
@@ -349,7 +349,7 @@
 }
 #endif
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_Uniform) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_With_Uniform) {
     auto* ubo_ty = Structure("UBO", utils::Vector{Member("coord", ty.vec4<f32>())});
     auto* ubo =
         GlobalVar("ubo", ty.Of(ubo_ty), builtin::AddressSpace::kUniform, Binding(0_a), Group(1_a));
@@ -374,7 +374,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -399,7 +399,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_UniformStruct) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_With_UniformStruct) {
     auto* s = Structure("Uniforms", utils::Vector{Member("coord", ty.vec4<f32>())});
 
     GlobalVar("uniforms", ty.Of(s), builtin::AddressSpace::kUniform, Binding(0_a), Group(1_a));
@@ -415,7 +415,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -436,7 +436,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_RW_StorageBuffer_Read) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_With_RW_StorageBuffer_Read) {
     auto* s = Structure("Data", utils::Vector{
                                     Member("a", ty.i32()),
                                     Member("b", ty.f32()),
@@ -456,7 +456,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -483,7 +483,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_RO_StorageBuffer_Read) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_With_RO_StorageBuffer_Read) {
     auto* s = Structure("Data", utils::Vector{
                                     Member("a", ty.i32()),
                                     Member("b", ty.f32()),
@@ -503,7 +503,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(),
@@ -531,7 +531,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_WO_StorageBuffer_Store) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_With_WO_StorageBuffer_Store) {
     auto* s = Structure("Data", utils::Vector{
                                     Member("a", ty.i32()),
                                     Member("b", ty.f32()),
@@ -549,7 +549,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -576,7 +576,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_StorageBuffer_Store) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_With_StorageBuffer_Store) {
     auto* s = Structure("Data", utils::Vector{
                                     Member("a", ty.i32()),
                                     Member("b", ty.f32()),
@@ -594,7 +594,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -621,7 +621,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_Called_By_EntryPoint_With_Uniform) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_Called_By_EntryPoint_With_Uniform) {
     auto* s = Structure("S", utils::Vector{Member("x", ty.f32())});
     GlobalVar("coord", ty.Of(s), builtin::AddressSpace::kUniform, Binding(0_a), Group(1_a));
 
@@ -641,7 +641,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -666,7 +666,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_Called_By_EntryPoint_With_StorageBuffer) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_Called_By_EntryPoint_With_StorageBuffer) {
     auto* s = Structure("S", utils::Vector{Member("x", ty.f32())});
     GlobalVar("coord", ty.Of(s), builtin::AddressSpace::kStorage, builtin::Access::kReadWrite,
               Binding(0_a), Group(1_a));
@@ -687,7 +687,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(),
@@ -718,13 +718,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_WithNameCollision) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_WithNameCollision) {
     Func("centroid", utils::Empty, ty.void_(), {},
          utils::Vector{
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -740,7 +740,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_Compute) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_Compute) {
     Func("main", utils::Empty, ty.void_(),
          utils::Vector{
              Return(),
@@ -750,7 +750,7 @@
              WorkgroupSize(1_i),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -762,14 +762,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_Compute_WithWorkgroup_Literal) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_Compute_WithWorkgroup_Literal) {
     Func("main", utils::Empty, ty.void_(), {},
          utils::Vector{
              Stage(ast::PipelineStage::kCompute),
              WorkgroupSize(2_i, 4_i, 6_i),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -781,7 +781,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_Compute_WithWorkgroup_Const) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Attribute_EntryPoint_Compute_WithWorkgroup_Const) {
     GlobalConst("width", ty.i32(), Call<i32>(2_i));
     GlobalConst("height", ty.i32(), Call<i32>(3_i));
     GlobalConst("depth", ty.i32(), Call<i32>(4_i));
@@ -791,7 +791,7 @@
              WorkgroupSize("width", "height", "depth"),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -803,7 +803,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function,
+TEST_F(GlslASTPrinterTest_Function,
        Emit_Attribute_EntryPoint_Compute_WithWorkgroup_OverridableConst) {
     Override("width", ty.i32(), Call<i32>(2_i), Id(7_u));
     Override("height", ty.i32(), Call<i32>(3_i), Id(8_u));
@@ -814,7 +814,7 @@
              WorkgroupSize("width", "height", "depth"),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_EQ(
         gen.Diagnostics().str(),
@@ -824,13 +824,13 @@
 error: override-expressions should have been removed with the SubstituteOverride transform)");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Function_WithArrayParams) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Function_WithArrayParams) {
     Func("my_func", utils::Vector{Param("a", ty.array<f32, 5>())}, ty.void_(),
          utils::Vector{
              Return(),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -842,13 +842,13 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Function, Emit_Function_WithArrayReturn) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Function_WithArrayReturn) {
     Func("my_func", utils::Empty, ty.array<f32, 5>(),
          utils::Vector{
              Return(Call<array<f32, 5>>()),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -861,7 +861,7 @@
 }
 
 // https://crbug.com/tint/297
-TEST_F(GlslGeneratorImplTest_Function, Emit_Multiple_EntryPoint_With_Same_ModuleVar) {
+TEST_F(GlslASTPrinterTest_Function, Emit_Multiple_EntryPoint_With_Same_ModuleVar) {
     // struct Data {
     //   d : f32;
     // };
@@ -912,7 +912,7 @@
              });
     }
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -949,4 +949,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_identifier_test.cc b/src/tint/lang/glsl/writer/ast_printer/identifier_test.cc
similarity index 77%
rename from src/tint/lang/glsl/ast_writer/generator_impl_identifier_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/identifier_test.cc
index a0583f3..f10aaba 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_identifier_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/identifier_test.cc
@@ -12,23 +12,23 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/utils/text/string_stream.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Identifier = TestHelper;
+using GlslASTPrinterTest_Identifier = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Identifier, EmitIdentifierExpression) {
+TEST_F(GlslASTPrinterTest_Identifier, EmitIdentifierExpression) {
     GlobalVar("foo", ty.i32(), builtin::AddressSpace::kPrivate);
 
     auto* i = Expr("foo");
     WrapInFunction(i);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, i);
@@ -37,4 +37,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_if_test.cc b/src/tint/lang/glsl/writer/ast_printer/if_test.cc
similarity index 83%
rename from src/tint/lang/glsl/ast_writer/generator_impl_if_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/if_test.cc
index 7f11935..562e344 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_if_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/if_test.cc
@@ -12,16 +12,16 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_If = TestHelper;
+using GlslASTPrinterTest_If = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_If, Emit_If) {
+TEST_F(GlslASTPrinterTest_If, Emit_If) {
     GlobalVar("cond", ty.bool_(), builtin::AddressSpace::kPrivate);
 
     auto* cond = Expr("cond");
@@ -29,7 +29,7 @@
     auto* i = If(cond, body);
     WrapInFunction(i);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(i);
@@ -40,7 +40,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_If, Emit_IfWithElseIf) {
+TEST_F(GlslASTPrinterTest_If, Emit_IfWithElseIf) {
     GlobalVar("cond", ty.bool_(), builtin::AddressSpace::kPrivate);
     GlobalVar("else_cond", ty.bool_(), builtin::AddressSpace::kPrivate);
 
@@ -52,7 +52,7 @@
     auto* i = If(cond, body, Else(If(else_cond, else_body)));
     WrapInFunction(i);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(i);
@@ -67,7 +67,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_If, Emit_IfWithElse) {
+TEST_F(GlslASTPrinterTest_If, Emit_IfWithElse) {
     GlobalVar("cond", ty.bool_(), builtin::AddressSpace::kPrivate);
 
     auto* else_body = Block(Return());
@@ -77,7 +77,7 @@
     auto* i = If(cond, body, Else(else_body));
     WrapInFunction(i);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(i);
@@ -90,7 +90,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_If, Emit_IfWithMultiple) {
+TEST_F(GlslASTPrinterTest_If, Emit_IfWithMultiple) {
     GlobalVar("cond", ty.bool_(), builtin::AddressSpace::kPrivate);
     GlobalVar("else_cond", ty.bool_(), builtin::AddressSpace::kPrivate);
 
@@ -103,7 +103,7 @@
     auto* i = If(cond, body, Else(If(else_cond, else_body, Else(else_body_2))));
     WrapInFunction(i);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(i);
@@ -121,4 +121,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_import_test.cc b/src/tint/lang/glsl/writer/ast_printer/import_test.cc
similarity index 90%
rename from src/tint/lang/glsl/ast_writer/generator_impl_import_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/import_test.cc
index fa61807..146d67d 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_import_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/import_test.cc
@@ -12,18 +12,18 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/utils/text/string_stream.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_Import = TestHelper;
+using GlslASTPrinterTest_Import = TestHelper;
 
 struct GlslImportData {
     const char* name;
@@ -41,14 +41,14 @@
     auto* expr = Call(param.name, 1_f);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(1.0f)");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_SingleParamTest,
                          testing::Values(GlslImportData{"abs", "abs"},
                                          GlslImportData{"acos", "acos"},
@@ -81,14 +81,14 @@
     auto* expr = Call(param.name, Expr(1_i));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(1)");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_SingleIntParamTest,
                          testing::Values(GlslImportData{"abs", "abs"}));
 
@@ -99,7 +99,7 @@
     auto* expr = Call(param.name, Call<vec3<f32>>(0.1_f, 0.2_f, 0.3_f));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
@@ -109,7 +109,7 @@
         std::string(param.glsl_name) +
             "(vec3(0.10000000149011611938f, 0.20000000298023223877f, 0.30000001192092895508f))");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_SingleVectorParamTest,
                          testing::Values(GlslImportData{"abs", "abs"},
                                          GlslImportData{"acos", "acos"},
@@ -143,14 +143,14 @@
     auto* expr = Call(param.name, 1_f, 2_f);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(1.0f, 2.0f)");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_DualParam_ScalarTest,
                          testing::Values(GlslImportData{"atan2", "atan"},
                                          GlslImportData{"distance", "distance"},
@@ -166,7 +166,7 @@
     auto* expr = Call(param.name, Call<vec3<f32>>(1_f, 2_f, 3_f), Call<vec3<f32>>(4_f, 5_f, 6_f));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
@@ -174,7 +174,7 @@
     EXPECT_EQ(out.str(),
               std::string(param.glsl_name) + "(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f))");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_DualParam_VectorTest,
                          testing::Values(GlslImportData{"atan2", "atan"},
                                          GlslImportData{"cross", "cross"},
@@ -192,14 +192,14 @@
     auto* expr = Call(param.name, 1_i, 2_i);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(1, 2)");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_DualParam_Int_Test,
                          testing::Values(GlslImportData{"max", "max"},
                                          GlslImportData{"min", "min"}));
@@ -211,14 +211,14 @@
     auto* expr = Call(param.name, 1_f, 2_f, 3_f);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(1.0f, 2.0f, 3.0f)");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_TripleParam_ScalarTest,
                          testing::Values(GlslImportData{"mix", "mix"},
                                          GlslImportData{"clamp", "clamp"},
@@ -232,7 +232,7 @@
                       Call<vec3<f32>>(7_f, 8_f, 9_f));
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
@@ -241,7 +241,7 @@
               std::string(param.glsl_name) +
                   R"((vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f)))");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_TripleParam_VectorTest,
                          testing::Values(GlslImportData{"faceForward", "faceforward"},
                                          GlslImportData{"clamp", "clamp"},
@@ -254,24 +254,24 @@
     auto* expr = Call(param.name, 1_i, 2_i, 3_i);
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(1, 2, 3)");
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Import,
                          GlslImportData_TripleParam_Int_Test,
                          testing::Values(GlslImportData{"clamp", "clamp"}));
 
-TEST_F(GlslGeneratorImplTest_Import, GlslImportData_Determinant) {
+TEST_F(GlslASTPrinterTest_Import, GlslImportData_Determinant) {
     GlobalVar("var", ty.mat3x3<f32>(), builtin::AddressSpace::kPrivate);
 
     auto* expr = Call("determinant", "var");
     WrapInFunction(expr);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitCall(out, expr);
@@ -280,4 +280,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_loop_test.cc b/src/tint/lang/glsl/writer/ast_printer/loop_test.cc
similarity index 84%
rename from src/tint/lang/glsl/ast_writer/generator_impl_loop_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/loop_test.cc
index 73b2cad..9642a09 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_loop_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/loop_test.cc
@@ -12,19 +12,19 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/variable_decl_statement.h"
 
 #include "gmock/gmock.h"
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Loop = TestHelper;
+using GlslASTPrinterTest_Loop = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_Loop) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_Loop) {
     auto* body = Block(Break());
     auto* continuing = Block();
     auto* l = Loop(body, continuing);
@@ -32,7 +32,7 @@
     Func("F", utils::Empty, ty.void_(), utils::Vector{l},
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(l);
@@ -43,7 +43,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_LoopWithContinuing) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_LoopWithContinuing) {
     Func("a_statement", {}, ty.void_(), {});
 
     auto* body = Block(Break());
@@ -53,7 +53,7 @@
     Func("F", utils::Empty, ty.void_(), utils::Vector{l},
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(l);
@@ -67,7 +67,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_LoopWithContinuing_BreakIf) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_LoopWithContinuing_BreakIf) {
     Func("a_statement", {}, ty.void_(), {});
 
     auto* body = Block(Break());
@@ -77,7 +77,7 @@
     Func("F", utils::Empty, ty.void_(), utils::Vector{l},
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(l);
@@ -92,7 +92,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_LoopNestedWithContinuing) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_LoopNestedWithContinuing) {
     Func("a_statement", {}, ty.void_(), {});
 
     GlobalVar("lhs", ty.f32(), builtin::AddressSpace::kPrivate);
@@ -114,7 +114,7 @@
     Func("F", utils::Empty, ty.void_(), utils::Vector{outer},
          utils::Vector{Stage(ast::PipelineStage::kFragment)});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(outer);
@@ -134,7 +134,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_LoopWithVarUsedInContinuing) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_LoopWithVarUsedInContinuing) {
     // loop {
     //   var lhs : f32 = 2.5;
     //   var other : f32;
@@ -153,7 +153,7 @@
     auto* outer = Loop(body, continuing);
     WrapInFunction(outer);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(outer);
@@ -169,7 +169,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoop) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoop) {
     // for(; ; ) {
     //   return;
     // }
@@ -178,7 +178,7 @@
                   Block(Return()));
     WrapInFunction(f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -191,7 +191,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleInit) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithSimpleInit) {
     // for(var i : i32; ; ) {
     //   return;
     // }
@@ -200,7 +200,7 @@
                   Block(Return()));
     WrapInFunction(f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -213,7 +213,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtInit) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithMultiStmtInit) {
     // let t = true;
     // for(var b = t && false; ; ) {
     //   return;
@@ -224,7 +224,7 @@
     auto* f = For(Decl(Var("b", multi_stmt)), nullptr, nullptr, Block(Return()));
     WrapInFunction(t, f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -242,7 +242,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleCond) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithSimpleCond) {
     // for(; true; ) {
     //   return;
     // }
@@ -252,7 +252,7 @@
     auto* f = For(nullptr, true, nullptr, Block(CallStmt(Call("a_statement"))));
     WrapInFunction(f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -265,7 +265,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtCond) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithMultiStmtCond) {
     // let t = true;
     // for(; t && false; ) {
     //   return;
@@ -277,7 +277,7 @@
     auto* f = For(nullptr, multi_stmt, nullptr, Block(CallStmt(Call("a_statement"))));
     WrapInFunction(t, f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -295,7 +295,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleCont) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithSimpleCont) {
     // for(; ; i = i + 1i) {
     //   return;
     // }
@@ -305,7 +305,7 @@
                   Block(Return()));
     WrapInFunction(v, f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -318,7 +318,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtCont) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithMultiStmtCont) {
     // let t = true;
     // for(; ; i = t && false) {
     //   return;
@@ -331,7 +331,7 @@
                   Block(Return()));
     WrapInFunction(t, v, f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -349,7 +349,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleInitCondCont) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithSimpleInitCondCont) {
     // for(var i : i32; true; i = ii + 1) {
     //   return;
     // }
@@ -357,7 +357,7 @@
     auto* f = For(Decl(Var("i", ty.i32())), true, Assign("i", Add("i", 1_i)), Block(Return()));
     WrapInFunction(f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -370,7 +370,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtInitCondCont) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_ForLoopWithMultiStmtInitCondCont) {
     // let t = true;
     // for(var i = t && false; t && false; i = t && false) {
     //   return;
@@ -385,7 +385,7 @@
                   Block(Return()));
     WrapInFunction(t, f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -413,7 +413,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_While) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_While) {
     // while(true) {
     //   return;
     // }
@@ -421,7 +421,7 @@
     auto* f = While(Expr(true), Block(Return()));
     WrapInFunction(f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -432,7 +432,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_While_WithContinue) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_While_WithContinue) {
     // while(true) {
     //   continue;
     // }
@@ -440,7 +440,7 @@
     auto* f = While(Expr(true), Block(Continue()));
     WrapInFunction(f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -451,7 +451,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Loop, Emit_WhileWithMultiStmtCond) {
+TEST_F(GlslASTPrinterTest_Loop, Emit_WhileWithMultiStmtCond) {
     // let t = true;
     // while(t && false) {
     //   return;
@@ -464,7 +464,7 @@
     auto* f = While(multi_stmt, Block(CallStmt(Call("a_statement"))));
     WrapInFunction(t, f);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.IncrementIndent();
     gen.EmitStatement(f);
@@ -481,4 +481,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_member_accessor_test.cc b/src/tint/lang/glsl/writer/ast_printer/member_accessor_test.cc
similarity index 87%
rename from src/tint/lang/glsl/ast_writer/generator_impl_member_accessor_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/member_accessor_test.cc
index 84a1a97..6d794d2 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_member_accessor_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/member_accessor_test.cc
@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using ::testing::HasSubstr;
@@ -85,7 +85,7 @@
 }
 
 template <typename BASE>
-class GlslGeneratorImplTest_MemberAccessorBase : public BASE {
+class GlslASTPrinterTest_MemberAccessorBase : public BASE {
   public:
     void SetupStorageBuffer(utils::VectorRef<const ast::StructMember*> members) {
         ProgramBuilder& b = *this;
@@ -105,20 +105,20 @@
     }
 };
 
-using GlslGeneratorImplTest_MemberAccessor = GlslGeneratorImplTest_MemberAccessorBase<TestHelper>;
+using GlslASTPrinterTest_MemberAccessor = GlslASTPrinterTest_MemberAccessorBase<TestHelper>;
 
 template <typename T>
-using GlslGeneratorImplTest_MemberAccessorWithParam =
-    GlslGeneratorImplTest_MemberAccessorBase<TestParamHelper<T>>;
+using GlslASTPrinterTest_MemberAccessorWithParam =
+    GlslASTPrinterTest_MemberAccessorBase<TestParamHelper<T>>;
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, EmitExpression_MemberAccessor) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, EmitExpression_MemberAccessor) {
     auto* s = Structure("Data", utils::Vector{Member("mem", ty.f32())});
     GlobalVar("str", ty.Of(s), builtin::AddressSpace::kPrivate);
 
     auto* expr = MemberAccessor("str", "mem");
     WrapInFunction(Var("expr", ty.f32(), expr));
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -148,9 +148,9 @@
     return out << c.expected;
 }
 
-using GlslGeneratorImplTest_MemberAccessor_StorageBufferLoad =
-    GlslGeneratorImplTest_MemberAccessorWithParam<TypeCase>;
-TEST_P(GlslGeneratorImplTest_MemberAccessor_StorageBufferLoad, Test) {
+using GlslASTPrinterTest_MemberAccessor_StorageBufferLoad =
+    GlslASTPrinterTest_MemberAccessorWithParam<TypeCase>;
+TEST_P(GlslASTPrinterTest_MemberAccessor_StorageBufferLoad, Test) {
     // struct Data {
     //   a : i32;
     //   b : <type>;
@@ -169,14 +169,14 @@
         Decl(Var("x", MemberAccessor("data", "b"))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(p.expected));
 }
 
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_MemberAccessor,
-                         GlslGeneratorImplTest_MemberAccessor_StorageBufferLoad,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_MemberAccessor,
+                         GlslASTPrinterTest_MemberAccessor_StorageBufferLoad,
                          testing::Values(TypeCase{ty_u32, "data.inner.b"},
                                          TypeCase{ty_f32, "data.inner.b"},
                                          TypeCase{ty_i32, "data.inner.b"},
@@ -199,9 +199,9 @@
                                          TypeCase{ty_mat4x3<f32>, "data.inner.b"},
                                          TypeCase{ty_mat4x4<f32>, "data.inner.b"}));
 
-using GlslGeneratorImplTest_MemberAccessor_StorageBufferStore =
-    GlslGeneratorImplTest_MemberAccessorWithParam<TypeCase>;
-TEST_P(GlslGeneratorImplTest_MemberAccessor_StorageBufferStore, Test) {
+using GlslASTPrinterTest_MemberAccessor_StorageBufferStore =
+    GlslASTPrinterTest_MemberAccessorWithParam<TypeCase>;
+TEST_P(GlslASTPrinterTest_MemberAccessor_StorageBufferStore, Test) {
     // struct Data {
     //   a : i32;
     //   b : <type>;
@@ -221,15 +221,15 @@
         Assign(MemberAccessor("data", "b"), Expr("value")),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(p.expected));
 }
 
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_MemberAccessor,
-                         GlslGeneratorImplTest_MemberAccessor_StorageBufferStore,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_MemberAccessor,
+                         GlslASTPrinterTest_MemberAccessor_StorageBufferStore,
                          testing::Values(TypeCase{ty_u32, "data.inner.b = value"},
                                          TypeCase{ty_f32, "data.inner.b = value"},
                                          TypeCase{ty_i32, "data.inner.b = value"},
@@ -261,7 +261,7 @@
   data.inner.b[3] = value[3u];)"},
                                          TypeCase{ty_mat4x4<f32>, "data.inner.b = value"}));
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_Matrix_Empty) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Store_Matrix_Empty) {
     // struct Data {
     //   z : f32;
     //   a : mat2x3<f32>;
@@ -278,7 +278,7 @@
         Assign(MemberAccessor("data", "b"), Call<mat2x3<f32>>()),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -315,7 +315,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Load_Matrix_Single_Element) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Load_Matrix_Single_Element) {
     // struct Data {
     //   z : f32;
     //   a : mat4x3<f32>;
@@ -332,7 +332,7 @@
         Decl(Var("x", IndexAccessor(IndexAccessor(MemberAccessor("data", "a"), 2_i), 1_i))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -363,7 +363,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor,
+TEST_F(GlslASTPrinterTest_MemberAccessor,
        EmitExpression_IndexAccessor_StorageBuffer_Load_Int_FromArray) {
     // struct Data {
     //   a : array<i32, 5>;
@@ -380,7 +380,7 @@
         Decl(Var("x", IndexAccessor(MemberAccessor("data", "a"), 2_i))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -408,7 +408,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor,
+TEST_F(GlslASTPrinterTest_MemberAccessor,
        EmitExpression_IndexAccessor_StorageBuffer_Load_Int_FromArray_ExprIdx) {
     // struct Data {
     //   a : array<i32, 5u>;
@@ -428,7 +428,7 @@
         Decl(Var("x", IndexAccessor(MemberAccessor("data", "a"), Sub(Add("a", "b"), "c")))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -459,7 +459,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_ToArray) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Store_ToArray) {
     // struct Data {
     //   a : array<i32, 5u>;
     // };
@@ -475,7 +475,7 @@
         Assign(IndexAccessor(MemberAccessor("data", "a"), 2_i), 2_i),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -503,7 +503,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Load_MultiLevel) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Load_MultiLevel) {
     // struct Inner {
     //   a : vec3<i32>;
     //   b : vec3<f32>;
@@ -528,7 +528,7 @@
         Decl(Var("x", MemberAccessor(IndexAccessor(MemberAccessor("data", "c"), 2_i), "b"))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -562,7 +562,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Load_MultiLevel_Swizzle) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Load_MultiLevel_Swizzle) {
     // struct Inner {
     //   a : vec3<i32>;
     //   b : vec3<f32>;
@@ -589,7 +589,7 @@
                      MemberAccessor(IndexAccessor(MemberAccessor("data", "c"), 2_i), "b"), "xy"))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -623,7 +623,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor,
+TEST_F(GlslASTPrinterTest_MemberAccessor,
        StorageBuffer_Load_MultiLevel_Swizzle_SingleLetter) {  // NOLINT
     // struct Inner {
     //   a : vec3<i32>;
@@ -651,7 +651,7 @@
                      MemberAccessor(IndexAccessor(MemberAccessor("data", "c"), 2_i), "b"), "g"))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -685,7 +685,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Load_MultiLevel_Index) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Load_MultiLevel_Index) {
     // struct Inner {
     //   a : vec3<i32>;
     //   b : vec3<f32>;
@@ -712,7 +712,7 @@
                                1_i))),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -746,7 +746,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_MultiLevel) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Store_MultiLevel) {
     // struct Inner {
     //   a : vec3<i32>;
     //   b : vec3<f32>;
@@ -772,7 +772,7 @@
                Call<vec3<f32>>(1_f, 2_f, 3_f)),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -806,7 +806,7 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_Swizzle_SingleLetter) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, StorageBuffer_Store_Swizzle_SingleLetter) {
     // struct Inner {
     //   a : vec3<i32>;
     //   b : vec3<f32>;
@@ -833,7 +833,7 @@
                Expr(1_f)),
     });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     auto* expected =
@@ -867,27 +867,27 @@
     EXPECT_EQ(gen.Result(), expected);
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, Swizzle_xyz) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, Swizzle_xyz) {
     auto* var = Var("my_vec", ty.vec4<f32>(), Call<vec4<f32>>(1_f, 2_f, 3_f, 4_f));
     auto* expr = MemberAccessor("my_vec", "xyz");
     WrapInFunction(var, expr);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("my_vec.xyz"));
 }
 
-TEST_F(GlslGeneratorImplTest_MemberAccessor, Swizzle_gbr) {
+TEST_F(GlslASTPrinterTest_MemberAccessor, Swizzle_gbr) {
     auto* var = Var("my_vec", ty.vec4<f32>(), Call<vec4<f32>>(1_f, 2_f, 3_f, 4_f));
     auto* expr = MemberAccessor("my_vec", "gbr");
     WrapInFunction(var, expr);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("my_vec.gbr"));
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_module_constant_test.cc b/src/tint/lang/glsl/writer/ast_printer/module_constant_test.cc
similarity index 78%
rename from src/tint/lang/glsl/ast_writer/generator_impl_module_constant_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/module_constant_test.cc
index 672d359..d5b531e 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_module_constant_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/module_constant_test.cc
@@ -12,37 +12,37 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/id_attribute.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_ModuleConstant = TestHelper;
+using GlslASTPrinterTest_ModuleConstant = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalLet) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalLet) {
     auto* var = Let("pos", ty.array<f32, 3>(), Call<array<f32, 3>>(1_f, 2_f, 3_f));
     WrapInFunction(Decl(var));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.EmitProgramConstVariable(var);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), "const float pos[3] = float[3](1.0f, 2.0f, 3.0f);\n");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_AInt) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_AInt) {
     auto* var = GlobalConst("G", Expr(1_a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -54,14 +54,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_AFloat) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_AFloat) {
     auto* var = GlobalConst("G", Expr(1._a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -73,14 +73,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_i32) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_i32) {
     auto* var = GlobalConst("G", Expr(1_i));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -92,14 +92,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_u32) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_u32) {
     auto* var = GlobalConst("G", Expr(1_u));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -111,14 +111,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_f32) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_f32) {
     auto* var = GlobalConst("G", Expr(1_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -130,7 +130,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_f16) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* var = GlobalConst("G", Expr(1_h));
@@ -139,7 +139,7 @@
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -152,14 +152,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_vec3_AInt) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_vec3_AInt) {
     auto* var = GlobalConst("G", Call<vec3<Infer>>(1_a, 2_a, 3_a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -171,14 +171,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_vec3_AFloat) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_vec3_AFloat) {
     auto* var = GlobalConst("G", Call<vec3<Infer>>(1._a, 2._a, 3._a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -190,14 +190,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_vec3_f32) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_vec3_f32) {
     auto* var = GlobalConst("G", Call<vec3<f32>>(1_f, 2_f, 3_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -209,7 +209,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_vec3_f16) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_vec3_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* var = GlobalConst("G", Call<vec3<f16>>(1_h, 2_h, 3_h));
@@ -218,7 +218,7 @@
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -231,14 +231,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_mat2x3_AFloat) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_mat2x3_AFloat) {
     auto* var = GlobalConst("G", Call<mat2x3<Infer>>(1._a, 2._a, 3._a, 4._a, 5._a, 6._a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -250,14 +250,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_mat2x3_f32) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_mat2x3_f32) {
     auto* var = GlobalConst("G", Call<mat2x3<f32>>(1_f, 2_f, 3_f, 4_f, 5_f, 6_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -269,7 +269,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_mat2x3_f16) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_mat2x3_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* var = GlobalConst("G", Call<mat2x3<f16>>(1_h, 2_h, 3_h, 4_h, 5_h, 6_h));
@@ -278,7 +278,7 @@
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -291,14 +291,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_arr_f32) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_arr_f32) {
     auto* var = GlobalConst("G", Call<array<f32, 3>>(1_f, 2_f, 3_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -310,7 +310,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_arr_vec2_bool) {
+TEST_F(GlslASTPrinterTest_ModuleConstant, Emit_GlobalConst_arr_vec2_bool) {
     auto* var = GlobalConst("G", Call<array<vec2<bool>, 3>>(         //
                                      Call<vec2<bool>>(true, false),  //
                                      Call<vec2<bool>>(false, true),  //
@@ -320,7 +320,7 @@
              Decl(Let("l", Expr(var))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -333,4 +333,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_return_test.cc b/src/tint/lang/glsl/writer/ast_printer/return_test.cc
similarity index 76%
rename from src/tint/lang/glsl/ast_writer/generator_impl_return_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/return_test.cc
index 9159b8e..82599a3 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_return_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/return_test.cc
@@ -12,33 +12,33 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Return = TestHelper;
+using GlslASTPrinterTest_Return = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Return, Emit_Return) {
+TEST_F(GlslASTPrinterTest_Return, Emit_Return) {
     auto* r = Return();
     WrapInFunction(r);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(r);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), "  return;\n");
 }
 
-TEST_F(GlslGeneratorImplTest_Return, Emit_ReturnWithValue) {
+TEST_F(GlslASTPrinterTest_Return, Emit_ReturnWithValue) {
     auto* r = Return(123_i);
     Func("f", utils::Empty, ty.i32(), utils::Vector{r});
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(r);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -46,4 +46,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_sanitizer_test.cc b/src/tint/lang/glsl/writer/ast_printer/sanitizer_test.cc
similarity index 94%
rename from src/tint/lang/glsl/ast_writer/generator_impl_sanitizer_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/sanitizer_test.cc
index 8e7df8c..e6aac15 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_sanitizer_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/sanitizer_test.cc
@@ -12,14 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 #include "src/tint/lang/wgsl/ast/variable_decl_statement.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::builtin::fluent_types;  // NOLINT
@@ -40,7 +40,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -80,7 +80,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -124,7 +124,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -161,7 +161,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -203,7 +203,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -249,7 +249,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -294,7 +294,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 
@@ -316,4 +316,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_storage_buffer_test.cc b/src/tint/lang/glsl/writer/ast_printer/storage_buffer_test.cc
similarity index 84%
rename from src/tint/lang/glsl/ast_writer/generator_impl_storage_buffer_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/storage_buffer_test.cc
index 7731577..1f0a420 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_storage_buffer_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/storage_buffer_test.cc
@@ -13,17 +13,17 @@
 // limitations under the License.
 
 #include "src/tint/lang/core/builtin/number.h"
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
 using ::testing::HasSubstr;
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_StorageBuffer = TestHelper;
+using GlslASTPrinterTest_StorageBuffer = TestHelper;
 
 void TestAlign(ProgramBuilder* ctx) {
     // struct Nephews {
@@ -42,10 +42,10 @@
                    ctx->Binding(0_a), ctx->Group(0_a));
 }
 
-TEST_F(GlslGeneratorImplTest_StorageBuffer, Align) {
+TEST_F(GlslASTPrinterTest_StorageBuffer, Align) {
     TestAlign(this);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     // TODO(crbug.com/tint/1421) offsets do not currently work on GLSL ES.
     // They will likely require manual padding.
@@ -68,10 +68,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_StorageBuffer, Align_Desktop) {
+TEST_F(GlslASTPrinterTest_StorageBuffer, Align_Desktop) {
     TestAlign(this);
 
-    GeneratorImpl& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
+    ASTPrinter& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 440
@@ -92,4 +92,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_switch_test.cc b/src/tint/lang/glsl/writer/ast_printer/switch_test.cc
similarity index 84%
rename from src/tint/lang/glsl/ast_writer/generator_impl_switch_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/switch_test.cc
index 14a450e..2e48773 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_switch_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/switch_test.cc
@@ -12,18 +12,18 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Switch = TestHelper;
+using GlslASTPrinterTest_Switch = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Switch, Emit_Switch) {
+TEST_F(GlslASTPrinterTest_Switch, Emit_Switch) {
     GlobalVar("cond", ty.i32(), builtin::AddressSpace::kPrivate);
 
     auto* def_body = Block(create<ast::BreakStatement>());
@@ -36,7 +36,7 @@
     auto* s = Switch(cond, utils::Vector{case_stmt, def});
     WrapInFunction(s);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(s);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -51,7 +51,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Switch, Emit_Switch_MixedDefault) {
+TEST_F(GlslASTPrinterTest_Switch, Emit_Switch_MixedDefault) {
     GlobalVar("cond", ty.i32(), builtin::AddressSpace::kPrivate);
 
     auto* def_body = Block(create<ast::BreakStatement>());
@@ -62,7 +62,7 @@
     auto* s = Switch(cond, utils::Vector{def});
     WrapInFunction(s);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(s);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -76,4 +76,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/test_helper.h b/src/tint/lang/glsl/writer/ast_printer/test_helper.h
similarity index 74%
rename from src/tint/lang/glsl/ast_writer/test_helper.h
rename to src/tint/lang/glsl/writer/ast_printer/test_helper.h
index c6d5ce1..95f8a73 100644
--- a/src/tint/lang/glsl/ast_writer/test_helper.h
+++ b/src/tint/lang/glsl/writer/ast_printer/test_helper.h
@@ -12,20 +12,20 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef SRC_TINT_LANG_GLSL_AST_WRITER_TEST_HELPER_H_
-#define SRC_TINT_LANG_GLSL_AST_WRITER_TEST_HELPER_H_
+#ifndef SRC_TINT_LANG_GLSL_WRITER_AST_PRINTER_TEST_HELPER_H_
+#define SRC_TINT_LANG_GLSL_WRITER_AST_PRINTER_TEST_HELPER_H_
 
 #include <memory>
 #include <string>
 #include <utility>
 
 #include "gtest/gtest.h"
-#include "src/tint/lang/glsl/ast_writer/generator.h"
-#include "src/tint/lang/glsl/ast_writer/generator_impl.h"
-#include "src/tint/lang/glsl/ast_writer/version.h"
+#include "src/tint/lang/glsl/writer/ast_printer/ast_printer.h"
+#include "src/tint/lang/glsl/writer/version.h"
+#include "src/tint/lang/glsl/writer/writer.h"
 #include "src/tint/lang/wgsl/ast/transform/manager.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 
 /// Helper class for testing
 template <typename BODY>
@@ -42,12 +42,12 @@
         return opts;
     }
 
-    /// Builds the program and returns a GeneratorImpl from the program.
+    /// Builds the program and returns a ASTPrinter from the program.
     /// @note The generator is only built once. Multiple calls to Build() will
-    /// return the same GeneratorImpl without rebuilding.
+    /// return the same ASTPrinter without rebuilding.
     /// @param version the GLSL version
     /// @return the built generator
-    GeneratorImpl& Build(Version version = Version()) {
+    ASTPrinter& Build(Version version = Version()) {
         if (gen_) {
             return *gen_;
         }
@@ -59,19 +59,19 @@
         [&] {
             ASSERT_TRUE(program->IsValid()) << diag::Formatter().format(program->Diagnostics());
         }();
-        gen_ = std::make_unique<GeneratorImpl>(program.get(), version);
+        gen_ = std::make_unique<ASTPrinter>(program.get(), version);
         return *gen_;
     }
 
     /// Builds the program, runs the program through the transform::Glsl sanitizer
-    /// and returns a GeneratorImpl from the sanitized program.
+    /// and returns a ASTPrinter from the sanitized program.
     /// @note The generator is only built once. Multiple calls to Build() will
-    /// return the same GeneratorImpl without rebuilding.
+    /// return the same ASTPrinter without rebuilding.
     /// @param version the GLSL version
     /// @param options the GLSL backend options
     /// @return the built generator
-    GeneratorImpl& SanitizeAndBuild(Version version = Version(),
-                                    const Options& options = DefaultOptions()) {
+    ASTPrinter& SanitizeAndBuild(Version version = Version(),
+                                 const Options& options = DefaultOptions()) {
         if (gen_) {
             return *gen_;
         }
@@ -90,7 +90,7 @@
         }();
 
         *program = std::move(sanitized_result.program);
-        gen_ = std::make_unique<GeneratorImpl>(program.get(), version);
+        gen_ = std::make_unique<ASTPrinter>(program.get(), version);
         return *gen_;
     }
 
@@ -98,13 +98,13 @@
     std::unique_ptr<Program> program;
 
   private:
-    std::unique_ptr<GeneratorImpl> gen_;
+    std::unique_ptr<ASTPrinter> gen_;
 };
 using TestHelper = TestHelperBase<testing::Test>;
 
 template <typename T>
 using TestParamHelper = TestHelperBase<testing::TestWithParam<T>>;
 
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
 
-#endif  // SRC_TINT_LANG_GLSL_AST_WRITER_TEST_HELPER_H_
+#endif  // SRC_TINT_LANG_GLSL_WRITER_AST_PRINTER_TEST_HELPER_H_
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_type_test.cc b/src/tint/lang/glsl/writer/ast_printer/type_test.cc
similarity index 88%
rename from src/tint/lang/glsl/ast_writer/generator_impl_type_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/type_test.cc
index d19b02f..ba488ae 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_type_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/type_test.cc
@@ -18,7 +18,7 @@
 #include "src/tint/lang/core/type/sampler.h"
 #include "src/tint/lang/core/type/storage_texture.h"
 #include "src/tint/lang/core/type/texture_dimension.h"
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/call_statement.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 #include "src/tint/utils/text/string_stream.h"
@@ -29,16 +29,16 @@
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_Type = TestHelper;
+using GlslASTPrinterTest_Type = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Array) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Array) {
     auto arr = ty.array<bool, 4>();
     ast::Type ty = GlobalVar("G", arr, builtin::AddressSpace::kPrivate)->type;
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, program->TypeOf(ty), builtin::AddressSpace::kUndefined,
@@ -47,11 +47,11 @@
     EXPECT_EQ(out.str(), "bool ary[4]");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_ArrayOfArray) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_ArrayOfArray) {
     auto arr = ty.array(ty.array<bool, 4>(), 5_u);
     ast::Type ty = GlobalVar("G", arr, builtin::AddressSpace::kPrivate)->type;
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, program->TypeOf(ty), builtin::AddressSpace::kUndefined,
@@ -60,11 +60,11 @@
     EXPECT_EQ(out.str(), "bool ary[5][4]");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_ArrayOfArrayOfArray) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_ArrayOfArrayOfArray) {
     auto arr = ty.array(ty.array(ty.array<bool, 4>(), 5_u), 6_u);
     ast::Type ty = GlobalVar("G", arr, builtin::AddressSpace::kPrivate)->type;
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, program->TypeOf(ty), builtin::AddressSpace::kUndefined,
@@ -73,11 +73,11 @@
     EXPECT_EQ(out.str(), "bool ary[6][5][4]");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Array_WithoutName) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Array_WithoutName) {
     auto arr = ty.array<bool, 4>();
     ast::Type ty = GlobalVar("G", arr, builtin::AddressSpace::kPrivate)->type;
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, program->TypeOf(ty), builtin::AddressSpace::kUndefined,
@@ -86,10 +86,10 @@
     EXPECT_EQ(out.str(), "bool[4]");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Bool) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Bool) {
     auto* bool_ = create<type::Bool>();
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, bool_, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -97,10 +97,10 @@
     EXPECT_EQ(out.str(), "bool");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_F32) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_F32) {
     auto* f32 = create<type::F32>();
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, f32, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -108,12 +108,12 @@
     EXPECT_EQ(out.str(), "float");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_F16) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_F16) {
     Enable(builtin::Extension::kF16);
 
     auto* f16 = create<type::F16>();
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, f16, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -121,10 +121,10 @@
     EXPECT_EQ(out.str(), "float16_t");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_I32) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_I32) {
     auto* i32 = create<type::I32>();
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, i32, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -132,12 +132,12 @@
     EXPECT_EQ(out.str(), "int");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Matrix_F32) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Matrix_F32) {
     auto* f32 = create<type::F32>();
     auto* vec3 = create<type::Vector>(f32, 3u);
     auto* mat2x3 = create<type::Matrix>(vec3, 2u);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, mat2x3, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -145,14 +145,14 @@
     EXPECT_EQ(out.str(), "mat2x3");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Matrix_F16) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Matrix_F16) {
     Enable(builtin::Extension::kF16);
 
     auto* f16 = create<type::F16>();
     auto* vec3 = create<type::Vector>(f16, 3u);
     auto* mat2x3 = create<type::Matrix>(vec3, 2u);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, mat2x3, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -160,14 +160,14 @@
     EXPECT_EQ(out.str(), "f16mat2x3");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_StructDecl) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_StructDecl) {
     auto* s = Structure("S", utils::Vector{
                                  Member("a", ty.i32()),
                                  Member("b", ty.f32()),
                              });
     GlobalVar("g", ty.Of(s), builtin::AddressSpace::kPrivate);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::TextGenerator::TextBuffer buf;
     auto* str = program->TypeOf(s)->As<type::Struct>();
@@ -181,14 +181,14 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Struct) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Struct) {
     auto* s = Structure("S", utils::Vector{
                                  Member("a", ty.i32()),
                                  Member("b", ty.f32()),
                              });
     GlobalVar("g", ty.Of(s), builtin::AddressSpace::kPrivate);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     auto* str = program->TypeOf(s)->As<type::Struct>();
     utils::StringStream out;
@@ -197,14 +197,14 @@
     EXPECT_EQ(out.str(), "S");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Struct_NameCollision) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Struct_NameCollision) {
     auto* s = Structure("S", utils::Vector{
                                  Member("double", ty.i32()),
                                  Member("float", ty.f32()),
                              });
     GlobalVar("g", ty.Of(s), builtin::AddressSpace::kPrivate);
 
-    GeneratorImpl& gen = SanitizeAndBuild();
+    ASTPrinter& gen = SanitizeAndBuild();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(R"(struct S {
@@ -214,14 +214,14 @@
 )"));
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Struct_WithOffsetAttributes) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Struct_WithOffsetAttributes) {
     auto* s = Structure("S", utils::Vector{
                                  Member("a", ty.i32(), utils::Vector{MemberOffset(0_a)}),
                                  Member("b", ty.f32(), utils::Vector{MemberOffset(8_a)}),
                              });
     GlobalVar("g", ty.Of(s), builtin::AddressSpace::kPrivate);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::TextGenerator::TextBuffer buf;
     auto* str = program->TypeOf(s)->As<type::Struct>();
@@ -235,10 +235,10 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_U32) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_U32) {
     auto* u32 = create<type::U32>();
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, u32, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -246,11 +246,11 @@
     EXPECT_EQ(out.str(), "uint");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Vector_F32) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Vector_F32) {
     auto* f32 = create<type::F32>();
     auto* vec3 = create<type::Vector>(f32, 3u);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, vec3, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -258,13 +258,13 @@
     EXPECT_EQ(out.str(), "vec3");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Vector_F16) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Vector_F16) {
     Enable(builtin::Extension::kF16);
 
     auto* f16 = create<type::F16>();
     auto* vec3 = create<type::Vector>(f16, 3u);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, vec3, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -272,10 +272,10 @@
     EXPECT_EQ(out.str(), "f16vec3");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitType_Void) {
+TEST_F(GlslASTPrinterTest_Type, EmitType_Void) {
     auto* void_ = create<type::Void>();
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, void_, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -283,20 +283,20 @@
     EXPECT_EQ(out.str(), "void");
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitSampler) {
+TEST_F(GlslASTPrinterTest_Type, EmitSampler) {
     auto* sampler = create<type::Sampler>(type::SamplerKind::kSampler);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, sampler, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
 }
 
-TEST_F(GlslGeneratorImplTest_Type, EmitSamplerComparison) {
+TEST_F(GlslASTPrinterTest_Type, EmitSamplerComparison) {
     auto* sampler = create<type::Sampler>(type::SamplerKind::kComparisonSampler);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, sampler, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -329,14 +329,14 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(params.result));
 }
 INSTANTIATE_TEST_SUITE_P(
-    GlslGeneratorImplTest_Type,
+    GlslASTPrinterTest_Type,
     GlslDepthTexturesTest,
     testing::Values(
         GlslDepthTextureData{type::TextureDimension::k2d, "sampler2DShadow tex;"},
@@ -358,7 +358,7 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("sampler2DMS tex;"));
@@ -404,12 +404,12 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(params.result));
 }
-INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Type,
+INSTANTIATE_TEST_SUITE_P(GlslASTPrinterTest_Type,
                          GlslSampledTexturesTest,
                          testing::Values(
                              GlslSampledTextureData{
@@ -503,11 +503,11 @@
                                  "isamplerCubeArray tex;",
                              }));
 
-TEST_F(GlslGeneratorImplTest_Type, EmitMultisampledTexture) {
+TEST_F(GlslASTPrinterTest_Type, EmitMultisampledTexture) {
     auto* f32 = create<type::F32>();
     auto* s = create<type::MultisampledTexture>(type::TextureDimension::k2d, f32);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitType(out, s, builtin::AddressSpace::kUndefined, builtin::Access::kReadWrite, "");
@@ -541,13 +541,13 @@
              Stage(ast::PipelineStage::kFragment),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr(params.result));
 }
 INSTANTIATE_TEST_SUITE_P(
-    GlslGeneratorImplTest_Type,
+    GlslASTPrinterTest_Type,
     GlslStorageTexturesTest,
     testing::Values(GlslStorageTextureData{type::TextureDimension::k1d,
                                            builtin::TexelFormat::kRgba8Unorm, "image1D tex;"},
@@ -577,4 +577,4 @@
                                            builtin::TexelFormat::kRgba32Sint, "image1D tex;"}));
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_unary_op_test.cc b/src/tint/lang/glsl/writer/ast_printer/unary_op_test.cc
similarity index 89%
rename from src/tint/lang/glsl/ast_writer/generator_impl_unary_op_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/unary_op_test.cc
index 445d98b..f4507fc 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_unary_op_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/unary_op_test.cc
@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/utils/text/string_stream.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using GlslUnaryOpTest = TestHelper;
@@ -27,7 +27,7 @@
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kAddressOf, Expr("expr"));
     WrapInFunction(op);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, op);
@@ -40,7 +40,7 @@
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kComplement, Expr("expr"));
     WrapInFunction(op);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, op);
@@ -54,7 +54,7 @@
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kIndirection, Expr("expr"));
     WrapInFunction(p, op);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, op);
@@ -67,7 +67,7 @@
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kNot, Expr("expr"));
     WrapInFunction(op);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, op);
@@ -80,7 +80,7 @@
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kNegation, Expr("expr"));
     WrapInFunction(op);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, op);
@@ -92,7 +92,7 @@
     auto* op = Expr(i32(std::numeric_limits<int32_t>::min()));
     WrapInFunction(op);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
 
     utils::StringStream out;
     gen.EmitExpression(out, op);
@@ -101,4 +101,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_uniform_buffer_test.cc b/src/tint/lang/glsl/writer/ast_printer/uniform_buffer_test.cc
similarity index 79%
rename from src/tint/lang/glsl/ast_writer/generator_impl_uniform_buffer_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/uniform_buffer_test.cc
index 7b9271a..dd08b8c 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_uniform_buffer_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/uniform_buffer_test.cc
@@ -12,24 +12,24 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
 using ::testing::HasSubstr;
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using namespace tint::number_suffixes;  // NOLINT
 
-using GlslGeneratorImplTest_UniformBuffer = TestHelper;
+using GlslASTPrinterTest_UniformBuffer = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_UniformBuffer, Simple) {
+TEST_F(GlslASTPrinterTest_UniformBuffer, Simple) {
     auto* simple = Structure("Simple", utils::Vector{Member("member", ty.f32())});
     GlobalVar("simple", ty.Of(simple), builtin::AddressSpace::kUniform, Group(0_a), Binding(0_a));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -45,11 +45,11 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_UniformBuffer, Simple_Desktop) {
+TEST_F(GlslASTPrinterTest_UniformBuffer, Simple_Desktop) {
     auto* simple = Structure("Simple", utils::Vector{Member("member", ty.f32())});
     GlobalVar("simple", ty.Of(simple), builtin::AddressSpace::kUniform, Group(0_a), Binding(0_a));
 
-    GeneratorImpl& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
+    ASTPrinter& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 440
@@ -66,4 +66,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_variable_decl_statement_test.cc b/src/tint/lang/glsl/writer/ast_printer/variable_decl_statement_test.cc
similarity index 75%
rename from src/tint/lang/glsl/ast_writer/generator_impl_variable_decl_statement_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/variable_decl_statement_test.cc
index ce87f7c..3245378 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_variable_decl_statement_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/variable_decl_statement_test.cc
@@ -12,57 +12,57 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/variable_decl_statement.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 
 #include "gmock/gmock.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 using ::testing::HasSubstr;
 using namespace tint::builtin::fluent_types;  // NOLINT
 using namespace tint::number_suffixes;        // NOLINT
 
-using GlslGeneratorImplTest_VariableDecl = TestHelper;
+using GlslASTPrinterTest_VariableDecl = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement) {
     auto* var = Var("a", ty.f32());
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), "  float a = 0.0f;\n");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Let) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Let) {
     auto* var = Let("a", ty.f32(), Call<f32>());
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), "  float a = 0.0f;\n");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const) {
     auto* var = Const("a", ty.f32(), Call<f32>());
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), "");  // Not a mistake - 'const' is inlined
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_AInt) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_AInt) {
     auto* C = Const("C", Expr(1_a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -70,7 +70,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -82,7 +82,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_AFloat) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_AFloat) {
     auto* C = Const("C", Expr(1._a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -90,7 +90,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -102,7 +102,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_i32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_i32) {
     auto* C = Const("C", Expr(1_i));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -110,7 +110,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -122,7 +122,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_u32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_u32) {
     auto* C = Const("C", Expr(1_u));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -130,7 +130,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -142,7 +142,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_f32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_f32) {
     auto* C = Const("C", Expr(1_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -150,7 +150,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -162,7 +162,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_f16) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* C = Const("C", Expr(1_h));
@@ -172,7 +172,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -185,7 +185,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_AInt) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_AInt) {
     auto* C = Const("C", Call<vec3<Infer>>(1_a, 2_a, 3_a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -193,7 +193,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -205,7 +205,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_AFloat) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_AFloat) {
     auto* C = Const("C", Call<vec3<Infer>>(1._a, 2._a, 3._a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -213,7 +213,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -225,7 +225,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_f32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_f32) {
     auto* C = Const("C", Call<vec3<f32>>(1_f, 2_f, 3_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -233,7 +233,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -245,7 +245,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_f16) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_vec3_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* C = Const("C", Call<vec3<f16>>(1_h, 2_h, 3_h));
@@ -255,7 +255,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -268,7 +268,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_mat2x3_AFloat) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_mat2x3_AFloat) {
     auto* C = Const("C", Call<mat2x3<Infer>>(1._a, 2._a, 3._a, 4._a, 5._a, 6._a));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -276,7 +276,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -288,7 +288,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_mat2x3_f32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_mat2x3_f32) {
     auto* C = Const("C", Call<mat2x3<f32>>(1_f, 2_f, 3_f, 4_f, 5_f, 6_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -296,7 +296,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -308,7 +308,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_mat2x3_f16) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_mat2x3_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* C = Const("C", Call<mat2x3<f16>>(1_h, 2_h, 3_h, 4_h, 5_h, 6_h));
@@ -318,7 +318,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -331,7 +331,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_f32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_f32) {
     auto* C = Const("C", Call<array<f32, 3>>(1_f, 2_f, 3_f));
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -339,7 +339,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -351,7 +351,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_f32_zero) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_f32_zero) {
     auto* C = Const("C", Call<array<f32, 2>>());
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -359,7 +359,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -371,7 +371,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_arr_f32_zero) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_arr_f32_zero) {
     auto* C = Const("C", Call<array<array<f32, 2>, 3>>());
     Func("f", utils::Empty, ty.void_(),
          utils::Vector{
@@ -379,7 +379,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -391,7 +391,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_struct_zero) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_struct_zero) {
     Structure("S", utils::Vector{Member("a", ty.i32()), Member("b", ty.f32())});
     auto* C = Const("C", Call(ty.array(ty("S"), 2_i)));
     Func("f", utils::Empty, ty.void_(),
@@ -400,7 +400,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -417,7 +417,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_vec2_bool) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Const_arr_vec2_bool) {
     auto* C = Const("C", Call<array<vec2<bool>, 3>>(         //
                              Call<vec2<bool>>(true, false),  //
                              Call<vec2<bool>>(false, true),  //
@@ -428,7 +428,7 @@
              Decl(Let("l", Expr(C))),
          });
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(#version 310 es
@@ -440,12 +440,12 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Array) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Array) {
     auto* var = Var("a", ty.array<f32, 5>());
 
     WrapInFunction(var, Expr("a"));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
@@ -453,32 +453,32 @@
                 HasSubstr("  float a[5] = float[5](0.0f, 0.0f, 0.0f, 0.0f, 0.0f);\n"));
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Private) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Private) {
     GlobalVar("a", ty.f32(), builtin::AddressSpace::kPrivate);
 
     WrapInFunction(Expr("a"));
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.IncrementIndent();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("  float a = 0.0f;\n"));
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroVec_f32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroVec_f32) {
     auto* var = Var("a", ty.vec3<f32>(), Call<vec3<f32>>());
 
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(vec3 a = vec3(0.0f);
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroVec_f16) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroVec_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* var = Var("a", ty.vec3<f16>(), Call<vec3<f16>>());
@@ -486,20 +486,20 @@
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(), R"(f16vec3 a = f16vec3(0.0hf);
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroMat_f32) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroMat_f32) {
     auto* var = Var("a", ty.mat2x3<f32>(), Call<mat2x3<f32>>());
 
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(),
@@ -507,7 +507,7 @@
 )");
 }
 
-TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroMat_f16) {
+TEST_F(GlslASTPrinterTest_VariableDecl, Emit_VariableDeclStatement_Initializer_ZeroMat_f16) {
     Enable(builtin::Extension::kF16);
 
     auto* var = Var("a", ty.mat2x3<f16>(), Call<mat2x3<f16>>());
@@ -515,7 +515,7 @@
     auto* stmt = Decl(var);
     WrapInFunction(stmt);
 
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.EmitStatement(stmt);
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_EQ(gen.Result(),
@@ -524,4 +524,4 @@
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/generator_impl_workgroup_var_test.cc b/src/tint/lang/glsl/writer/ast_printer/workgroup_var_test.cc
similarity index 82%
rename from src/tint/lang/glsl/ast_writer/generator_impl_workgroup_var_test.cc
rename to src/tint/lang/glsl/writer/ast_printer/workgroup_var_test.cc
index eb95abb..7fb1c04 100644
--- a/src/tint/lang/glsl/ast_writer/generator_impl_workgroup_var_test.cc
+++ b/src/tint/lang/glsl/writer/ast_printer/workgroup_var_test.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/test_helper.h"
+#include "src/tint/lang/glsl/writer/ast_printer/test_helper.h"
 #include "src/tint/lang/wgsl/ast/id_attribute.h"
 #include "src/tint/lang/wgsl/ast/stage_attribute.h"
 
@@ -22,12 +22,12 @@
 
 using namespace tint::number_suffixes;  // NOLINT
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
-using GlslGeneratorImplTest_WorkgroupVar = TestHelper;
+using GlslASTPrinterTest_WorkgroupVar = TestHelper;
 
-TEST_F(GlslGeneratorImplTest_WorkgroupVar, Basic) {
+TEST_F(GlslASTPrinterTest_WorkgroupVar, Basic) {
     GlobalVar("wg", ty.f32(), builtin::AddressSpace::kWorkgroup);
 
     Func("main", utils::Empty, ty.void_(), utils::Vector{Assign("wg", 1.2_f)},
@@ -35,13 +35,13 @@
              Stage(ast::PipelineStage::kCompute),
              WorkgroupSize(1_i),
          });
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("shared float wg;\n"));
 }
 
-TEST_F(GlslGeneratorImplTest_WorkgroupVar, Aliased) {
+TEST_F(GlslASTPrinterTest_WorkgroupVar, Aliased) {
     auto* alias = Alias("F32", ty.f32());
 
     GlobalVar("wg", ty.Of(alias), builtin::AddressSpace::kWorkgroup);
@@ -51,11 +51,11 @@
              Stage(ast::PipelineStage::kCompute),
              WorkgroupSize(1_i),
          });
-    GeneratorImpl& gen = Build();
+    ASTPrinter& gen = Build();
     gen.Generate();
     EXPECT_THAT(gen.Diagnostics(), testing::IsEmpty());
     EXPECT_THAT(gen.Result(), HasSubstr("shared float wg;\n"));
 }
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/writer/options.cc b/src/tint/lang/glsl/writer/options.cc
new file mode 100644
index 0000000..2c96297
--- /dev/null
+++ b/src/tint/lang/glsl/writer/options.cc
@@ -0,0 +1,25 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/lang/glsl/writer/options.h"
+
+namespace tint::glsl::writer {
+
+Options::Options() = default;
+
+Options::~Options() = default;
+
+Options::Options(const Options&) = default;
+
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/ast_writer/options.h b/src/tint/lang/glsl/writer/options.h
similarity index 90%
rename from src/tint/lang/glsl/ast_writer/options.h
rename to src/tint/lang/glsl/writer/options.h
index c1de809..b5f56ea 100644
--- a/src/tint/lang/glsl/ast_writer/options.h
+++ b/src/tint/lang/glsl/writer/options.h
@@ -12,18 +12,18 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef SRC_TINT_LANG_GLSL_AST_WRITER_OPTIONS_H_
-#define SRC_TINT_LANG_GLSL_AST_WRITER_OPTIONS_H_
+#ifndef SRC_TINT_LANG_GLSL_WRITER_OPTIONS_H_
+#define SRC_TINT_LANG_GLSL_WRITER_OPTIONS_H_
 
 #include <string>
 #include <unordered_map>
 
 #include "src/tint/lang/core/builtin/access.h"
-#include "src/tint/lang/glsl/ast_writer/version.h"
+#include "src/tint/lang/glsl/writer/version.h"
 #include "src/tint/lang/wgsl/sem/sampler_texture_pair.h"
 #include "tint/external_texture_options.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 
 using BindingMap = std::unordered_map<sem::SamplerTexturePair, std::string>;
 
@@ -77,6 +77,6 @@
                  version);
 };
 
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
 
-#endif  // SRC_TINT_LANG_GLSL_AST_WRITER_OPTIONS_H_
+#endif  // SRC_TINT_LANG_GLSL_WRITER_OPTIONS_H_
diff --git a/src/tint/lang/glsl/writer/result.cc b/src/tint/lang/glsl/writer/result.cc
new file mode 100644
index 0000000..d891e40
--- /dev/null
+++ b/src/tint/lang/glsl/writer/result.cc
@@ -0,0 +1,25 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/lang/glsl/writer/result.h"
+
+namespace tint::glsl::writer {
+
+Result::Result() = default;
+
+Result::~Result() = default;
+
+Result::Result(const Result&) = default;
+
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/writer/result.h b/src/tint/lang/glsl/writer/result.h
new file mode 100644
index 0000000..043f664
--- /dev/null
+++ b/src/tint/lang/glsl/writer/result.h
@@ -0,0 +1,52 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_LANG_GLSL_WRITER_RESULT_H_
+#define SRC_TINT_LANG_GLSL_WRITER_RESULT_H_
+
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "src/tint/lang/wgsl/ast/pipeline_stage.h"
+
+namespace tint::glsl::writer {
+
+/// The result produced when generating GLSL.
+struct Result {
+    /// Constructor
+    Result();
+
+    /// Destructor
+    ~Result();
+
+    /// Copy constructor
+    Result(const Result&);
+
+    /// True if generation was successful.
+    bool success = false;
+
+    /// The errors generated during code generation, if any.
+    std::string error;
+
+    /// The generated GLSL.
+    std::string glsl = "";
+
+    /// The list of entry points in the generated GLSL.
+    std::vector<std::pair<std::string, ast::PipelineStage>> entry_points;
+};
+
+}  // namespace tint::glsl::writer
+
+#endif  // SRC_TINT_LANG_GLSL_WRITER_RESULT_H_
diff --git a/src/tint/lang/glsl/ast_writer/version.h b/src/tint/lang/glsl/writer/version.h
similarity index 87%
rename from src/tint/lang/glsl/ast_writer/version.h
rename to src/tint/lang/glsl/writer/version.h
index 01baa02..98a5f62 100644
--- a/src/tint/lang/glsl/ast_writer/version.h
+++ b/src/tint/lang/glsl/writer/version.h
@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef SRC_TINT_LANG_GLSL_AST_WRITER_VERSION_H_
-#define SRC_TINT_LANG_GLSL_AST_WRITER_VERSION_H_
+#ifndef SRC_TINT_LANG_GLSL_WRITER_VERSION_H_
+#define SRC_TINT_LANG_GLSL_WRITER_VERSION_H_
 
 #include <cstdint>
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 
 /// A structure representing the version of GLSL to be generated.
 struct Version {
@@ -53,6 +53,6 @@
     uint32_t minor_version = 1;
 };
 
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
 
-#endif  // SRC_TINT_LANG_GLSL_AST_WRITER_VERSION_H_
+#endif  // SRC_TINT_LANG_GLSL_WRITER_VERSION_H_
diff --git a/src/tint/lang/glsl/ast_writer/generator.cc b/src/tint/lang/glsl/writer/writer.cc
similarity index 78%
rename from src/tint/lang/glsl/ast_writer/generator.cc
rename to src/tint/lang/glsl/writer/writer.cc
index 7db15ba..634282b 100644
--- a/src/tint/lang/glsl/ast_writer/generator.cc
+++ b/src/tint/lang/glsl/writer/writer.cc
@@ -12,21 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/glsl/ast_writer/generator.h"
+#include "src/tint/lang/glsl/writer/writer.h"
 
-#include "src/tint/lang/glsl/ast_writer/generator_impl.h"
+#include <memory>
+
+#include "src/tint/lang/glsl/writer/ast_printer/ast_printer.h"
 #include "src/tint/lang/wgsl/ast/transform/binding_remapper.h"
 #include "src/tint/lang/wgsl/ast/transform/combine_samplers.h"
 
-namespace tint::writer::glsl {
-
-Options::Options() = default;
-Options::~Options() = default;
-Options::Options(const Options&) = default;
-
-Result::Result() = default;
-Result::~Result() = default;
-Result::Result(const Result&) = default;
+namespace tint::glsl::writer {
 
 Result Generate(const Program* program, const Options& options, const std::string& entry_point) {
     Result result;
@@ -44,7 +38,7 @@
     }
 
     // Generate the GLSL code.
-    auto impl = std::make_unique<GeneratorImpl>(&sanitized_result.program, options.version);
+    auto impl = std::make_unique<ASTPrinter>(&sanitized_result.program, options.version);
     impl->Generate();
     result.success = impl->Diagnostics().empty();
     result.error = impl->Diagnostics().str();
@@ -61,4 +55,4 @@
     return result;
 }
 
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/writer/writer.h b/src/tint/lang/glsl/writer/writer.h
new file mode 100644
index 0000000..25851dc
--- /dev/null
+++ b/src/tint/lang/glsl/writer/writer.h
@@ -0,0 +1,41 @@
+// Copyright 2021 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_LANG_GLSL_WRITER_WRITER_H_
+#define SRC_TINT_LANG_GLSL_WRITER_WRITER_H_
+
+#include <string>
+
+#include "src/tint/lang/glsl/writer/options.h"
+#include "src/tint/lang/glsl/writer/result.h"
+
+// Forward declarations
+namespace tint {
+class Program;
+}  // namespace tint
+
+namespace tint::glsl::writer {
+
+/// Generate GLSL for a program, according to a set of configuration options.
+/// The result will contain the GLSL, as well as success status and diagnostic
+/// information.
+/// @param program the program to translate to GLSL
+/// @param options the configuration options to use when generating GLSL
+/// @param entry_point the entry point to generate GLSL for
+/// @returns the resulting GLSL and supplementary information
+Result Generate(const Program* program, const Options& options, const std::string& entry_point);
+
+}  // namespace tint::glsl::writer
+
+#endif  // SRC_TINT_LANG_GLSL_WRITER_WRITER_H_
diff --git a/src/tint/lang/glsl/ast_writer/generator_bench.cc b/src/tint/lang/glsl/writer/writer_bench.cc
similarity index 95%
rename from src/tint/lang/glsl/ast_writer/generator_bench.cc
rename to src/tint/lang/glsl/writer/writer_bench.cc
index 43345fb..270e27f 100644
--- a/src/tint/lang/glsl/ast_writer/generator_bench.cc
+++ b/src/tint/lang/glsl/writer/writer_bench.cc
@@ -18,7 +18,7 @@
 #include "src/tint/lang/wgsl/ast/identifier.h"
 #include "src/tint/lang/wgsl/ast/module.h"
 
-namespace tint::writer::glsl {
+namespace tint::glsl::writer {
 namespace {
 
 void GenerateGLSL(benchmark::State& state, std::string input_name) {
@@ -48,4 +48,4 @@
 TINT_BENCHMARK_PROGRAMS(GenerateGLSL);
 
 }  // namespace
-}  // namespace tint::writer::glsl
+}  // namespace tint::glsl::writer
