Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Fix unexpected unary expression error.
Browse files Browse the repository at this point in the history
… when parsing negative numbers.

Fixes #29
  • Loading branch information
bobthecow committed Sep 19, 2012
1 parent e0df17e commit e8eaf95
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.0.2

* Fix unexpected unary expression error when parsing negative numbers.

## v2.0.1

* Fix #26 — Don't double-encode HTML entities in JSON output.
Expand Down
6 changes: 3 additions & 3 deletions genghis.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions genghis.rb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/js/genghis/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Genghis.JSON = {
'ObjectExpression': true,
'ArrayExpression': true,
'NewExpression': true,
'CallExpression': true
'CallExpression': true,
'UnaryExpression': true
};

var errors = [];
Expand Down Expand Up @@ -255,6 +256,7 @@ Genghis.JSON = {
case 'Identifier':
case 'ArrayExpression':
case 'ObjectExpression':
case 'UnaryExpression':
break;

// Normally literals get a pass
Expand Down

0 comments on commit e8eaf95

Please sign in to comment.