qapi: Record 'include' directives in parse tree
authorMarkus Armbruster <armbru@redhat.com>
Sun, 11 Feb 2018 09:35:53 +0000 (10:35 +0100)
committerEric Blake <eblake@redhat.com>
Fri, 2 Mar 2018 19:14:09 +0000 (13:14 -0600)
commit97f0249474d19c1d60fb9d934c8bc08625a619ca
tree6fed315ca4dbcf28caeb72b8157a0ed3a9d9c096
parent4257053083775c1f670fa828003915e25d13e9d7
qapi: Record 'include' directives in parse tree

The parse tree is a list of expressions.  Except include expressions
currently get replaced by the included file's parse tree.

Instead of throwing away the include expression, keep it with the file
name expanded so you don't have to track the including file's
directory to make sense of it.

A future commit will put this include expression to use.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180211093607.27351-16-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: fix check of expr after assignment]
Signed-off-by: Eric Blake <eblake@redhat.com>
scripts/qapi/common.py