]> gitweb.factorcode.org Git - factor.git/commitdiff
vim: allow sign of exponent to be optional (e.g., "1e10" should be highlighted correc...
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 May 2012 14:43:09 +0000 (07:43 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 May 2012 14:43:09 +0000 (07:43 -0700)
misc/vim/syntax/factor.vim

index 0f9e396ac922595796fc2ed03ee4fb77ebd0bdf4..a6b20070209823a9378e345848c4e2588d59e746 100644 (file)
@@ -68,8 +68,8 @@ syn keyword factorKeyword with-return restarts return-continuation with-datastac
 syn cluster factorReal          contains=factorInt,factorFloat,factorPosRatio,factorNegRatio,factorBinary,factorHex,factorOctal
 syn cluster factorNumber        contains=@factorReal,factorComplex
 syn cluster factorNumErr        contains=factorBinErr,factorHexErr,factorOctErr
-syn match   factorInt           /\<-\=[0-9]\([0-9,]*[0-9]\)\?\([eE][+-][0-9]\+\)\?\>/
-syn match   factorFloat         /\<-\=[0-9]\([0-9,]*[0-9]\)\?\(\.\([0-9,]*[0-9]\+\([eE][+-][0-9]\+\)\?\)\?\)\?\>/
+syn match   factorInt           /\<-\=[0-9]\([0-9,]*[0-9]\)\?\([eE]\([+-]\)\?[0-9]\+\)\?\>/
+syn match   factorFloat         /\<-\=[0-9]\([0-9,]*[0-9]\)\?\(\.\(\([0-9,]*[0-9]\+\)\?\([eE]\([+-]\)\?[0-9]\+\)\?\)\?\)\?\>/
 syn match   factorPosRatio      /\<+\=[0-9]\([0-9,]*[0-9]\)\?\(+[0-9]\([0-9,]*[0-9]\+\)\?\)\?\/-\=[0-9]\([0-9,]*[0-9]\+\)\?\.\?\>/
 syn match   factorNegRatio      /\<\-[0-9]\([0-9,]*[0-9]\)\?\(\-[0-9]\([0-9,]*[0-9]\+\)\?\)\?\/-\=[0-9]\([0-9,]*[0-9]\+\)\?\.\?\>/
 syn region  factorComplex       start=/\<C{\>/ end=/\<}\>/ contains=@factorReal