-- lx syntax
local syntax = require("core.syntax")

syntax.add({
	name = "Visual Studio Solution",
	shortname = "Solution",
	author = "liqube",
	created = "2020-05-16",
	extensions = "sln",
	comment = "#",

	patterns = {
		{ pattern = "Microsoft Visual Studio Solution File.-\n", type = "comment" },
		{ pattern = "#.-\n", type = "comment" }, -- comments
		{ pattern = "%{%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x%}", type = "symbol" },
		-- guids
		{ pattern = "-?%.?%d+f?", type = "number" }, -- numbers
		{ pattern = "[%|()=,%.]", type = "operator" }, -- operators
		{ pattern = { '"', '"', "\\" }, type = "string" }, -- strings
		{ pattern = "[%a_][%w_]*", type = "normal" },
	},

	symbols = {
		["Project"] = "function",
		["EndProject"] = "function",
		["ProjectSection"] = "keyword",
		["EndProjectSection"] = "keyword",
		["Global"] = "function",
		["EndGlobal"] = "function",
		["GlobalSection"] = "keyword",
		["EndGlobalSection"] = "keyword",
		["ActiveCfg"] = "keyword2",
		["Build"] = "keyword2",
		["FALSE"] = "literal",
		["TRUE"] = "literal",
	},
})
