yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1// 2 3// The file is meant to be included multiple times, to produce different 4// pieces of declaration/definition code related to diagnostic messages 5// 6// Each diagnostic is declared here with: 7// 8// DIAGNOSTIC(id, severity, name, messageFormat) 9// 10// Where `id` is the unique diagnostic ID, `severity` is the default 11// severity (from the `Severity` enum), `name` is a name used to refer 12// to this diagnostic from code, and `messageFormat` is the default 13// (non-localized) message for the diagnostic, with placeholders 14// for any arguments. 15 16#ifndef DIAGNOSTIC 17#error Need to #define DIAGNOSTIC(...) before including 18#define DIAGNOSTIC (id ,severity ,name ,messageFormat )/* */ 19#endif 20 21// 22// -1 - Notes that decorate another diagnostic. 23// 24 25DIAGNOSTIC (-1 ,Note ,seeTokenPasteLocation ,"see token pasted location" ) 26 27DIAGNOSTIC ( 28100000 , 29Error , 30downstreamNameNotKnown , 31"downstream tool name not known, allowed names are $0" ) 32DIAGNOSTIC ( 33100001 , 34Error , 35expectedArgumentForOption , 36"expected an argument for command-line option '$0'" ) 37DIAGNOSTIC (100002 ,Error ,unbalancedDownstreamArguments ,"unbalanced downstream arguments" ) 38DIAGNOSTIC ( 39100003 , 40Error , 41closeOfUnopenDownstreamArgs , 42"close of an unopen downstream argument scope" ) 43DIAGNOSTIC (100004 ,Error ,downstreamToolNameNotDefined ,"downstream tool name not defined" ) 44DIAGNOSTIC ( 45100005 , 46Error , 47invalidArgumentForOption , 48"invalid argument format for command-line option '$0'" ) 49 50DIAGNOSTIC ( 5199999 , 52Note , 53noteLocationOfInternalError , 54"an internal error threw an exception while working on code near this location" ) 55 56DIAGNOSTIC ( 5729104 , 58Error , 59spirvCoreGrammarJSONParseFailure , 60"unexpected JSON in spirv core grammar file: $0" ) 61 62#undef DIAGNOSTIC