fix regex

This commit is contained in:
zongor 2025-04-20 01:12:32 -04:00
parent 290692570f
commit 6a3cdeca00
1 changed files with 5 additions and 8 deletions

View File

@ -5,10 +5,6 @@
(defconst ztl-mode-syntax-table (defconst ztl-mode-syntax-table
(let ((syn-table (make-syntax-table))) (let ((syn-table (make-syntax-table)))
(modify-syntax-entry ?! "< b" syn-table) ; Line comment (extend to end of line)
(modify-syntax-entry ?\[ "(]" syn-table)
(modify-syntax-entry ?\] ")[" syn-table)
(modify-syntax-entry ?\" "\"" syn-table)
syn-table)) syn-table))
(defvar ztl-keywords (defvar ztl-keywords
@ -39,11 +35,12 @@
("\\_<\\([A-Z][a-zA-Z0-9_]+\\)\\>" 1 font-lock-type-face) ("\\_<\\([A-Z][a-zA-Z0-9_]+\\)\\>" 1 font-lock-type-face)
;; Function definitions ;; Function definitions
("\\_<fn\\>\\s-+\\(\\w+\\)\\s-*(" (1 font-lock-function-name-face)) ("\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\([ \t\n\r]*\\)(" 1 font-lock-function-name-face)
("\\b[0-9]+\\b" 1 font-lock-number-face)
))
;; Function calls
("\\_<\\(\\w+\\)\\s-*(\\>" (1 font-lock-function-name-face))
))
(define-derived-mode ztl-mode prog-mode "ZTL" (define-derived-mode ztl-mode prog-mode "ZTL"
"Major mode for ZTL programming." "Major mode for ZTL programming."