fix number mode
This commit is contained in:
parent
2d7e18e9c1
commit
d79232d971
21
ztl-mode.el
21
ztl-mode.el
|
@ -28,28 +28,27 @@
|
||||||
;; Constants
|
;; Constants
|
||||||
(,(regexp-opt ztl-constants 'words) . font-lock-constant-face)
|
(,(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
|
;; Structs: CamelCase identifiers
|
||||||
("\\b[A-Z][a-zA-Z0-9_]*\\b" . font-lock-type-face)
|
("\\b[A-Z][a-zA-Z0-9_]*\\b" . font-lock-type-face)
|
||||||
|
|
||||||
;; Floating point numbers
|
;; Floating point numbers
|
||||||
("-?[0-9]+\\.[0-9]+" . font-lock-constant-face)
|
("\\b-?[0-9]+\\.[0-9]+\\b" . font-lock-constant-face)
|
||||||
|
|
||||||
;; Ints
|
;; Integers
|
||||||
("-?[0-9]+" . font-lock-constant-face)
|
("\\b-?[0-9]+\\b" . font-lock-constant-face)
|
||||||
|
|
||||||
;; Strings with double quotes
|
;; Strings with double quotes
|
||||||
("\"[^\"\n]*\"" . font-lock-string-face)
|
("\"[^\"\n]*\"" . font-lock-string-face)
|
||||||
|
|
||||||
;; Strings with backticks
|
;; 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.")
|
"Font lock keywords for Ztl mode.")
|
||||||
|
|
||||||
(defvar ztl-mode-syntax-table
|
(defvar ztl-mode-syntax-table
|
||||||
|
|
Loading…
Reference in New Issue