diff options
author | elioat <elioat@tilde.institute> | 2022-12-08 20:04:53 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-12-08 20:04:53 -0500 |
commit | 1f67d723fc0cbbc25b4b1cb61b7fd61bb63334ef (patch) | |
tree | ae0e16309be9281f6607e3f4018cc9452bb2cc23 /rnd | |
parent | bd337d3e344c6fafffe4f65c31a870d2293549d8 (diff) | |
download | december-2022-1f67d723fc0cbbc25b4b1cb61b7fd61bb63334ef.tar.gz |
emacs major mode
Diffstat (limited to 'rnd')
-rw-r--r-- | rnd/lil-mode.el | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/rnd/lil-mode.el b/rnd/lil-mode.el new file mode 100644 index 0000000..b6052ef --- /dev/null +++ b/rnd/lil-mode.el @@ -0,0 +1,69 @@ +;;; lil-mode.el --- major mode for editing lil. -*- coding: utf-8; lexical-binding: t; -*- + +;; Copyright (c) 2022, by eli_oat + +;; Author: eli_oat <hi@eli.li> +;; Version: 0.0.1 +;; Created: 08 Dec 2022 +;; Keywords: languages + +;; This file is not part of GNU Emacs. + +;;; License: + +;; You can redistribute this program and/or modify it under the terms of the GNU General Public License version 2. + +;;; Commentary: + +;; a major mode for writing lil, lil is a programming language by John Earnest. Learn more, <https://beyondloom.com/decker/lil.html> + +;;; Code: + +(add-to-list 'auto-mode-alist '("\\.lil\\'" . lil-mode)) + +(setq lil-highlights + '(("Sin\\|Cos\\|Sum" . 'font-lock-function-name-face) + ("Pi\\|Infinity" . 'font-lock-constant-face))) + +(define-derived-mode lil-mode fundamental-mode "lil" + "major mode for editing lil." + (setq font-lock-defaults '(lil-highlights))) + +(provide 'lil-mode) + +;;; lil-mode.el ends here + + +;; font-lock-builtin-face +;; font-lock-comment-face +;; font-lock-constant-face +3;; font-lock-function-name-face +;; font-lock-keyword-face +;; font-lock-negation-char-face +;; font-lock-reference-face +;; font-lock-string-face +;; font-lock-type-face +;; font-lock-variable-name-face +;; font-lock-preprocessor-face + + + + +;; syn match lilComment "#.*$" +;; syn match lilEsc contained /\\[n"\\]/ +;; syn region lilStr start=/"/ end=/"/ skip=/\\"/ contains=lilEsc + +;; syn match lilName contained /[_?a-zA-Z][_?a-zA-Z0-9]*/ +;; syn keyword lilOn on nextgroup=lilName skipwhite + +;; syn keyword lilControl if else end while each send do select extract update insert into from where by orderby asc desc with local +;; syn keyword lilPrims floor cos sin tan exp ln sqrt count sum min max raze first last range list table rows cols mag unit heading +;; syn keyword lilPrims split fuse cat dict take drop in at join cross parse format typeof unless flip limit + +;; hi def link lilComment Comment +;; hi def link lilName Function +;; hi def link lilEsc SpecialChar +;; hi def link lilStr String +;; hi def link lilOn Statement +;; hi def link lilControl Repeat +;; hi def link lilPrims Operator |