about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--log.txt3
-rw-r--r--rnd/lil-mode.el69
2 files changed, 71 insertions, 1 deletions
diff --git a/log.txt b/log.txt
index 670a4c7..817bf28 100644
--- a/log.txt
+++ b/log.txt
@@ -5,4 +5,5 @@
 04 DEC: Today a lot of noodling and toodling with recursion. Exploring ways to map/filter/for-each over the data to access what I am after
 05 DEC: No huge progress to share -- explored a few other implementations of scheme and interface options, pausing on data (re)shaping and wrangling
 06 DEC: Sort of a rest day, perhaps more after work, but today's been a *long* day. Poked a weeeeeeee little bit at the inspector function
-07 DEC: Another busy day at work, but I had time to explore lil -- started a new project using it
\ No newline at end of file
+07 DEC: Another busy day at work, but I had time to explore lil -- started a new project using it
+08 DEC: Had a quick conversation with the mind behind lil about lil, continued to explore lil, and started work on an emacs major-mode for lil
\ No newline at end of file
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