Skip to content

Commit

Permalink
simplify condition flow in matching_bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Mar 27, 2017
1 parent 86ef12a commit 31b5bdc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions loadjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,13 @@ function error_pos(msg, inStr)
endpos=bpos(pos);
return
end
end
if(c=='[')
elseif(c=='[')
if(isempty(e1l))
e1l=bpos(pos);
end
level=level+1;
maxlevel=max(maxlevel,level);
end
if(c=='"')
elseif(c=='"')
pos=matching_quote(tokens,pos+1);
end
pos=pos+1;
Expand Down

0 comments on commit 31b5bdc

Please sign in to comment.