From d48efbf4424c66aeaa324ba0c6d6be743d1ade1e Mon Sep 17 00:00:00 2001 From: onodera-punpun Date: Mon, 23 Jan 2017 20:01:26 +0100 Subject: [PATCH] Add toml syntax file --- runtime/syntax/toml.micro | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 runtime/syntax/toml.micro diff --git a/runtime/syntax/toml.micro b/runtime/syntax/toml.micro new file mode 100644 index 00000000..052c72de --- /dev/null +++ b/runtime/syntax/toml.micro @@ -0,0 +1,21 @@ +syntax "toml" "\.toml$" + +# Keys +color statement "(.*)[[:space:]]=" +color special "=" + +# Bracket thingies +color special "(\[|\])" + +# Numbers and strings +color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'" +color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'" +color constant.specialChar "\\[abfnrtv'\"\\]" +color constant.specialChar "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})" +color constant.string "`[^`]*`" +color constant.specialChar """ +color constant.specialChar "'" + +# Comments & TODOs +color comment "(^|[[:space:]])#.*" +color todo "(TODO|XXX|FIXME):?"