mirror of
https://github.com/flynx/serialize.js.git
synced 2026-07-10 11:10:57 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0da3ea2a16
commit
fc9fed6a9d
@ -403,7 +403,10 @@ module.eJSON = {
|
||||
if(j == str.length
|
||||
&& str[j-1] != match){
|
||||
this.error('Unexpected end of input wile looking fot "'+ match +'".', str, i, line) }
|
||||
return [ str.slice(i+1, j), j+1, line ] },
|
||||
// NOTE: this is cheating -- instead of dancing around and
|
||||
// replicating the full functionality of JSON.parse(..) we
|
||||
// are simply falling back on it, as we did when serializing.
|
||||
return [ JSON.parse(`"${str.slice(i+1, j)}"`), j+1, line ] },
|
||||
identifier: function(state, path, match, str, i, line){
|
||||
debug.lex('identifier', str, i, line)
|
||||
if(!/[a-zA-Z_]/.test(str[i])){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user