fix number mode

This commit is contained in:
zongor 2025-05-17 16:32:11 -04:00
parent 2d7e18e9c1
commit d79232d971
1 changed files with 10 additions and 11 deletions

View File

@ -28,28 +28,27 @@
;; Constants
(,(regexp-opt ztl-constants 'words) . font-lock-constant-face)
;; Function definitions: "fn name(...)"
("\\_<fn\\>\\s-+\\(\\w+\\)(" (1 font-lock-function-name-face))
;; Function calls: "name(...)"
("\\_<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\s-*(" (1 font-lock-function-name-face))
;; Structs: CamelCase identifiers
("\\b[A-Z][a-zA-Z0-9_]*\\b" . font-lock-type-face)
;; Floating point numbers
("-?[0-9]+\\.[0-9]+" . font-lock-constant-face)
("\\b-?[0-9]+\\.[0-9]+\\b" . font-lock-constant-face)
;; Ints
("-?[0-9]+" . font-lock-constant-face)
;; Integers
("\\b-?[0-9]+\\b" . font-lock-constant-face)
;; Strings with double quotes
("\"[^\"\n]*\"" . font-lock-string-face)
;; Strings with backticks
("`[^`]*`" . font-lock-string-face)
("`[^`]*`" . font-lock-string-face))
;; Function definitions
("\\_<fn\\>\\s-+\\(\\w+\\)(" (1 font-lock-function-name-face))
;; Function calls
("\\_<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\s-*(" (1 font-lock-function-name-face))
)
"Font lock keywords for Ztl mode.")
(defvar ztl-mode-syntax-table