#include <eepp/ui/doc/languages/x86assembly.hpp>
#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>

namespace EE { namespace UI { namespace Doc { namespace Language {

void addHLSL() {

	auto& sd = SyntaxDefinitionManager::instance()->add(

		{ "HLSL",
		  {
			  "%.hlsl$",
		  },
		  {
			  { { "//.-\n" }, "comment" },
			  { { "/%*", "%*/" }, "comment" },
			  { { "#", "\n" }, "comment" },
			  { { "\"", "\"", "\\" }, "string" },
			  { { "'", "'", "\\" }, "string" },
			  { { "-?0x%x+" }, "number" },
			  { { "-?%d+[%d%.eE]*f?" }, "number" },
			  { { "-?%.?%d+f?" }, "number" },
			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
			  { { "int[1-9]x[1-9]" }, "keyword2" },
			  { { "int1[0-6]x[1-9]" }, "keyword2" },
			  { { "int[1-9]x1[0-6]" }, "keyword2" },
			  { { "int1[0-6]x1[0-6]" }, "keyword2" },
			  { { "int[1-4]" }, "keyword2" },
			  { { "uint[1-9]x[1-9]" }, "keyword2" },
			  { { "uint1[0-6]x[1-9]" }, "keyword2" },
			  { { "uint[1-9]x1[0-6]" }, "keyword2" },
			  { { "uint1[0-6]x1[0-6]" }, "keyword2" },
			  { { "uint[1-4]" }, "keyword2" },
			  { { "dword[1-9]x[1-9]" }, "keyword2" },
			  { { "dword1[0-6]x[1-9]" }, "keyword2" },
			  { { "dword[1-9]x1[0-6]" }, "keyword2" },
			  { { "dword1[0-6]x1[0-6]" }, "keyword2" },
			  { { "dword[1-4]" }, "keyword2" },
			  { { "half[1-9]x[1-9]" }, "keyword2" },
			  { { "half1[0-6]x[1-9]" }, "keyword2" },
			  { { "half[1-9]x1[0-6]" }, "keyword2" },
			  { { "half1[0-6]x1[0-6]" }, "keyword2" },
			  { { "half[1-4]" }, "keyword2" },
			  { { "float[1-9]x[1-9]" }, "keyword2" },
			  { { "float1[0-6]x[1-9]" }, "keyword2" },
			  { { "float[1-9]x1[0-6]" }, "keyword2" },
			  { { "float1[0-6]x1[0-6]" }, "keyword2" },
			  { { "float[1-4]" }, "keyword2" },
			  { { "double[1-9]x[1-9]" }, "keyword2" },
			  { { "double1[0-6]x[1-9]" }, "keyword2" },
			  { { "double[1-9]x1[0-6]" }, "keyword2" },
			  { { "double1[0-6]x1[0-6]" }, "keyword2" },
			  { { "double[1-4]" }, "keyword2" },
			  { { "[%a_][%w_]*%f[(]" }, "function" },
			  { { "[%a_][%w_]*" }, "symbol" },
		  },
		  {
			  { "AppendStructuredBuffer", "keyword" },
			  { "asm", "keyword" },
			  { "asm_fragment", "keyword" },
			  { "BlendState", "keyword2" },
			  { "bool", "keyword2" },
			  { "break", "keyword" },
			  { "Buffer", "keyword2" },
			  { "ByteAddressBuffer", "keyword2" },
			  { "case", "keyword" },
			  { "cbuffer", "keyword2" },
			  { "centroid", "keyword2" },
			  { "class", "keyword" },
			  { "column_major", "keyword" },
			  { "compile", "keyword" },
			  { "compile_fragment", "keyword" },
			  { "CompileShader", "keyword" },
			  { "const", "keyword" },
			  { "continue", "keyword" },
			  { "ComputeShader", "keyword" },
			  { "ConsumeStructuredBuffer", "keyword" },
			  { "default", "keyword" },
			  { "DepthStencilState", "keyword" },
			  { "DepthStencilView", "keyword" },
			  { "discard", "keyword" },
			  { "do", "keyword" },
			  { "double", "keyword2" },
			  { "DomainShader", "keyword2" },
			  { "dword", "keyword2" },
			  { "else", "keyword" },
			  { "export", "keyword" },
			  { "extern", "keyword" },
			  { "false", "literal" },
			  { "float", "keyword2" },
			  { "for", "keyword" },
			  { "fxgroup", "keyword2" },
			  { "GeometryShader", "keyword2" },
			  { "groupshared", "keyword" },
			  { "half", "keyword2" },
			  { "HullShader", "keyword2" },
			  { "if", "keyword" },
			  { "in", "keyword" },
			  { "inline", "keyword" },
			  { "inout", "keyword" },
			  { "InputPatch", "keyword2" },
			  { "int", "keyword2" },
			  { "interface", "keyword" },
			  { "line", "keyword2" },
			  { "lineadj", "keyword2" },
			  { "linear", "keyword" },
			  { "LineStream", "keyword2" },
			  { "matrix", "keyword2" },
			  { "min16float", "keyword2" },
			  { "min10float", "keyword2" },
			  { "min16int", "keyword2" },
			  { "min12int", "keyword2" },
			  { "min16uint", "keyword2" },
			  { "namespace", "keyword" },
			  { "nointerpolation", "keyword" },
			  { "noperspective", "keyword" },
			  { "NULL", "literal" },
			  { "out", "keyword" },
			  { "OutputPatch", "keyword2" },
			  { "packoffset", "keyword" },
			  { "pass", "keyword" },
			  { "pixelfragment", "keyword" },
			  { "PixelShader", "keyword2" },
			  { "point", "keyword2" },
			  { "PointStream", "keyword2" },
			  { "precise", "keyword" },
			  { "RasterizerState", "keyword2" },
			  { "RenderTargetView", "keyword2" },
			  { "return", "keyword" },
			  { "register", "keyword" },
			  { "row_major", "keyword" },
			  { "RWBuffer", "keyword2" },
			  { "RWByteAddressBuffer", "keyword2" },
			  { "RWStructuredBuffer", "keyword2" },
			  { "RWTexture1D", "keyword2" },
			  { "RWTexture1DArray", "keyword2" },
			  { "RWTexture2D", "keyword2" },
			  { "RWTexture2DArray", "keyword2" },
			  { "RWTexture3D", "keyword2" },
			  { "sample", "keyword" },
			  { "sampler", "keyword2" },
			  { "SamplerState", "keyword2" },
			  { "SamplerComparisonState", "keyword2" },
			  { "shared", "keyword" },
			  { "snorm", "keyword" },
			  { "stateblock", "keyword" },
			  { "stateblock_state", "keyword" },
			  { "static", "keyword" },
			  { "string", "keyword2" },
			  { "struct", "keyword" },
			  { "switch", "keyword" },
			  { "StructuredBuffer", "keyword2" },
			  { "tbuffer", "keyword2" },
			  { "technique", "keyword2" },
			  { "technique10", "keyword2" },
			  { "technique11", "keyword2" },
			  { "texture", "keyword2" },
			  { "Texture1D", "keyword2" },
			  { "Texture1DArray", "keyword2" },
			  { "Texture2D", "keyword2" },
			  { "Texture2DArray", "keyword2" },
			  { "Texture2DMS", "keyword2" },
			  { "Texture2DMSArray", "keyword2" },
			  { "Texture3D", "keyword2" },
			  { "TextureCube", "keyword2" },
			  { "TextureCubeArray", "keyword2" },
			  { "true", "literal" },
			  { "typedef", "keyword" },
			  { "triangle", "keyword2" },
			  { "triangleadj", "keyword2" },
			  { "TriangleStream", "keyword2" },
			  { "uint", "keyword2" },
			  { "uniform", "keyword" },
			  { "unorm", "keyword" },
			  { "unsigned", "keyword" },
			  { "vector", "keyword2" },
			  { "vertexfragment", "keyword2" },
			  { "VertexShader", "keyword2" },
			  { "void", "keyword" },
			  { "volatile", "keyword" },
			  { "while", "keyword" },
			  { "abort", "keyword" },
			  { "abs", "keyword" },
			  { "acos", "keyword" },
			  { "all", "keyword" },
			  { "any", "keyword" },
			  { "asdouble", "keyword" },
			  { "asfloat", "keyword" },
			  { "asin", "keyword" },
			  { "asint", "keyword" },
			  { "asuint", "keyword" },
			  { "atan", "keyword" },
			  { "atan2", "keyword" },
			  { "ceil", "keyword" },
			  { "clamp", "keyword" },
			  { "clip", "keyword" },
			  { "cos", "keyword" },
			  { "cosh", "keyword" },
			  { "countbits", "keyword" },
			  { "cross", "keyword" },
			  { "ddx", "keyword" },
			  { "ddx_coarse", "keyword" },
			  { "ddx_fine", "keyword" },
			  { "ddy", "keyword" },
			  { "ddy_coarse", "keyword" },
			  { "ddy_fine", "keyword" },
			  { "degrees", "keyword" },
			  { "determinant", "keyword" },
			  { "distance", "keyword" },
			  { "dot", "keyword" },
			  { "dst", "keyword" },
			  { "errorf", "keyword" },
			  { "exp", "keyword" },
			  { "exp2", "keyword" },
			  { "f16tof32", "keyword" },
			  { "f32tof16", "keyword" },
			  { "faceforward", "keyword" },
			  { "firstbithigh", "keyword" },
			  { "firstbitlow", "keyword" },
			  { "floor", "keyword" },
			  { "fma", "keyword" },
			  { "fmod", "keyword" },
			  { "frac", "keyword" },
			  { "frexp", "keyword" },
			  { "fwidth", "keyword" },
			  { "isfinite", "keyword" },
			  { "isinf", "keyword" },
			  { "isnan", "keyword" },
			  { "ldexp", "keyword" },
			  { "length", "keyword" },
			  { "lerp", "keyword" },
			  { "lit", "keyword" },
			  { "log", "keyword" },
			  { "log10", "keyword" },
			  { "log2", "keyword" },
			  { "mad", "keyword" },
			  { "max", "keyword" },
			  { "min", "keyword" },
			  { "modf", "keyword" },
			  { "msad4", "keyword" },
			  { "mul", "keyword" },
			  { "noise", "keyword" },
			  { "normalize", "keyword" },
			  { "pow", "keyword" },
			  { "printf", "keyword" },
			  { "radians", "keyword" },
			  { "rcp", "keyword" },
			  { "reflect", "keyword" },
			  { "refract", "keyword" },
			  { "reversebits", "keyword" },
			  { "round", "keyword" },
			  { "rsqrt", "keyword" },
			  { "saturate", "keyword" },
			  { "sign", "keyword" },
			  { "sin", "keyword" },
			  { "sincos", "keyword" },
			  { "sinh", "keyword" },
			  { "smoothstep", "keyword" },
			  { "sqrt", "keyword" },
			  { "step", "keyword" },
			  { "tan", "keyword" },
			  { "tanh", "keyword" },
			  { "transpose", "keyword" },
			  { "trunc", "keyword" },
		  },
		  "//" } );

	sd.setFoldRangeType( FoldRangeType::Braces ).setFoldBraces( { { '{', '}' } } );
}

}}}} // namespace EE::UI::Doc::Language
