yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1#ifndef SLANG_COMPILER_CORE_JSON_SOURCE_MAP_UTIL_H 2#define SLANG_COMPILER_CORE_JSON_SOURCE_MAP_UTIL_H 3 4#include "slang-json-value.h" 5#include "slang-source-map.h" 6 7namespace Slang 8{ 9 10struct JSONSourceMapUtil 11{ 12/// Decode from root into the source map 13static SlangResult decode ( 14JSONContainer * container , 15JSONValue root , 16DiagnosticSink * sink , 17SourceMap & out ); 18 19/// Converts the source map contents into JSON 20static SlangResult encode ( 21const SourceMap & sourceMap , 22JSONContainer * container , 23DiagnosticSink * sink , 24JSONValue & outValue ); 25 26/// Read the blob (encoded as JSON) as a source map. 27/// Sink is optional, and can be passed as nullptr 28static SlangResult read (ISlangBlob * blob ,DiagnosticSink * sink ,SourceMap & outSourceMap ); 29static SlangResult read (ISlangBlob * blob ,SourceMap & outSourceMap ); 30 31/// Write source map to outBlob JSON 32static SlangResult write (const SourceMap & sourceMap ,ComPtr < ISlangBlob >& outBlob ); 33/// Write out the source map into a blob 34static SlangResult write ( 35const SourceMap & sourceMap , 36DiagnosticSink * sink , 37ComPtr < ISlangBlob >& outBlob ); 38}; 39 40}// namespace Slang 41 42#endif // SLANG_COMPILER_CORE_JSON_SOURCE_MAP_UTIL_H