[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs extra-modes.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs extra-modes.c |
Date: |
Fri, 30 Jun 2017 12:28:02 -0400 (EDT) |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 17/06/30 12:28:02
Modified files:
. : extra-modes.c
Log message:
extra-languages: add syntax highlighting for the Eff programming
language
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/extra-modes.c?cvsroot=qemacs&r1=1.67&r2=1.68
Patches:
Index: extra-modes.c
===================================================================
RCS file: /sources/qemacs/qemacs/extra-modes.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- extra-modes.c 13 Jun 2017 05:27:55 -0000 1.67
+++ extra-modes.c 30 Jun 2017 16:28:02 -0000 1.68
@@ -4037,6 +4037,41 @@
return 0;
}
+/*---------------- Eff language coloring ----------------*/
+
+static char const eff_keywords[] = {
+ // eff-keywords
+ "and|as|begin|check|do|done|downto|else|end|effect|external|finally|for|"
+ "fun|function|handle|handler|if|in|match|let|new|of|operation|rec|val|"
+ "while|to|type|then|with|"
+ // eff-constants
+ "asr|false|mod|land|lor|lsl|lsr|lxor|or|true|"
+ // other
+ "ref|try|raise|"
+ // directives
+ "help|reset|quit|use|"
+};
+
+static char const eff_types[] = {
+ "empty|bool|float|double|int|exception|string|map|range|unit|"
+};
+
+static ModeDef eff_mode = {
+ .name = "Eff",
+ .extensions = "eff",
+ .shell_handlers = "eff",
+ .keywords = eff_keywords,
+ .types = eff_types,
+ .colorize_func = ocaml_colorize_line,
+};
+
+static int eff_init(void)
+{
+ qe_register_mode(&eff_mode, MODEF_SYNTAX);
+
+ return 0;
+}
+
/*---------------- EMF (JASSPA microemacs macro files) ----------------*/
static char const emf_keywords[] = {
@@ -5094,6 +5129,7 @@
erlang_init();
elixir_init();
ocaml_init();
+ eff_init();
emf_init();
agena_init();
smalltalk_init();