diff options
author | Eduardo Julian | 2018-07-03 22:59:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-03 22:59:30 -0400 |
commit | c98640ca0d39ed2934dbf6d2bb2d5b9987441395 (patch) | |
tree | 7b499891bb8125792e3482254e234bbc5dc433f0 /lux-mode | |
parent | 49d59ddc16a588115e02303fd325e46d6c1c87ac (diff) |
- Improved syntax for numeric literals by allowing arbitrary zeroes (0) at the front of numbers.
Diffstat (limited to 'lux-mode')
-rw-r--r-- | lux-mode/lux-mode.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index 5beb7f91c..45db10635 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -254,14 +254,14 @@ Called by `imenu--generic-function'." "\\>") 0 font-lock-constant-face) ; Nat literals - ("\\<\\+\\(0\\|[1-9][0-9_]*\\)\\>" 0 font-lock-constant-face) + ("\\<\\+\\(0\\|[0-9][0-9_]*\\)\\>" 0 font-lock-constant-face) ; Int|Frac literals - ("\\<-?\\(0\\|[1-9][0-9_]*\\)\\(\\.[0-9_]+\\)?\\>" 0 font-lock-constant-face) - ("\\<-?\\(0\\|[1-9][0-9_]*\\)\\(\\.[0-9_]+\\(\\(e\\|E\\)\\(-\\|\\+\\)?[1-9][0-9_]*\\)?\\)?\\>" 0 font-lock-constant-face) + ("\\<-?\\(0\\|[0-9][0-9_]*\\)\\(\\.[0-9_]+\\)?\\>" 0 font-lock-constant-face) + ("\\<-?\\(0\\|[--9][0-9_]*\\)\\(\\.[0-9_]+\\(\\(e\\|E\\)\\(-\\|\\+\\)?[0-9][0-9_]*\\)?\\)?\\>" 0 font-lock-constant-face) ; Frac "ratio" literals - ("\\<-?\\(0\\|[1-9][0-9_]*\\)/[1-9][0-9_]*\\>" 0 font-lock-constant-face) + ("\\<-?\\(0\\|[0-9][0-9_]*\\)/[0-9][0-9_]*\\>" 0 font-lock-constant-face) ; Deg literals - ("\\<\\(\\.[0-9_]+\\)\\>" 0 font-lock-constant-face) + ("\\<\\(\\.[0-9][0-9_]*\\)\\>" 0 font-lock-constant-face) ; Tags ("#\\.[a-zA-Z0-9-\\+_=!@\\$%\\^&\\*<>\.,/\\\\\\|':~\\?]+" 0 font-lock-type-face) ("#\\.\\.[a-zA-Z0-9-\\+_=!@\\$%\\^&\\*<>\.,/\\\\\\|':~\\?]+" 0 font-lock-type-face) @@ -396,6 +396,4 @@ This function also returns nil meaning don't specify the indentation." ) ;;;###autoload - - (provide 'lux-mode) |