Commits

Georg Brandl  committed 894f810

Fix number pattern order in Ocaml lexer (#647).

  • Participants
  • Parent commits e2e5221

Comments (0)

Files changed (2)

 
 - Fix degenerate regex in Scala lexer (#671).
 
+- Fix number pattern order in Ocaml lexer (#647).
+
 
 Version 1.4
 -----------

File pygments/lexers/functional.py

 
             (r"[^\W\d][\w']*", Name),
 
-            (r'\d[\d_]*', Number.Integer),
+            (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
             (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
             (r'0[oO][0-7][0-7_]*', Number.Oct),
             (r'0[bB][01][01_]*', Number.Binary),
-            (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
+            (r'\d[\d_]*', Number.Integer),
 
             (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
              String.Char),