Commits

Brian McKenna  committed d6788a5 Merge

Merge pull request #148 from non/topic/float-syntax

Add 2.3e4 syntax for numbers.

  • Participants
  • Parent commits 367eeac, e6bbb62

Comments (0)

Files changed (1)

File src/lexer.js

     unicode.ECMA.identifier.source.replace('\\u03BB', '')
 );
 
-var NUMBER = /^-?[0-9]+(\.[0-9]+)?/;
+var NUMBER = /^-?[0-9]+(\.[0-9]+)?(e-?[0-9]+)?/;
 var COMMENT = /^\/\/.*/;
 var WHITESPACE = /^[^\n\S]+/;
 var INDENT = /^(?:\n[^\n\S]*)+/;