{
	"copyright": [
		"Copyright AddOn Studio. All rights reserved"
	],
	"name": "TOC file",
	"scopeName": "code.toc",
	"fileTypes": [
		"toc"
	],
	"patterns": [
		{ "include": "#comment" },
		{ "include": "#namevalue" },
		{ "include": "#item" }
	],
	"repository": {
		"comment": {
			"patterns": [
				{
					"match": "^(?<!\\#)\\#(?!\\#).*",
					"name": "comment toc.comment"
				}
			]
		},
		"item": {
			"patterns": [
				{
					"match": ".+",
					"name": "code toc.code"
				}
			]
		},
		"namevalue": {
			"patterns": [
				{
					"match": "^(##)\\s*([^:^\\s]+)\\s*(:)\\s*(.+)\\s*",
					"name": "source toc.source",
					"captures": {
						"1": {
							"name": "keyword.preprocessor toc.pragma"
						},
						"2": {
							"name0000": "entity.name.label toc.name",
							"name": "entity.other.attribute-name",
							"name00": "support.type.property-name.json",
							"name0": "entity.name.variable.local.cs toc.name",
							"name4": "invalid.illegal",
							"name3": "variable.parameter toc.name"
						},
						"3": {
							"name": "keyword.operator.assignment toc.operator"
						},
						"4": {
							"name": "constant.language toc.value",
							"patterns": [ { "include": "#literaltypes" } ]
						}
					}
				}
			]
		},
		"literaltypes": {
			"patterns": [
				{ "include": "#datetime" },
				{
					"match": "\\b(true|false|nil)\\b",
					"name": "constant.language toc.literal"
				},
				{
					"match": "\\b([0-9]+\\.[0-9]+)\\b$",
					"name": "constant.numeric.floating-point toc.number"
				},
				{
					"match": "\\b([0-9]+)\\b$",
					"name": "constant.numeric.integer.nativeint toc.number"
				},
				{
					"match": "\"[^\"]*\"$",
					"name": "string.quoted.double toc.string"
				},
				{
					"match": "(?<![\\w])'[^']*'$",
					"name": "string.quoted.single toc.string"
				},
				{
					"match": ".+$",
					"name": "string.unquoted toc.string"
				}
			]
		},
		"datetime": {
			"patterns": [
				{
					"match": "\\b((\\d{4}/\\d{2}/\\d{2})|(\\d{2}/\\d{2}/\\d{4})|(\\d{2}/\\d{2}/\\d{2}))\\b",
					"name": "comment toc.date"
				},
				{
					"match": "\\b((\\d{4}-\\d{2}-\\d{2})|(\\d{2}-\\d{2}-\\d{4}))|(\\d{2}-\\d{2}-\\d{2})\\b",
					"name": "comment toc.date"
				}
			]
		},
		"literaltypestest": {
			"patterns": [
				{
					"match": "\\b\\d{2}\\:\\d{2} (AM|PM)\\b",
					"name": "comment toc.date"
				}
			]
		}

	}
}