-- lx-public:0

-- lx format
local format = require("core.format")
local patterns = require("core.format.patterns")

format.register({
	name = "Liqube TabTree",
	shortname = "TabTree",
	extensions = { "tt" },
	comment = ";",
	force_header_check = true,

	patterns = {
		{ pattern = "%s*;.-\n", type = "comment", line_start = true },
		{ pattern = "@[%a_][%w_%-]*", type = "keyword" },
		{ pattern = "%f[%S]%d+:%s*[^#\n]+", type = "string" },
		{ pattern = "-?%d+%.?%d*", type = "number" },
		{ pattern = "#", type = "label" },
		{ pattern = "[%a_][%w_%-]*", type = "symbol" },
		{ pattern = "[:]", type = "operator" },
		{ pattern = "%s*([%d+])(:)%s*(.-)\n", type = { "number", "operator", "string" } },
	},
})
