yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
eaa8dcfcc
master
1#pragma once 2 3#include "diagnostics.h" 4 5namespace CppParse 6{ 7using namespace Slang ; 8 9// A macro to define a single indent as a string 10#define CPP_EXTRACT_INDENT_STRING " " 11 12struct FileUtil 13{ 14/// Read text into outRead. Any failures written to sink (can be passed as nullptr, for no 15/// output) 16static SlangResult readAllText ( 17const Slang ::String & fileName , 18DiagnosticSink * sink , 19String & outRead ); 20/// Write text to filename. Any failures written to sink. (can be passed as nullptr, for no 21/// output) 22static SlangResult writeAllText ( 23const Slang ::String & fileName , 24DiagnosticSink * sink , 25const UnownedStringSlice & text ); 26 27/// Appends CPP_EXTRACT_INDENT_STRING indentCount number of times to out 28static void indent (Index indentCount ,StringBuilder & out ); 29}; 30 31}// namespace CppParse