From 0d0308ab9a7bbcc489d0e0737022e86b4dbc0e0d Mon Sep 17 00:00:00 2001 From: leonskidev Date: Sat, 2 Oct 2021 14:13:23 +0100 Subject: [PATCH] Add support for micro --- editor/porth-micro.yaml | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 editor/porth-micro.yaml diff --git a/editor/porth-micro.yaml b/editor/porth-micro.yaml new file mode 100644 index 00000000..7f45f564 --- /dev/null +++ b/editor/porth-micro.yaml @@ -0,0 +1,42 @@ +# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENCE +# Version 2, December 2004 +# +# Copyright (c) 2021 Leon Davis +# +# Everyone is permitted to copy and distribute verbatim or modified +# copies of this license document, and changing it is allowed as long +# as the name is changed. + +filetype: porth + +detect: + filename: "\\.porth$" + +rules: + - comment: + start: "//" + end: "$" + rules: + - todo: "(TODO|XXX|FIXME|NOTE):?" + + - identifier: "\\b(?i)[a-z_]+" + + - symbol.operator: "([-+/*=<>,]|[.]{2})" + - symbol.brackets: "(\\(|\\))" + + - statement: "\\b(?i)(if|else|end|while|do|macro|include)" + - type.keyword: "\\b(?i)(macro|include)" + + - constant.number: "\\b[0-9]+\\b" + - constant.string: + start: "\"" + skip: "\\\\." + end: "\"" + rules: + - constant.specialChar: "\\\\." + - constant.string: + start: "\'" + skip: "\\\\." + end: "\'" + rules: + - constant.specialChar: "\\\\."