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

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

void addSwift() {

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

		{ "Swift",
		  { "%.swift$" },
		  {
			  { { "//.-\n" }, "comment" },
			  { { "/%*", "%*/" }, "comment" },
			  { { "\"\"\"", "\"\"\"" }, "string" },
			  { { "\"", "\"", "\\" }, "string" },
			  { { "-?0x%x+" }, "number" },
			  { { "-?%d+[%d%.eE]*f?" }, "number" },
			  { { "-?%.?%d+f?" }, "number" },
			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
			  { { "[%a_][%w_]*%f[(]" }, "function" },
			  { { "[%a_][%w_]*[?!]?" }, "symbol" },

		  },
		  {
			  { "encodeBitsAsWords", "keyword2" },
			  { "postfix", "keyword" },
			  { "open", "keyword" },
			  { "debugPrintln", "keyword2" },
			  { "debugPrint", "keyword2" },
			  { "convenience", "keyword" },
			  { "count", "keyword2" },
			  { "contains", "keyword2" },
			  { "#imageLiteral", "keyword" },
			  { "enumerate", "keyword2" },
			  { "c", "keyword2" },
			  { "bridgeToObjectiveCUnconditional", "keyword2" },
			  { "try?", "keyword" },
			  { "assertionFailure", "keyword2" },
			  { "withUnsafePointers", "keyword2" },
			  { "Void", "keyword2" },
			  { "assert", "keyword2" },
			  { "in", "keyword" },
			  { "anyGenerator", "keyword2" },
			  { "fatalError", "keyword2" },
			  { "alignofValue", "keyword2" },
			  { "bridgeToObjectiveC", "keyword2" },
			  { "alignof", "keyword2" },
			  { "willSet", "keyword" },
			  { "where", "keyword" },
			  { "weak", "keyword" },
			  { "typealias", "keyword" },
			  { "isBridgedToObjectiveC", "keyword2" },
			  { "isUniquelyReferenced", "keyword2" },
			  { "underestimateCount", "keyword2" },
			  { "try!", "keyword" },
			  { "as!", "keyword" },
			  { "none", "keyword" },
			  { "maxElement", "keyword2" },
			  { "throws", "keyword" },
			  { "associatedtype", "keyword" },
			  { "throw", "keyword" },
			  { "lazy", "keyword" },
			  { "switch", "keyword" },
			  { "super", "keyword" },
			  { "struct", "keyword" },
			  { "static", "keyword" },
			  { "unsafeReflect", "keyword2" },
			  { "dropLast", "keyword2" },
			  { "Self", "keyword" },
			  { "fallthrough", "keyword" },
			  { "unowned", "keyword" },
			  { "__FILE__", "keyword" },
			  { "right", "keyword" },
			  { "required", "keyword" },
			  { "nonmutating", "keyword" },
			  { "try", "keyword" },
			  { "withExtendedLifetime", "keyword2" },
			  { "public", "keyword" },
			  { "final", "keyword" },
			  { "Protocol", "keyword" },
			  { "guard", "keyword" },
			  { "operator", "keyword" },
			  { "let", "keyword" },
			  { "extension", "keyword" },
			  { "posix", "keyword2" },
			  { "precedence", "keyword" },
			  { "case", "keyword" },
			  { "left", "keyword" },
			  { "filter", "keyword2" },
			  { "min", "keyword2" },
			  { "countElements", "keyword2" },
			  { "unsafeBitCast", "keyword2" },
			  { "do", "keyword" },
			  { "max", "keyword2" },
			  { "dynamicType", "keyword" },
			  { "reverse", "keyword2" },
			  { "while", "keyword" },
			  { "init", "keyword" },
			  { "func", "keyword" },
			  { "abs", "keyword2" },
			  { "sizeof", "keyword2" },
			  { "true", "keyword" },
			  { "default", "keyword" },
			  { "dynamic", "keyword" },
			  { "var", "keyword" },
			  { "#sourceLocation", "keyword" },
			  { "indices", "keyword2" },
			  { "isUniquelyReferencedNonObjC", "keyword2" },
			  { "getBridgedObjectiveCType", "keyword2" },
			  { "precondition", "keyword2" },
			  { "getVaList", "keyword2" },
			  { "get", "keyword" },
			  { "Double", "keyword2" },
			  { "join", "keyword2" },
			  { "startsWith", "keyword2" },
			  { "Bool", "keyword2" },
			  { "associativity", "keyword" },
			  { "self", "keyword" },
			  { "prefix", "keyword" },
			  { "sort", "keyword2" },
			  { "lexicographicalCompare", "keyword2" },
			  { "insertionSort", "keyword2" },
			  { "__LINE__", "keyword" },
			  { "Array", "keyword2" },
			  { "stride", "keyword2" },
			  { "unsafeDowncast", "keyword2" },
			  { "strideof", "keyword2" },
			  { "continue", "keyword" },
			  { "sizeofValue", "keyword2" },
			  { "swap", "keyword2" },
			  { "withUnsafeMutablePointer", "keyword2" },
			  { "Type", "keyword" },
			  { "find", "keyword2" },
			  { "zip", "keyword2" },
			  { "preconditionFailure", "keyword2" },
			  { "enum", "keyword" },
			  { "withObjectAtPlusZero", "keyword2" },
			  { "strideofValue", "keyword2" },
			  { "transcode", "keyword2" },
			  { "withUnsafePointerToObject", "keyword2" },
			  { "overlaps", "keyword2" },
			  { "split", "keyword2" },
			  { "withUnsafePointer", "keyword2" },
			  { "internal", "keyword" },
			  { "reinterpretCast", "keyword2" },
			  { "reduce", "keyword2" },
			  { "toString", "keyword2" },
			  { "readLine", "keyword2" },
			  { "as", "keyword" },
			  { "deinit", "keyword" },
			  { "break", "keyword" },
			  { "optional", "keyword" },
			  { "withVaList", "keyword2" },
			  { "quickSort", "keyword2" },
			  { "unsafeAddressOf", "keyword2" },
			  { "fileprivate", "keyword" },
			  { "bridgeFromObjectiveCUnconditional", "keyword2" },
			  { "if", "keyword" },
			  { "isBridgedVerbatimToObjectiveC", "keyword2" },
			  { "String", "keyword2" },
			  { "print", "keyword2" },
			  { "roundUpToAlignment", "keyword2" },
			  { "catch", "keyword" },
			  { "equal", "keyword2" },
			  { "Optional", "keyword2" },
			  { "map", "keyword2" },
			  { "println", "keyword2" },
			  { "as?", "keyword" },
			  { "didSet", "keyword" },
			  { "defer", "keyword" },
			  { "inout", "keyword" },
			  { "is", "keyword" },
			  { "Int", "keyword2" },
			  { "minElement", "keyword2" },
			  { "private", "keyword" },
			  { "countLeadingZeros", "keyword2" },
			  { "bridgeFromObjectiveC", "keyword2" },
			  { "nil", "keyword" },
			  { "rethrows", "keyword" },
			  { "withUnsafeMutablePointers", "keyword2" },
			  { "compactMap", "keyword2" },
			  { "unsafeUnwrap", "keyword2" },
			  { "#if", "keyword" },
			  { "#column", "keyword" },
			  { "protocol", "keyword" },
			  { "#file", "keyword" },
			  { "indirect", "keyword" },
			  { "numericCast", "keyword2" },
			  { "#elseif", "keyword" },
			  { "infix", "keyword" },
			  { "override", "keyword" },
			  { "#else", "keyword" },
			  { "dropFirst", "keyword2" },
			  { "subscript", "keyword" },
			  { "#line", "keyword" },
			  { "for", "keyword" },
			  { "import", "keyword" },
			  { "false", "keyword" },
			  { "#fileLiteral", "keyword" },
			  { "advance", "keyword2" },
			  { "partition", "keyword2" },
			  { "__FUNCTION__", "keyword" },
			  { "#endif", "keyword" },
			  { "repeat", "keyword" },
			  { "#selector", "keyword" },
			  { "#available", "keyword" },
			  { "mutating", "keyword" },
			  { "#colorLiteral", "keyword" },
			  { "class", "keyword" },
			  { "dump", "keyword2" },
			  { "#function", "keyword" },
			  { "__COLUMN__", "keyword" },
			  { "set", "keyword" },
			  { "Any", "keyword" },
			  { "return", "keyword" },
			  { "distance", "keyword2" },
			  { "reflect", "keyword2" },
			  { "else", "keyword" },
			  { "Float", "keyword2" },
			  { "_", "keyword" },

		  },
		  "//",
		  {}

		} );

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

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