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 25// 26// 2xxxx - JSON Lexical analysis 27// 28 29DIAGNOSTIC (20000 ,Error ,unexpectedCharacter ,"unexpected character '$0'" ) 30DIAGNOSTIC (20001 ,Error ,endOfFileInLiteral ,"end of file in literal" ) 31DIAGNOSTIC (20002 ,Error ,newlineInLiteral ,"newline in literal" ) 32DIAGNOSTIC (20003 ,Error ,endOfFileInComment ,"end of file in comment" ) 33DIAGNOSTIC (20004 ,Error ,expectingAHexDigit ,"expecting a hex digit" ) 34DIAGNOSTIC (20005 ,Error ,expectingADigit ,"expecting a digit" ) 35DIAGNOSTIC (20006 ,Error ,expectingValueName ,"expecting value name [null, true, false]" ) 36DIAGNOSTIC (20007 ,Error ,unexpectedTokenExpectedTokenType ,"unexpected '$0', expected '$1'" ) 37DIAGNOSTIC (20008 ,Error ,unexpectedToken ,"unexpected '$0'" ) 38 39DIAGNOSTIC (20009 ,Error ,unableToConvertField ,"unable to convert field '$0' in type '$1'" ) 40DIAGNOSTIC (20010 ,Error ,fieldNotFound ,"field '$0' not found in type '$1'" ) 41DIAGNOSTIC (20011 ,Error ,fieldNotDefinedOnType ,"field '$0' not defined on type '$1'" ) 42DIAGNOSTIC (20011 ,Error ,fieldRequiredOnType ,"field '$0' required on '$1'" ) 43DIAGNOSTIC ( 4420012 , 45Error , 46tooManyElementsForArray , 47"too many elements ($0) for array array. Max allowed is $1" ) 48 49// 50// 3xxxx JSON-RPC 51// 52 53DIAGNOSTIC (30000 ,Error ,argsAreInvalid ,"Args for '%0' are invalid" ) 54 55 56#undef DIAGNOSTIC