Issue #413 resolved

S-Plus / R lexer: Doesn't recognize numbers that start with dot

Anonymous created an issue

The lexer doesn't recognize numbers that begin with a decimal point. The last one here isn't properly recognized.

{{{ 2 2.3 0.3 .3 }}} BR BR

Adding a second entry to numbers, containing only the post-decimal part, should fix it. I think this should work but I haven't tested it. {{{ (r'\.[0-9](E[0-9][-\+]?(\.[0-9])?)?', Number), }}}

Reported by guest