summaryrefslogtreecommitdiff
path: root/tools/g-ir-scanner
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2009-01-11 22:41:31 +0000
committerJohan Dahlin <johan@src.gnome.org>2009-01-11 22:41:31 +0000
commit8ec1e3a52040a226110c04c3bf17ec190812e95b (patch)
treebe1a1dfa0c35c5f9f506e9cc11fa81564b280c01 /tools/g-ir-scanner
parentba4ee2e606545ac703941698aa25e6d865e6976f (diff)
downloadgobject-introspection-8ec1e3a52040a226110c04c3bf17ec190812e95b.tar.gz
commit annotation parse patch
svn path=/branches/annotation/; revision=1008
Diffstat (limited to 'tools/g-ir-scanner')
-rwxr-xr-xtools/g-ir-scanner7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/g-ir-scanner b/tools/g-ir-scanner
index f69bdeb6..2152611d 100755
--- a/tools/g-ir-scanner
+++ b/tools/g-ir-scanner
@@ -41,6 +41,7 @@ else:
'site-packages')
sys.path.insert(0, path)
+from giscanner.annotationparser import AnnotationParser, InvalidAnnotationError
from giscanner.ast import Include
from giscanner.cachestore import CacheStore
from giscanner.dumper import compile_introspection_binary
@@ -313,6 +314,12 @@ def main(args):
namespace = glibtransformer.parse()
+ ap = AnnotationParser(namespace, ss, transformer)
+ try:
+ ap.parse()
+ except InvalidAnnotationError, e:
+ raise SystemExit("ERROR in annotation: %s" % (str(e), ))
+
# Write out AST
writer = Writer(namespace, libraries, transformer.get_includes())
data = writer.get_xml()