On 06/12/2015 08:51 AM, Markus Armbruster wrote:
> To have expression semantic analysis in one place rather than two.
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  scripts/qapi.py | 142 
> ++++++++++++++++++++++++++------------------------------
>  1 file changed, 66 insertions(+), 76 deletions(-)

Again, yay for a good testsuite proving this doesn't mess things up :)


> +
> +    return map(lambda expr_elem: expr_elem['expr'], exprs)

I had to go research what this actually does, but it looks correct.

>  
>  def parse_schema(fname):
> -    global all_names
> -    exprs = []
> -
> -    # First pass: read entire file into memory
>      try:
>          schema = QAPISchema(open(fname, "r"))
> +        return check_exprs(schema.exprs)
>      except (QAPISchemaError, QAPIExprError), e:
>          print >>sys.stderr, e
>          exit(1)

Wow, that's really just a thin wrapper now!

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to