Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/serialhex/nano-highlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorserialhex <serialhex@gmail.com>2018-05-30 15:24:52 +0300
committerGitHub <noreply@github.com>2018-05-30 15:24:52 +0300
commit14548f53db8bf14084e453caaef087dbcb2140b6 (patch)
treed374dfd4cfac1c7f14471ee54951bcbf0a9d989c
parentc958882e65b8e4ebf3e4be5c979ca48bd8f1167e (diff)
parent9311e2915b06a1e46fd2914378b1baaeee95cb2a (diff)
Merge pull request #40 from richardjuan/master
Create pony.nanorc
-rw-r--r--pony.nanorc46
1 files changed, 46 insertions, 0 deletions
diff --git a/pony.nanorc b/pony.nanorc
new file mode 100644
index 0000000..ab70d70
--- /dev/null
+++ b/pony.nanorc
@@ -0,0 +1,46 @@
+syntax "pony" "\.pony$"
+
+## Pony lang syntax hilighting for nano
+## Richard JUAN @ https://github.com/richardjuan
+
+## Classes
+color yellow "( |^)[A-Z](|[0-9a-zA-Z_\-]*)"
+color yellow "( |^)@[A-Z][a-zA-Z0-9_\-\.]*"
+color cyan "^(class|actor) [A-Z][a-zA-Z0-9_\-]+ .*"
+
+## Types and bool
+color yellow "\<(true|false|tag|trn|val|iso|box|ref)\>"
+
+## Basic keywords
+color brightmagenta "\<(let|var|do|end|as|is|match|then|for|while|if|else|break|continue|repeat|until|in|try|with|where|object|contume|recover|embed|compile_error|error|lambda|this)\>"
+
+## Declarations
+color brightmagenta "^(class|primitive|type|actor|trait|interface) "
+
+## Important keywords
+color brightred "^[ \t]*(new|fun|be|ifdef) "
+color brightred "^(use) "
+
+
+## Comments
+color white "//.*"
+
+## Integers, Floats ...
+color yellow "\<[+-]?[0-9]+\>"
+color yellow "\<[-+]?[0-9]*\.?[0-9]+(e[-+]?[0-9]+)?\>"
+color yellow "\<0x[0-9a-fA-F]+\>"
+color yellow "\<0b[0-1]+\>"
+
+## Class/Actor call
+color Yellow "\<[A-Z][a-zA-Z0-9_\-]+(\(|\.)"
+color brightblue "\<[a-zA-Z0-9_\-]+\("
+
+## white dots and parentessis
+color brightwhite "[.:()&*=+-|{}%<>!@]"
+color brightwhite "(\\|/|\[|\])"
+color brightwhite " (xor|or|and|not) "
+
+# Quoted strings
+color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
+color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
+color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"