#include "src/tint/lang/wgsl/writer/syntax_tree_printer/syntax_tree_printer.h"
#include "src/tint/lang/core/texel_format.h"
#include "src/tint/lang/wgsl/ast/alias.h"
#include "src/tint/lang/wgsl/ast/assignment_statement.h"
#include "src/tint/lang/wgsl/ast/binary_expression.h"
#include "src/tint/lang/wgsl/ast/blend_src_attribute.h"
#include "src/tint/lang/wgsl/ast/bool_literal_expression.h"
#include "src/tint/lang/wgsl/ast/break_if_statement.h"
#include "src/tint/lang/wgsl/ast/break_statement.h"
#include "src/tint/lang/wgsl/ast/call_expression.h"
#include "src/tint/lang/wgsl/ast/call_statement.h"
#include "src/tint/lang/wgsl/ast/compound_assignment_statement.h"
#include "src/tint/lang/wgsl/ast/const.h"
#include "src/tint/lang/wgsl/ast/continue_statement.h"
#include "src/tint/lang/wgsl/ast/diagnostic_attribute.h"
#include "src/tint/lang/wgsl/ast/diagnostic_rule_name.h"
#include "src/tint/lang/wgsl/ast/discard_statement.h"
#include "src/tint/lang/wgsl/ast/float_literal_expression.h"
#include "src/tint/lang/wgsl/ast/for_loop_statement.h"
#include "src/tint/lang/wgsl/ast/id_attribute.h"
#include "src/tint/lang/wgsl/ast/identifier.h"
#include "src/tint/lang/wgsl/ast/identifier_expression.h"
#include "src/tint/lang/wgsl/ast/if_statement.h"
#include "src/tint/lang/wgsl/ast/increment_decrement_statement.h"
#include "src/tint/lang/wgsl/ast/index_accessor_expression.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
#include "src/tint/lang/wgsl/ast/internal_attribute.h"
#include "src/tint/lang/wgsl/ast/interpolate_attribute.h"
#include "src/tint/lang/wgsl/ast/invariant_attribute.h"
#include "src/tint/lang/wgsl/ast/let.h"
#include "src/tint/lang/wgsl/ast/loop_statement.h"
#include "src/tint/lang/wgsl/ast/member_accessor_expression.h"
#include "src/tint/lang/wgsl/ast/module.h"
#include "src/tint/lang/wgsl/ast/must_use_attribute.h"
#include "src/tint/lang/wgsl/ast/override.h"
#include "src/tint/lang/wgsl/ast/phony_expression.h"
#include "src/tint/lang/wgsl/ast/return_statement.h"
#include "src/tint/lang/wgsl/ast/stage_attribute.h"
#include "src/tint/lang/wgsl/ast/stride_attribute.h"
#include "src/tint/lang/wgsl/ast/struct_member_align_attribute.h"
#include "src/tint/lang/wgsl/ast/struct_member_offset_attribute.h"
#include "src/tint/lang/wgsl/ast/struct_member_size_attribute.h"
#include "src/tint/lang/wgsl/ast/switch_statement.h"
#include "src/tint/lang/wgsl/ast/templated_identifier.h"
#include "src/tint/lang/wgsl/ast/unary_op_expression.h"
#include "src/tint/lang/wgsl/ast/var.h"
#include "src/tint/lang/wgsl/ast/variable_decl_statement.h"
#include "src/tint/lang/wgsl/ast/while_statement.h"
#include "src/tint/lang/wgsl/ast/workgroup_attribute.h"
#include "src/tint/lang/wgsl/sem/struct.h"
#include "src/tint/lang/wgsl/sem/switch_statement.h"
#include "src/tint/utils/macros/scoped_assignment.h"
#include "src/tint/utils/rtti/switch.h"
#include "src/tint/utils/strconv/float_to_string.h"
#include "src/tint/utils/text/string.h"
namespace tint::wgsl::writer {
SyntaxTreePrinter::SyntaxTreePrinter(const Program& program) : … { … }
SyntaxTreePrinter::~SyntaxTreePrinter() = default;
bool SyntaxTreePrinter::Generate() { … }
void SyntaxTreePrinter::EmitDiagnosticControl(const ast::DiagnosticControl& diagnostic) { … }
void SyntaxTreePrinter::EmitEnable(const ast::Enable* enable) { … }
void SyntaxTreePrinter::EmitTypeDecl(const ast::TypeDecl* ty) { … }
void SyntaxTreePrinter::EmitExpression(const ast::Expression* expr) { … }
void SyntaxTreePrinter::EmitIndexAccessor(const ast::IndexAccessorExpression* expr) { … }
void SyntaxTreePrinter::EmitMemberAccessor(const ast::MemberAccessorExpression* expr) { … }
void SyntaxTreePrinter::EmitCall(const ast::CallExpression* expr) { … }
void SyntaxTreePrinter::EmitLiteral(const ast::LiteralExpression* lit) { … }
void SyntaxTreePrinter::EmitIdentifier(const ast::IdentifierExpression* expr) { … }
void SyntaxTreePrinter::EmitIdentifier(const ast::Identifier* ident) { … }
void SyntaxTreePrinter::EmitFunction(const ast::Function* func) { … }
void SyntaxTreePrinter::EmitImageFormat(const core::TexelFormat fmt) { … }
void SyntaxTreePrinter::EmitStructType(const ast::Struct* str) { … }
void SyntaxTreePrinter::EmitVariable(const ast::Variable* v) { … }
void SyntaxTreePrinter::EmitAttributes(VectorRef<const ast::Attribute*> attrs) { … }
void SyntaxTreePrinter::EmitBinary(const ast::BinaryExpression* expr) { … }
void SyntaxTreePrinter::EmitBinaryOp(const core::BinaryOp op) { … }
void SyntaxTreePrinter::EmitUnaryOp(const ast::UnaryOpExpression* expr) { … }
void SyntaxTreePrinter::EmitBlock(const ast::BlockStatement* stmt) { … }
void SyntaxTreePrinter::EmitBlockHeader(const ast::BlockStatement* stmt) { … }
void SyntaxTreePrinter::EmitStatement(const ast::Statement* stmt) { … }
void SyntaxTreePrinter::EmitStatements(VectorRef<const ast::Statement*> stmts) { … }
void SyntaxTreePrinter::EmitStatementsWithIndent(VectorRef<const ast::Statement*> stmts) { … }
void SyntaxTreePrinter::EmitAssign(const ast::AssignmentStatement* stmt) { … }
void SyntaxTreePrinter::EmitBreak(const ast::BreakStatement*) { … }
void SyntaxTreePrinter::EmitBreakIf(const ast::BreakIfStatement* b) { … }
void SyntaxTreePrinter::EmitCase(const ast::CaseStatement* stmt) { … }
void SyntaxTreePrinter::EmitCompoundAssign(const ast::CompoundAssignmentStatement* stmt) { … }
void SyntaxTreePrinter::EmitContinue(const ast::ContinueStatement*) { … }
void SyntaxTreePrinter::EmitIf(const ast::IfStatement* stmt) { … }
void SyntaxTreePrinter::EmitIncrementDecrement(const ast::IncrementDecrementStatement* stmt) { … }
void SyntaxTreePrinter::EmitDiscard(const ast::DiscardStatement*) { … }
void SyntaxTreePrinter::EmitLoop(const ast::LoopStatement* stmt) { … }
void SyntaxTreePrinter::EmitForLoop(const ast::ForLoopStatement* stmt) { … }
void SyntaxTreePrinter::EmitWhile(const ast::WhileStatement* stmt) { … }
void SyntaxTreePrinter::EmitReturn(const ast::ReturnStatement* stmt) { … }
void SyntaxTreePrinter::EmitConstAssert(const ast::ConstAssert* stmt) { … }
void SyntaxTreePrinter::EmitSwitch(const ast::SwitchStatement* stmt) { … }
}