On 05/20/2014 03:07 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng <[email protected]> > --- > scripts/qapi.py | 24 +++++++++++++++++------- > 1 file changed, 17 insertions(+), 7 deletions(-)
I applied this patch and tried to break things.
Pre-patch,
{ 'random': tru } => foo.json:1:13: Stray "t"
{ 'random': true } => foo.json:1:13: Stray "t"
{ 'random': truest } => foo.json:1:13: Stray "t"
Post-patch,
{ 'random': tru } => foo.json:1:14: Stray "r"
{ 'random': true } => accepted
{ 'random': truest } => foo.json:1:17: Stray "s"
Not ideal that you are reporting a different stray character based on
how much (1 or 4 bytes) that you tentatively already consumed. Better
might be to report a stray word (all characters until the next
whitespace, starting at the first bare character rather than mid-word).
Are these cases tested in 3/7?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
