diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index a8422c4545..e3e8932188 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -262,7 +262,7 @@ these lines in your .emacs: (regexp-opt factor-declaration-words 'symbols)) (defconst factor-integer-regex - "\\_<-?\\(0[xob][0-9a-fA-F]+\\|[0-9][0-9,]*\\)\\_>") + (one-symbol "-?\\(?:0[xob][0-9a-fA-F][0-9a-fA-F,]*\\|[0-9][0-9,]*\\)")) (defconst factor-raw-float-regex "[0-9]*\\.[0-9]*\\([eEpP][+-]?[0-9]+\\)?") @@ -439,6 +439,7 @@ these lines in your .emacs: "P" 'factor-font-lock-parsing-word "V" 'factor-font-lock-vocabulary-name "T" 'factor-font-lock-type-name + "N" 'factor-font-lock-number "W" 'factor-font-lock-word))) (defun factor-group-name-to-face (group-name) @@ -476,7 +477,7 @@ these lines in your .emacs: ,(factor-syntax (syntax-and-2-symbols '("ALIAS")) '("P" "W" "W")) ,(factor-syntax (syntax-and-1-symbol '("ALIEN" "CHAR" "NAN")) '("P" "CT")) ,(factor-syntax factor-types-lines-regex '("P" "T")) - (,factor-integer-regex . 'factor-font-lock-number) + ,(factor-syntax factor-integer-regex '("N")) (,factor-float-regex . 'factor-font-lock-number) (,factor-ratio-regex . 'factor-font-lock-ratio) ,(factor-syntax factor-type-definition-regex '("P" "T")) diff --git a/misc/fuel/strange-syntax.factor b/misc/fuel/strange-syntax.factor index 7bf266282b..98b59addad 100644 --- a/misc/fuel/strange-syntax.factor +++ b/misc/fuel/strange-syntax.factor @@ -4,7 +4,7 @@ ! highlighted correctly by FUEL. So if you change something in the ! syntax highlighting and it breaks, things will be badly hightlighted ! here. -USING: alien.syntax help.syntax math ; +USING: alien.syntax kernel math ; IN: strange-syntax TUPLE: a-tuple slot1 slot2 { slot3 integer } ; @@ -47,3 +47,6 @@ SYNTAX: ID-SYNTAX ; >> ID-SYNTAX ID-SYNTAX + +! ! Numbers +{ -55 -0x10 100,00 1,000,000 0x2000,0000 0b01 } drop