aboutsummaryrefslogtreecommitdiff
path: root/lux-mode
diff options
context:
space:
mode:
authorEduardo Julian2021-09-15 04:04:17 -0400
committerEduardo Julian2021-09-15 04:04:17 -0400
commit4559c124c01c6f513372fa1a4f7664e9f6a94ed8 (patch)
treee5f644f536ca979969ae48dda6b97509cdaee073 /lux-mode
parent86c04a4ce3be995edf14ae7f3bf1e137d478c40e (diff)
Brought lux-mode's symbol syntax in-line with the compilers'.
Diffstat (limited to 'lux-mode')
-rw-r--r--lux-mode/lux-mode.el29
1 files changed, 14 insertions, 15 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el
index 0be428749..e6c167050 100644
--- a/lux-mode/lux-mode.el
+++ b/lux-mode/lux-mode.el
@@ -342,20 +342,19 @@ Called by `imenu--generic-function'."
(concat "[" characters "]"))
(defun -class (characters)
- (altRE "^" (concat "[^" characters "]")))
+ (concat "[^" characters "]"))
+;; https://www.emacswiki.org/emacs/RegularExpression
(defconst lux-font-lock-keywords
(eval-when-compile
(let* ((natural "[0-9][0-9,]*")
(identifier_h|label "#")
- (identifier_h|type "A-Z")
- (identifier_h (concat identifier_h|type
- identifier_h|label
- "a-zA-Z-\\+_=!@\\$%\\^&\\*<>;,/\\\\\\|':~\\?"))
- (identifier_t (altRE identifier_h
- "0-9"))
+ (identifier_h|type "[:upper:]")
+ ;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Special.html
+ (identifier_t "][)(}{.\"[:space:]")
+ (identifier_h (concat identifier_t "0-9"))
(sign (altRE "-" "\\+"))
- (identifier (concat (+class identifier_h) (+class identifier_t) "*"))
+ (identifier (concat (-class identifier_h) (-class identifier_t) "*"))
(integer (concat sign natural))
(bitRE (literal (altRE "#0" "#1")))
(natRE (literal natural))
@@ -432,7 +431,7 @@ Called by `imenu--generic-function'."
type
data
code
- ;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;;;;;;;;;;;;;;;;;;;;;
actor
jvm-host
alternative-format
@@ -441,7 +440,7 @@ Called by `imenu--generic-function'."
function-definition
remember
definition
- ;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; ;;;;;;;;;;;;;;;;;;;;;;
"with_expansions"
"undefined" "symbol" "static"
"for"
@@ -455,14 +454,14 @@ Called by `imenu--generic-function'."
(in-current-module (concat separator separator))
(in-module (concat identifier separator))
;; (in-local "")
- (in-local (altRE (+class "()")
- (-class identifier_t)))
+ (in-local (altRE "^"
+ (+class identifier_t)))
(global_prefix (altRE in-prelude
in-current-module
in-module
in-local))
- (typeRE (concat global_prefix (+class identifier_h|type) (+class identifier_t) "*"))
- (labelRE (concat global_prefix (+class identifier_h|label) (+class identifier_t) "*"))
+ (typeRE (concat global_prefix (+class identifier_h|type) (-class identifier_t) "*"))
+ (labelRE (concat global_prefix (+class identifier_h|label) (-class identifier_t) "*"))
(literalRE (altRE bitRE ;; Bit literals
natRE ;; Nat literals
int&fracRE ;; Int literals && Frac literals
@@ -556,7 +555,7 @@ This function also returns nil meaning don't specify the indentation."
(split-string (substring-no-properties function) "\\.")))))
(setq method (get (intern-soft function-tail) 'lux-indent-function))
(cond ((member (char-after open-paren) '(?\[ ;; ?\{
- ))
+ ))
(goto-char open-paren)
(1+ (current-column)))
((or (eq method 'defun)