yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1// slang-json-diagnostics.cpp 2#include "slang-json-diagnostics.h" 3 4namespace Slang 5{ 6 7namespace JSONDiagnostics 8{ 9#define DIAGNOSTIC (id ,severity ,name ,messageFormat ) \ 10 const DiagnosticInfo name = {id, Severity::severity, #name, messageFormat}; 11#include "slang-json-diagnostic-defs.h" 12#undef DIAGNOSTIC 13}// namespace JSONDiagnostics 14 15static const DiagnosticInfo * const kJSONDiagnostics []= { 16#define DIAGNOSTIC (id ,severity ,name ,messageFormat )& JSONDiagnostics ::name , 17#include "slang-json-diagnostic-defs.h" 18#undef DIAGNOSTIC 19}; 20 21static DiagnosticsLookup * _newJSONDiagnosticsLookup () 22{ 23auto lookup = new DiagnosticsLookup ; 24lookup -> add (kJSONDiagnostics ,SLANG_COUNT_OF (kJSONDiagnostics )); 25return lookup ; 26} 27 28DiagnosticsLookup * getJSONDiagnosticsLookup () 29{ 30static RefPtr < DiagnosticsLookup > s_lookup = _newJSONDiagnosticsLookup (); 31return s_lookup ; 32} 33 34}// namespace Slang