Skip to content
Browse files

Allow a plus sign in exponents

This is needed to parse JSON.

git-svn-id: svn://svn.synchrona.org/erights/e/trunk@818 bdfa04cf-0718-0410-970a-89734667f18f
  • Loading branch information...
1 parent 765aa6c commit a0e86dc53522e11be896269df5faf7fc330a3239 tal committed Sep 29, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/jsrc/org/quasiliteral/syntax/BaseLexer.java
View
3 src/jsrc/org/quasiliteral/syntax/BaseLexer.java
@@ -835,7 +835,8 @@ protected Astro numberLiteral() throws IOException, SyntaxException {
if (('E' == myChar) || ('e' == myChar)) {
nextChar();
floating = true;
- if ('-' == myChar) {
+ // note: JSON allows "e", "e-" and "e+"
+ if ('-' == myChar || '+' == myChar) {
nextChar();
}
if (!digits(10)) {

0 comments on commit a0e86dc

Please sign in to comment.
Something went wrong with that request. Please try again.