]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Prepare valadoc source-tree for merge
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 27 Jun 2017 10:21:44 +0000 (12:21 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 27 Jun 2017 10:21:44 +0000 (12:21 +0200)
283 files changed:
.gitignore [deleted file]
AUTHORS [deleted file]
COPYING [deleted file]
ChangeLog [deleted file]
INSTALL [deleted file]
MAINTAINERS [deleted file]
Makefile.am [deleted file]
NEWS [deleted file]
README [deleted file]
autogen.sh [deleted file]
configure.ac [deleted file]
doc/Makefile.am [deleted file]
libvaladoc/Makefile.am [moved from src/libvaladoc/Makefile.am with 100% similarity]
libvaladoc/api/array.vala [moved from src/libvaladoc/api/array.vala with 100% similarity]
libvaladoc/api/attribute.vala [moved from src/libvaladoc/api/attribute.vala with 100% similarity]
libvaladoc/api/attributeargument.vala [moved from src/libvaladoc/api/attributeargument.vala with 100% similarity]
libvaladoc/api/browsable.vala [moved from src/libvaladoc/api/browsable.vala with 100% similarity]
libvaladoc/api/callable.vala [moved from src/libvaladoc/api/callable.vala with 100% similarity]
libvaladoc/api/childsymbolregistrar.vala [moved from src/libvaladoc/api/childsymbolregistrar.vala with 100% similarity]
libvaladoc/api/class.vala [moved from src/libvaladoc/api/class.vala with 100% similarity]
libvaladoc/api/constant.vala [moved from src/libvaladoc/api/constant.vala with 100% similarity]
libvaladoc/api/delegate.vala [moved from src/libvaladoc/api/delegate.vala with 100% similarity]
libvaladoc/api/driver.vala [moved from src/libvaladoc/api/driver.vala with 100% similarity]
libvaladoc/api/enum.vala [moved from src/libvaladoc/api/enum.vala with 100% similarity]
libvaladoc/api/enumvalue.vala [moved from src/libvaladoc/api/enumvalue.vala with 100% similarity]
libvaladoc/api/errorcode.vala [moved from src/libvaladoc/api/errorcode.vala with 100% similarity]
libvaladoc/api/errordomain.vala [moved from src/libvaladoc/api/errordomain.vala with 100% similarity]
libvaladoc/api/field.vala [moved from src/libvaladoc/api/field.vala with 100% similarity]
libvaladoc/api/formalparameter.vala [moved from src/libvaladoc/api/formalparameter.vala with 100% similarity]
libvaladoc/api/formalparametertype.vala [moved from src/libvaladoc/api/formalparametertype.vala with 100% similarity]
libvaladoc/api/girsourcecomment.vala [moved from src/libvaladoc/api/girsourcecomment.vala with 100% similarity]
libvaladoc/api/interface.vala [moved from src/libvaladoc/api/interface.vala with 100% similarity]
libvaladoc/api/item.vala [moved from src/libvaladoc/api/item.vala with 100% similarity]
libvaladoc/api/member.vala [moved from src/libvaladoc/api/member.vala with 100% similarity]
libvaladoc/api/method.vala [moved from src/libvaladoc/api/method.vala with 100% similarity]
libvaladoc/api/methodbindingtype.vala [moved from src/libvaladoc/api/methodbindingtype.vala with 100% similarity]
libvaladoc/api/namespace.vala [moved from src/libvaladoc/api/namespace.vala with 100% similarity]
libvaladoc/api/node.vala [moved from src/libvaladoc/api/node.vala with 100% similarity]
libvaladoc/api/nodetype.vala [moved from src/libvaladoc/api/nodetype.vala with 100% similarity]
libvaladoc/api/ownership.vala [moved from src/libvaladoc/api/ownership.vala with 100% similarity]
libvaladoc/api/package.vala [moved from src/libvaladoc/api/package.vala with 100% similarity]
libvaladoc/api/pointer.vala [moved from src/libvaladoc/api/pointer.vala with 100% similarity]
libvaladoc/api/property.vala [moved from src/libvaladoc/api/property.vala with 100% similarity]
libvaladoc/api/propertyaccessor.vala [moved from src/libvaladoc/api/propertyaccessor.vala with 100% similarity]
libvaladoc/api/propertyaccessortype.vala [moved from src/libvaladoc/api/propertyaccessortype.vala with 100% similarity]
libvaladoc/api/propertybindingtype.vala [moved from src/libvaladoc/api/propertybindingtype.vala with 100% similarity]
libvaladoc/api/signal.vala [moved from src/libvaladoc/api/signal.vala with 100% similarity]
libvaladoc/api/signaturebuilder.vala [moved from src/libvaladoc/api/signaturebuilder.vala with 100% similarity]
libvaladoc/api/sourcecomment.vala [moved from src/libvaladoc/api/sourcecomment.vala with 100% similarity]
libvaladoc/api/sourcefile.vala [moved from src/libvaladoc/api/sourcefile.vala with 100% similarity]
libvaladoc/api/struct.vala [moved from src/libvaladoc/api/struct.vala with 100% similarity]
libvaladoc/api/symbol.vala [moved from src/libvaladoc/api/symbol.vala with 100% similarity]
libvaladoc/api/symbolaccessibility.vala [moved from src/libvaladoc/api/symbolaccessibility.vala with 100% similarity]
libvaladoc/api/tree.vala [moved from src/libvaladoc/api/tree.vala with 100% similarity]
libvaladoc/api/typeparameter.vala [moved from src/libvaladoc/api/typeparameter.vala with 100% similarity]
libvaladoc/api/typereference.vala [moved from src/libvaladoc/api/typereference.vala with 100% similarity]
libvaladoc/api/typesymbol.vala [moved from src/libvaladoc/api/typesymbol.vala with 100% similarity]
libvaladoc/api/visitor.vala [moved from src/libvaladoc/api/visitor.vala with 100% similarity]
libvaladoc/charts/chart.vala [moved from src/libvaladoc/charts/chart.vala with 100% similarity]
libvaladoc/charts/chartfactory.vala [moved from src/libvaladoc/charts/chartfactory.vala with 100% similarity]
libvaladoc/charts/hierarchychart.vala [moved from src/libvaladoc/charts/hierarchychart.vala with 100% similarity]
libvaladoc/charts/simplechartfactory.vala [moved from src/libvaladoc/charts/simplechartfactory.vala with 100% similarity]
libvaladoc/content/block.vala [moved from src/libvaladoc/content/block.vala with 100% similarity]
libvaladoc/content/blockcontent.vala [moved from src/libvaladoc/content/blockcontent.vala with 100% similarity]
libvaladoc/content/comment.vala [moved from src/libvaladoc/content/comment.vala with 100% similarity]
libvaladoc/content/contentelement.vala [moved from src/libvaladoc/content/contentelement.vala with 100% similarity]
libvaladoc/content/contentfactory.vala [moved from src/libvaladoc/content/contentfactory.vala with 100% similarity]
libvaladoc/content/contentrenderer.vala [moved from src/libvaladoc/content/contentrenderer.vala with 100% similarity]
libvaladoc/content/contentvisitor.vala [moved from src/libvaladoc/content/contentvisitor.vala with 100% similarity]
libvaladoc/content/embedded.vala [moved from src/libvaladoc/content/embedded.vala with 100% similarity]
libvaladoc/content/headline.vala [moved from src/libvaladoc/content/headline.vala with 100% similarity]
libvaladoc/content/inline.vala [moved from src/libvaladoc/content/inline.vala with 100% similarity]
libvaladoc/content/inlinecontent.vala [moved from src/libvaladoc/content/inlinecontent.vala with 100% similarity]
libvaladoc/content/inlinetaglet.vala [moved from src/libvaladoc/content/inlinetaglet.vala with 100% similarity]
libvaladoc/content/link.vala [moved from src/libvaladoc/content/link.vala with 100% similarity]
libvaladoc/content/list.vala [moved from src/libvaladoc/content/list.vala with 100% similarity]
libvaladoc/content/listitem.vala [moved from src/libvaladoc/content/listitem.vala with 100% similarity]
libvaladoc/content/note.vala [moved from src/libvaladoc/content/note.vala with 100% similarity]
libvaladoc/content/page.vala [moved from src/libvaladoc/content/page.vala with 100% similarity]
libvaladoc/content/paragraph.vala [moved from src/libvaladoc/content/paragraph.vala with 100% similarity]
libvaladoc/content/resourcelocator.vala [moved from src/libvaladoc/content/resourcelocator.vala with 100% similarity]
libvaladoc/content/run.vala [moved from src/libvaladoc/content/run.vala with 100% similarity]
libvaladoc/content/sourcecode.vala [moved from src/libvaladoc/content/sourcecode.vala with 100% similarity]
libvaladoc/content/styleattributes.vala [moved from src/libvaladoc/content/styleattributes.vala with 100% similarity]
libvaladoc/content/symbollink.vala [moved from src/libvaladoc/content/symbollink.vala with 100% similarity]
libvaladoc/content/table.vala [moved from src/libvaladoc/content/table.vala with 100% similarity]
libvaladoc/content/tablecell.vala [moved from src/libvaladoc/content/tablecell.vala with 100% similarity]
libvaladoc/content/tablerow.vala [moved from src/libvaladoc/content/tablerow.vala with 100% similarity]
libvaladoc/content/taglet.vala [moved from src/libvaladoc/content/taglet.vala with 100% similarity]
libvaladoc/content/text.vala [moved from src/libvaladoc/content/text.vala with 100% similarity]
libvaladoc/content/warning.vala [moved from src/libvaladoc/content/warning.vala with 100% similarity]
libvaladoc/content/wikilink.vala [moved from src/libvaladoc/content/wikilink.vala with 100% similarity]
libvaladoc/ctyperesolver.vala [moved from src/libvaladoc/ctyperesolver.vala with 100% similarity]
libvaladoc/devhelp-markupwriter.vala [moved from src/libvaladoc/devhelp-markupwriter.vala with 100% similarity]
libvaladoc/doclet.vala [moved from src/libvaladoc/doclet.vala with 100% similarity]
libvaladoc/documentation/commentscanner.vala [moved from src/libvaladoc/documentation/commentscanner.vala with 100% similarity]
libvaladoc/documentation/documentation.vala [moved from src/libvaladoc/documentation/documentation.vala with 100% similarity]
libvaladoc/documentation/documentationparser.vala [moved from src/libvaladoc/documentation/documentationparser.vala with 100% similarity]
libvaladoc/documentation/girmetadata.vala [moved from src/libvaladoc/documentation/girmetadata.vala with 100% similarity]
libvaladoc/documentation/gtkdoccommentparser.vala [moved from src/libvaladoc/documentation/gtkdoccommentparser.vala with 100% similarity]
libvaladoc/documentation/gtkdoccommentscanner.vala [moved from src/libvaladoc/documentation/gtkdoccommentscanner.vala with 100% similarity]
libvaladoc/documentation/gtkdocmarkdownparser.vala [moved from src/libvaladoc/documentation/gtkdocmarkdownparser.vala with 100% similarity]
libvaladoc/documentation/gtkdocmarkdownscanner.vala [moved from src/libvaladoc/documentation/gtkdocmarkdownscanner.vala with 100% similarity]
libvaladoc/documentation/importerhelper.vala [moved from src/libvaladoc/documentation/importerhelper.vala with 100% similarity]
libvaladoc/documentation/wiki.vala [moved from src/libvaladoc/documentation/wiki.vala with 100% similarity]
libvaladoc/documentation/wikiscanner.vala [moved from src/libvaladoc/documentation/wikiscanner.vala with 100% similarity]
libvaladoc/errorreporter.vala [moved from src/libvaladoc/errorreporter.vala with 100% similarity]
libvaladoc/filehelper.vala [moved from src/libvaladoc/filehelper.vala with 100% similarity]
libvaladoc/gtkdocmarkupwriter.vala [moved from src/libvaladoc/gtkdocmarkupwriter.vala with 100% similarity]
libvaladoc/gtkdocrenderer.vala [moved from src/libvaladoc/gtkdocrenderer.vala with 100% similarity]
libvaladoc/highlighter/codescanner.vala [moved from src/libvaladoc/highlighter/codescanner.vala with 100% similarity]
libvaladoc/highlighter/codetoken.vala [moved from src/libvaladoc/highlighter/codetoken.vala with 100% similarity]
libvaladoc/highlighter/highlighter.vala [moved from src/libvaladoc/highlighter/highlighter.vala with 100% similarity]
libvaladoc/highlighter/scanner.vala [moved from src/libvaladoc/highlighter/scanner.vala with 100% similarity]
libvaladoc/highlighter/xmlscanner.vala [moved from src/libvaladoc/highlighter/xmlscanner.vala with 100% similarity]
libvaladoc/html/basicdoclet.vala [moved from src/libvaladoc/html/basicdoclet.vala with 100% similarity]
libvaladoc/html/cssclassresolver.vala [moved from src/libvaladoc/html/cssclassresolver.vala with 100% similarity]
libvaladoc/html/htmlchartfactory.vala [moved from src/libvaladoc/html/htmlchartfactory.vala with 100% similarity]
libvaladoc/html/htmlmarkupwriter.vala [moved from src/libvaladoc/html/htmlmarkupwriter.vala with 100% similarity]
libvaladoc/html/htmlrenderer.vala [moved from src/libvaladoc/html/htmlrenderer.vala with 100% similarity]
libvaladoc/html/linkhelper.vala [moved from src/libvaladoc/html/linkhelper.vala with 100% similarity]
libvaladoc/importer/documentationimporter.vala [moved from src/libvaladoc/importer/documentationimporter.vala with 100% similarity]
libvaladoc/importer/girdocumentationimporter.vala [moved from src/libvaladoc/importer/girdocumentationimporter.vala with 100% similarity]
libvaladoc/importer/internalidregistrar.vala [moved from src/libvaladoc/importer/internalidregistrar.vala with 100% similarity]
libvaladoc/importer/valadocdocumentationimporter.vala [moved from src/libvaladoc/importer/valadocdocumentationimporter.vala with 100% similarity]
libvaladoc/importer/valadocdocumentationimporterscanner.vala [moved from src/libvaladoc/importer/valadocdocumentationimporterscanner.vala with 100% similarity]
libvaladoc/markupreader.vala [moved from src/libvaladoc/markupreader.vala with 100% similarity]
libvaladoc/markupsourcelocation.vala [moved from src/libvaladoc/markupsourcelocation.vala with 100% similarity]
libvaladoc/markuptokentype.vala [moved from src/libvaladoc/markuptokentype.vala with 100% similarity]
libvaladoc/markupwriter.vala [moved from src/libvaladoc/markupwriter.vala with 100% similarity]
libvaladoc/moduleloader.vala [moved from src/libvaladoc/moduleloader.vala with 100% similarity]
libvaladoc/parser/manyrule.vala [moved from src/libvaladoc/parser/manyrule.vala with 100% similarity]
libvaladoc/parser/oneofrule.vala [moved from src/libvaladoc/parser/oneofrule.vala with 100% similarity]
libvaladoc/parser/optionalrule.vala [moved from src/libvaladoc/parser/optionalrule.vala with 100% similarity]
libvaladoc/parser/parser.vala [moved from src/libvaladoc/parser/parser.vala with 100% similarity]
libvaladoc/parser/parsercallback.vala [moved from src/libvaladoc/parser/parsercallback.vala with 100% similarity]
libvaladoc/parser/rule.vala [moved from src/libvaladoc/parser/rule.vala with 100% similarity]
libvaladoc/parser/scanner.vala [moved from src/libvaladoc/parser/scanner.vala with 100% similarity]
libvaladoc/parser/sequencerule.vala [moved from src/libvaladoc/parser/sequencerule.vala with 100% similarity]
libvaladoc/parser/sourcelocation.vala [moved from src/libvaladoc/parser/sourcelocation.vala with 100% similarity]
libvaladoc/parser/stubrule.vala [moved from src/libvaladoc/parser/stubrule.vala with 100% similarity]
libvaladoc/parser/token.vala [moved from src/libvaladoc/parser/token.vala with 100% similarity]
libvaladoc/parser/tokentype.vala [moved from src/libvaladoc/parser/tokentype.vala with 100% similarity]
libvaladoc/settings.vala [moved from src/libvaladoc/settings.vala with 100% similarity]
libvaladoc/taglets/tagletdeprecated.vala [moved from src/libvaladoc/taglets/tagletdeprecated.vala with 100% similarity]
libvaladoc/taglets/tagletinheritdoc.vala [moved from src/libvaladoc/taglets/tagletinheritdoc.vala with 100% similarity]
libvaladoc/taglets/tagletinit.vala [moved from src/libvaladoc/taglets/tagletinit.vala with 100% similarity]
libvaladoc/taglets/tagletlink.vala [moved from src/libvaladoc/taglets/tagletlink.vala with 100% similarity]
libvaladoc/taglets/tagletparam.vala [moved from src/libvaladoc/taglets/tagletparam.vala with 100% similarity]
libvaladoc/taglets/tagletreturn.vala [moved from src/libvaladoc/taglets/tagletreturn.vala with 100% similarity]
libvaladoc/taglets/tagletsee.vala [moved from src/libvaladoc/taglets/tagletsee.vala with 100% similarity]
libvaladoc/taglets/tagletsince.vala [moved from src/libvaladoc/taglets/tagletsince.vala with 100% similarity]
libvaladoc/taglets/tagletthrows.vala [moved from src/libvaladoc/taglets/tagletthrows.vala with 100% similarity]
libvaladoc/valadoc-1.0.deps.in [moved from src/libvaladoc/valadoc-1.0.deps.in with 100% similarity]
libvaladoc/valadoc-1.0.pc.in [moved from src/libvaladoc/valadoc-1.0.pc.in with 100% similarity]
src/Makefile.am [deleted file]
src/driver/0.20.x/Makefile.am [deleted file]
src/driver/0.20.x/driver.vala [deleted file]
src/driver/0.20.x/treebuilder.vala [deleted file]
src/driver/0.22.x/Makefile.am [deleted file]
src/driver/0.22.x/driver.vala [deleted file]
src/driver/0.22.x/girwriter.vala [deleted file]
src/driver/0.22.x/initializerbuilder.vala [deleted file]
src/driver/0.22.x/symbolresolver.vala [deleted file]
src/driver/0.22.x/treebuilder.vala [deleted file]
src/driver/0.24.x/Makefile.am [deleted file]
src/driver/0.24.x/girwriter.vala [deleted file]
src/driver/0.24.x/initializerbuilder.vala [deleted file]
src/driver/0.24.x/symbolresolver.vala [deleted file]
src/driver/0.24.x/treebuilder.vala [deleted file]
src/driver/0.26.x/Makefile.am [deleted file]
src/driver/0.26.x/driver.vala [deleted file]
src/driver/0.26.x/girwriter.vala [deleted file]
src/driver/0.26.x/initializerbuilder.vala [deleted file]
src/driver/0.26.x/symbolresolver.vala [deleted file]
src/driver/0.26.x/treebuilder.vala [deleted file]
src/driver/0.28.x/Makefile.am [deleted file]
src/driver/0.28.x/driver.vala [deleted file]
src/driver/0.28.x/girwriter.vala [deleted file]
src/driver/0.28.x/initializerbuilder.vala [deleted file]
src/driver/0.28.x/symbolresolver.vala [deleted file]
src/driver/0.28.x/treebuilder.vala [deleted file]
src/driver/0.30.x/Makefile.am [deleted file]
src/driver/0.30.x/driver.vala [deleted file]
src/driver/0.30.x/girwriter.vala [deleted file]
src/driver/0.30.x/initializerbuilder.vala [deleted file]
src/driver/0.30.x/symbolresolver.vala [deleted file]
src/driver/0.30.x/treebuilder.vala [deleted file]
src/driver/0.32.x/Makefile.am [deleted file]
src/driver/0.32.x/driver.vala [deleted file]
src/driver/0.32.x/girwriter.vala [deleted file]
src/driver/0.32.x/initializerbuilder.vala [deleted file]
src/driver/0.32.x/symbolresolver.vala [deleted file]
src/driver/0.32.x/treebuilder.vala [deleted file]
src/driver/0.34.x/Makefile.am [deleted file]
src/driver/0.34.x/driver.vala [deleted file]
src/driver/0.34.x/girwriter.vala [deleted file]
src/driver/0.34.x/initializerbuilder.vala [deleted file]
src/driver/0.34.x/symbolresolver.vala [deleted file]
src/driver/0.34.x/treebuilder.vala [deleted file]
src/driver/0.36.x/Makefile.am [deleted file]
src/driver/0.36.x/driver.vala [deleted file]
src/driver/0.36.x/girwriter.vala [deleted file]
src/driver/0.36.x/initializerbuilder.vala [deleted file]
src/driver/0.36.x/symbolresolver.vala [deleted file]
src/driver/Makefile.am [deleted file]
src/vapi/config.vapi [deleted file]
src/vapi/libgvc.vapi [deleted file]
valadoc.doap [deleted file]
valadoc/Makefile.am [moved from src/valadoc/Makefile.am with 100% similarity]
valadoc/THANKS [moved from THANKS with 100% similarity]
valadoc/doclets/Makefile.am [moved from src/doclets/Makefile.am with 100% similarity]
valadoc/doclets/devhelp/Makefile.am [moved from src/doclets/devhelp/Makefile.am with 100% similarity]
valadoc/doclets/devhelp/doclet.vala [moved from src/doclets/devhelp/doclet.vala with 100% similarity]
valadoc/doclets/gtkdoc/Makefile.am [moved from src/doclets/gtkdoc/Makefile.am with 100% similarity]
valadoc/doclets/gtkdoc/commentconverter.vala [moved from src/doclets/gtkdoc/commentconverter.vala with 100% similarity]
valadoc/doclets/gtkdoc/dbus.vala [moved from src/doclets/gtkdoc/dbus.vala with 100% similarity]
valadoc/doclets/gtkdoc/doclet.vala [moved from src/doclets/gtkdoc/doclet.vala with 100% similarity]
valadoc/doclets/gtkdoc/gcomment.vala [moved from src/doclets/gtkdoc/gcomment.vala with 100% similarity]
valadoc/doclets/gtkdoc/generator.vala [moved from src/doclets/gtkdoc/generator.vala with 100% similarity]
valadoc/doclets/gtkdoc/utils.vala [moved from src/doclets/gtkdoc/utils.vala with 100% similarity]
valadoc/doclets/html/Makefile.am [moved from src/doclets/html/Makefile.am with 100% similarity]
valadoc/doclets/html/doclet.vala [moved from src/doclets/html/doclet.vala with 100% similarity]
valadoc/driver.vala [moved from src/driver/0.24.x/driver.vala with 100% similarity]
valadoc/girwriter.vala [moved from src/driver/0.20.x/girwriter.vala with 100% similarity]
valadoc/icons/Makefile.am [moved from icons/Makefile.am with 100% similarity]
valadoc/icons/abstractclass.png [moved from icons/abstractclass.png with 100% similarity]
valadoc/icons/abstractmethod.png [moved from icons/abstractmethod.png with 100% similarity]
valadoc/icons/abstractproperty.png [moved from icons/abstractproperty.png with 100% similarity]
valadoc/icons/class.png [moved from icons/class.png with 100% similarity]
valadoc/icons/coll_close.png [moved from icons/coll_close.png with 100% similarity]
valadoc/icons/coll_open.png [moved from icons/coll_open.png with 100% similarity]
valadoc/icons/constant.png [moved from icons/constant.png with 100% similarity]
valadoc/icons/constructor.png [moved from icons/constructor.png with 100% similarity]
valadoc/icons/delegate.png [moved from icons/delegate.png with 100% similarity]
valadoc/icons/devhelpstyle.css [moved from icons/devhelpstyle.css with 100% similarity]
valadoc/icons/enum.png [moved from icons/enum.png with 100% similarity]
valadoc/icons/enumvalue.png [moved from icons/enumvalue.png with 100% similarity]
valadoc/icons/errorcode.png [moved from icons/errorcode.png with 100% similarity]
valadoc/icons/errordomain.png [moved from icons/errordomain.png with 100% similarity]
valadoc/icons/field.png [moved from icons/field.png with 100% similarity]
valadoc/icons/interface.png [moved from icons/interface.png with 100% similarity]
valadoc/icons/method.png [moved from icons/method.png with 100% similarity]
valadoc/icons/namespace.png [moved from icons/namespace.png with 100% similarity]
valadoc/icons/package.png [moved from icons/package.png with 100% similarity]
valadoc/icons/packages.png [moved from icons/packages.png with 100% similarity]
valadoc/icons/property.png [moved from icons/property.png with 100% similarity]
valadoc/icons/scripts.js [moved from icons/scripts.js with 100% similarity]
valadoc/icons/signal.png [moved from icons/signal.png with 100% similarity]
valadoc/icons/staticmethod.png [moved from icons/staticmethod.png with 100% similarity]
valadoc/icons/struct.png [moved from icons/struct.png with 100% similarity]
valadoc/icons/style.css [moved from icons/style.css with 100% similarity]
valadoc/icons/tip.png [moved from icons/tip.png with 100% similarity]
valadoc/icons/virtualmethod.png [moved from icons/virtualmethod.png with 100% similarity]
valadoc/icons/virtualproperty.png [moved from icons/virtualproperty.png with 100% similarity]
valadoc/icons/warning.png [moved from icons/warning.png with 100% similarity]
valadoc/icons/wikistyle.css [moved from icons/wikistyle.css with 100% similarity]
valadoc/initializerbuilder.vala [moved from src/driver/0.20.x/initializerbuilder.vala with 100% similarity]
valadoc/symbolresolver.vala [moved from src/driver/0.20.x/symbolresolver.vala with 100% similarity]
valadoc/tests/Makefile.am [moved from tests/Makefile.am with 100% similarity]
valadoc/tests/drivers/api-test.data.vapi [moved from tests/drivers/api-test.data.vapi with 100% similarity]
valadoc/tests/drivers/driver-0-20.vala [moved from tests/drivers/driver-0-20.vala with 100% similarity]
valadoc/tests/drivers/driver-0-22.vala [moved from tests/drivers/driver-0-22.vala with 100% similarity]
valadoc/tests/drivers/driver-0-24.vala [moved from tests/drivers/driver-0-24.vala with 100% similarity]
valadoc/tests/drivers/driver-0-26.vala [moved from tests/drivers/driver-0-26.vala with 100% similarity]
valadoc/tests/drivers/driver-0-28.vala [moved from tests/drivers/driver-0-28.vala with 100% similarity]
valadoc/tests/drivers/driver-0-30.vala [moved from tests/drivers/driver-0-30.vala with 100% similarity]
valadoc/tests/drivers/driver-0-32.vala [moved from tests/drivers/driver-0-32.vala with 100% similarity]
valadoc/tests/drivers/driver-0-34.vala [moved from tests/drivers/driver-0-34.vala with 100% similarity]
valadoc/tests/drivers/driver-0-36.vala [moved from tests/drivers/driver-0-36.vala with 100% similarity]
valadoc/tests/drivers/generic-api-test.vala [moved from tests/drivers/generic-api-test.vala with 100% similarity]
valadoc/tests/libvaladoc/errorreporter.vala [moved from tests/libvaladoc/errorreporter.vala with 100% similarity]
valadoc/tests/libvaladoc/gtkdoc-scanner.vala [moved from tests/libvaladoc/gtkdoc-scanner.vala with 100% similarity]
valadoc/tests/libvaladoc/markupreader.vala [moved from tests/libvaladoc/markupreader.vala with 100% similarity]
valadoc/tests/libvaladoc/parser/generic-scanner.vala [moved from tests/libvaladoc/parser/generic-scanner.vala with 100% similarity]
valadoc/tests/libvaladoc/parser/manyrule.vala [moved from tests/libvaladoc/parser/manyrule.vala with 100% similarity]
valadoc/tests/libvaladoc/parser/oneofrule.vala [moved from tests/libvaladoc/parser/oneofrule.vala with 100% similarity]
valadoc/tests/libvaladoc/parser/optionalrule.vala [moved from tests/libvaladoc/parser/optionalrule.vala with 100% similarity]
valadoc/tests/libvaladoc/parser/sequencerule.vala [moved from tests/libvaladoc/parser/sequencerule.vala with 100% similarity]
valadoc/tests/libvaladoc/parser/stubrule.vala [moved from tests/libvaladoc/parser/stubrule.vala with 100% similarity]
valadoc/tests/testrunner.sh [moved from tests/testrunner.sh with 100% similarity]
valadoc/treebuilder.vala [moved from src/driver/0.36.x/treebuilder.vala with 100% similarity]
valadoc/valadoc.vala [moved from src/valadoc/valadoc.vala with 100% similarity]

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index b31f516..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Makefile.in
-Makefile
-*~
-*.o
-*.lo
-*.la
-*.c
-*.h
-*.stamp
-*.gir
-*.vapi
-*.deps
-.deps
-.libs
-.dirstamp
-
-config.*
-aclocal.m4
-autom4te.cache
-build-aux
-ChangeLog
-configure
-depcomp
-libtool
-install-sh
-m4
-missing
-ltmain.sh
-ylwrap
-compile
-stamp-h1
-*.pc
-
-src/valadoc/valadoc
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644 (file)
index 00dc670..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Florian Brosch <flo.brosch@gmail.com>
diff --git a/COPYING b/COPYING
deleted file mode 100644 (file)
index 08ddefd..0000000
--- a/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                   GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                           NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index 8b82ade..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,291 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
-
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
-
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/MAINTAINERS b/MAINTAINERS
deleted file mode 100644 (file)
index 53f5dc2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Florian Brosch
-E-mail: flo.brosch@gmail.com
-Userid: flobrosch
-
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644 (file)
index 0c214ce..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# Makefile.am
-
-NULL = 
-
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-SUBDIRS = src \
-          tests \
-          icons \
-          doc \
-          $(NULL)
-
-
-.PHONY: test
-test:
-       cd tests && $(MAKE) $(AM_MAKEFLAGS) check
-
diff --git a/NEWS b/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/README b/README
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755 (executable)
index 944efd3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-test -n "$srcdir" || srcdir=`dirname "$0"`
-test -n "$srcdir" || srcdir=.
-
-olddir=`pwd`
-cd $srcdir
-
-AUTORECONF=`which autoreconf`
-if test -z $AUTORECONF; then
-        echo "*** No autoreconf found, please install it ***"
-        exit 1
-fi
-
-autoreconf --force --install --verbose
-
-cd $olddir
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644 (file)
index ceeba40..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-dnl configure.in
-AC_PREREQ([2.65])
-AC_INIT([valadoc],[0.36.0],
-       [https://bugzilla.gnome.org/browse.cgi?product=valadoc],
-       [valadoc],
-       [https://wiki.gnome.org/Projects/Valadoc])
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_SRCDIR([Makefile.am])
-AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_SRCDIR([configure.ac])
-AM_INIT_AUTOMAKE([1.11 foreign tar-ustar dist-xz no-dist-gzip subdir-objects])
-
-AM_MAINTAINER_MODE([enable])
-
-AC_PROG_CC
-AC_PROG_INSTALL
-LT_INIT([disable-static])
-PKG_PROG_PKG_CONFIG([0.21])
-
-AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
-AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HELP2MAN = xhelp2man])
-
-##
-## Settings:
-##
-
-VALA_REQUIRED=0.19.0
-LIBGEE_REQUIRED=0.19.91
-LIBGVC_REQUIRED=2.16
-GLIB_REQUIRED=2.24.0
-LIBGDKPIXBUF_REQUIRED=2.0
-
-
-
-##
-## Dependencies:
-##
-
-AC_SUBST(VALAFLAGS)
-AM_PROG_VALAC([$VALA_REQUIRED])
-
-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
-
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
-
-PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
-
-PKG_CHECK_MODULES(LIBGEE, gee-0.8 >= $LIBGEE_REQUIRED)
-
-
-AC_MSG_CHECKING([for CGRAPH])
-valadoc_tmp_LIBADD="$LIBADD"
-valadoc_tmp_CFLAGS="$CFLAGS"
-LIBADD="$LIBADD $LIBGVC_LIBS"
-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
-AC_RUN_IFELSE(
-       [AC_LANG_SOURCE([
-               #include <gvc.h>
-
-               int main(void) {
-                       #ifdef WITH_CGRAPH
-                               return 0;
-                       #else
-                               return -1;
-                       #endif
-               }
-       ])], [
-               AC_MSG_RESULT([yes])
-               VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
-               have_cgraph=yes
-       ], [
-               AC_MSG_RESULT([no])
-               have_cgraph=no
-       ]
-)
-LIBADD="$valadoc_tmp_LIBADD"
-CFLAGS="$valadoc_tmp_CFLAGS"
-AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
-
-
-##
-## Drivers:
-##
-
-PKG_CHECK_MODULES(LIBVALA_0_36_X, libvala-0.36 > 0.35.0, have_libvala_0_36_x="yes", have_libvala_0_36_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_36_X, test "$have_libvala_0_36_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_34_X, libvala-0.34 > 0.33.0, have_libvala_0_34_x="yes", have_libvala_0_34_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_34_X, test "$have_libvala_0_34_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_32_X, libvala-0.32 > 0.31.0, have_libvala_0_32_x="yes", have_libvala_0_32_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_32_X, test "$have_libvala_0_32_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_30_X, libvala-0.30 > 0.29.0, have_libvala_0_30_x="yes", have_libvala_0_30_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_30_X, test "$have_libvala_0_30_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_28_X, libvala-0.28 > 0.27.0, have_libvala_0_28_x="yes", have_libvala_0_28_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_28_X, test "$have_libvala_0_28_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_26_X, libvala-0.26 > 0.25.2, have_libvala_0_26_x="yes", have_libvala_0_26_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_26_X, test "$have_libvala_0_26_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_24_X, libvala-0.24 > 0.23.1, have_libvala_0_24_x="yes", have_libvala_0_24_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_24_X, test "$have_libvala_0_24_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_22_X, libvala-0.22 >= 0.21.0, have_libvala_0_22_x="yes", have_libvala_0_22_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_22_X, test "$have_libvala_0_22_x" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_20_X, libvala-0.20 >= 0.19.0, have_libvala_0_20_x="yes", have_libvala_0_20_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_20_X, test "$have_libvala_0_20_x" = "yes")
-
-
-AC_CONFIG_FILES([
-Makefile
-src/libvaladoc/valadoc-1.0.pc
-src/libvaladoc/valadoc-1.0.deps
-src/Makefile
-icons/Makefile
-doc/Makefile
-src/libvaladoc/Makefile
-src/driver/Makefile
-src/driver/0.20.x/Makefile
-src/driver/0.22.x/Makefile
-src/driver/0.24.x/Makefile
-src/driver/0.26.x/Makefile
-src/driver/0.28.x/Makefile
-src/driver/0.30.x/Makefile
-src/driver/0.32.x/Makefile
-src/driver/0.34.x/Makefile
-src/driver/0.36.x/Makefile
-src/doclets/Makefile
-src/doclets/html/Makefile
-src/doclets/devhelp/Makefile
-src/doclets/gtkdoc/Makefile
-src/valadoc/Makefile
-tests/Makefile
-])
-
-AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644 (file)
index 2ae874a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-dist_man_MANS = valadoc.1
-
-EXTRA_DIST = valadoc.h2m
-
-if HAVE_HELP2MAN
-manpages: valadoc.1
-       @rm $^
-       $(MAKE) $(AM_MAKEFLAGS) $^
-
-valadoc.1:
-       $(HELP2MAN) $(top_builddir)/src/valadoc/valadoc \
-               --include $(srcdir)/valadoc.h2m \
-               --libtool --no-info \
-               --output=$@
-endif
-
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644 (file)
index 63efb92..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-NULL =
-
-SUBDIRS = \
-       libvaladoc \
-       valadoc \
-       doclets \
-       driver \
-       $(NULL)
-
-EXTRA_DIST = \
-       vapi/config.vapi \
-       vapi/libgvc.vapi \
-       $(NULL)
-
diff --git a/src/driver/0.20.x/Makefile.am b/src/driver/0.20.x/Makefile.am
deleted file mode 100644 (file)
index cafd9c2..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.20 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_20_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.20.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.20 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_20_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.20.x/driver.vala b/src/driver/0.20.x/driver.vala
deleted file mode 100644 (file)
index 6bed3b9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.20.x/treebuilder.vala b/src/driver/0.20.x/treebuilder.vala
deleted file mode 100644 (file)
index 59df9b6..0000000
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_array ((Vala.ArrayType) vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 20; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 12;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusServerModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusServerModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.22.x/Makefile.am b/src/driver/0.22.x/Makefile.am
deleted file mode 100644 (file)
index 4f114b7..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.22 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_22_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.22.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.22 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_22_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.22.x/driver.vala b/src/driver/0.22.x/driver.vala
deleted file mode 100644 (file)
index 6bed3b9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.22.x/girwriter.vala b/src/driver/0.22.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.22.x/initializerbuilder.vala b/src/driver/0.22.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.22.x/symbolresolver.vala b/src/driver/0.22.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.22.x/treebuilder.vala b/src/driver/0.22.x/treebuilder.vala
deleted file mode 100644 (file)
index bb4ef56..0000000
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_array ((Vala.ArrayType) vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 22; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 12;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusServerModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusServerModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.24.x/Makefile.am b/src/driver/0.24.x/Makefile.am
deleted file mode 100644 (file)
index 1331ac5..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.24 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_24_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.24.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.24 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_24_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.24.x/girwriter.vala b/src/driver/0.24.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.24.x/initializerbuilder.vala b/src/driver/0.24.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.24.x/symbolresolver.vala b/src/driver/0.24.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.24.x/treebuilder.vala b/src/driver/0.24.x/treebuilder.vala
deleted file mode 100644 (file)
index 5911097..0000000
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_array ((Vala.ArrayType) vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 24; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 12;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusServerModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusServerModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusServerModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.26.x/Makefile.am b/src/driver/0.26.x/Makefile.am
deleted file mode 100644 (file)
index bff3f52..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.26 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_26_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.26.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.26 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_26_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.26.x/driver.vala b/src/driver/0.26.x/driver.vala
deleted file mode 100644 (file)
index 902d28d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.26.x/girwriter.vala b/src/driver/0.26.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.26.x/initializerbuilder.vala b/src/driver/0.26.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.26.x/symbolresolver.vala b/src/driver/0.26.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.26.x/treebuilder.vala b/src/driver/0.26.x/treebuilder.vala
deleted file mode 100644 (file)
index 53440a1..0000000
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 26; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 12;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.28.x/Makefile.am b/src/driver/0.28.x/Makefile.am
deleted file mode 100644 (file)
index 4398045..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.28 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_28_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.28.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.28 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_28_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.28.x/driver.vala b/src/driver/0.28.x/driver.vala
deleted file mode 100644 (file)
index 902d28d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.28.x/girwriter.vala b/src/driver/0.28.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.28.x/initializerbuilder.vala b/src/driver/0.28.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.28.x/symbolresolver.vala b/src/driver/0.28.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.28.x/treebuilder.vala b/src/driver/0.28.x/treebuilder.vala
deleted file mode 100644 (file)
index 4d2865e..0000000
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 28; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 24;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.30.x/Makefile.am b/src/driver/0.30.x/Makefile.am
deleted file mode 100644 (file)
index fac86d6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.30 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_30_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.30.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.30 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_30_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.30.x/driver.vala b/src/driver/0.30.x/driver.vala
deleted file mode 100644 (file)
index 902d28d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.30.x/girwriter.vala b/src/driver/0.30.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.30.x/initializerbuilder.vala b/src/driver/0.30.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.30.x/symbolresolver.vala b/src/driver/0.30.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.30.x/treebuilder.vala b/src/driver/0.30.x/treebuilder.vala
deleted file mode 100644 (file)
index fbf9429..0000000
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 30; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 24;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.32.x/Makefile.am b/src/driver/0.32.x/Makefile.am
deleted file mode 100644 (file)
index 3803a69..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.32 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_32_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.32.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.32 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_32_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.32.x/driver.vala b/src/driver/0.32.x/driver.vala
deleted file mode 100644 (file)
index 902d28d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.32.x/girwriter.vala b/src/driver/0.32.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.32.x/initializerbuilder.vala b/src/driver/0.32.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.32.x/symbolresolver.vala b/src/driver/0.32.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.32.x/treebuilder.vala b/src/driver/0.32.x/treebuilder.vala
deleted file mode 100644 (file)
index 5b9c5ea..0000000
+++ /dev/null
@@ -1,1541 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Version") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               if ((tmp = att.args.get ("deprecated")) != null) {
-                                       new_attribute.add_boolean ("deprecated", bool.parse (tmp), att);
-                               }
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-                               if ((tmp = att.args.get ("deprecated_since")) != null) {
-                                       new_attribute.add_string ("deprecated_since", tmp, att);
-                                       if (att.args.get ("deprecated") == null) {
-                                               new_attribute.add_boolean ("deprecated", true, att);
-                                       }
-                               }
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 32; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 24;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.34.x/Makefile.am b/src/driver/0.34.x/Makefile.am
deleted file mode 100644 (file)
index 93626cf..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.34 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_34_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.34.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.34 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_34_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.34.x/driver.vala b/src/driver/0.34.x/driver.vala
deleted file mode 100644 (file)
index 902d28d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.34.x/girwriter.vala b/src/driver/0.34.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.34.x/initializerbuilder.vala b/src/driver/0.34.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.34.x/symbolresolver.vala b/src/driver/0.34.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/0.34.x/treebuilder.vala b/src/driver/0.34.x/treebuilder.vala
deleted file mode 100644 (file)
index 9931efd..0000000
+++ /dev/null
@@ -1,1541 +0,0 @@
-/* treebuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-using Gee;
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
-       private ArrayList<PackageMetaData> packages = new ArrayList<PackageMetaData> ();
-       private PackageMetaData source_package;
-
-       private HashMap<Vala.SourceFile, SourceFile> files = new HashMap<Vala.SourceFile, SourceFile> ();
-       private HashMap<Vala.Symbol, Symbol> symbol_map = new HashMap<Vala.Symbol, Symbol> ();
-
-       private ErrorReporter reporter;
-       private Settings settings;
-
-       private Api.Node current_node;
-       private Api.Tree tree;
-
-       private Valadoc.Api.Class glib_error = null;
-
-
-       //
-       // Accessors
-       //
-
-       public Api.Class get_glib_error () {
-               return glib_error;
-       }
-
-       public HashMap<Vala.Symbol, Symbol> get_symbol_map () {
-               return symbol_map;
-       }
-
-
-       //
-       //
-       //
-
-       private class PackageMetaData {
-               public Package package;
-               public HashMap<Vala.Namespace, Namespace> namespaces = new HashMap<Vala.Namespace, Namespace> ();
-               public ArrayList<Vala.SourceFile> files = new ArrayList<Vala.SourceFile> ();
-
-               public PackageMetaData (Package package) {
-                       this.package = package;
-               }
-
-               public Namespace get_namespace (Vala.Namespace vns, SourceFile file) {
-                       Namespace? ns = namespaces.get (vns);
-                       if (ns != null) {
-                               return ns;
-                       }
-
-                       // find documentation comment if existing:
-                       SourceComment? comment = null;
-                       if (vns.source_reference != null) {
-                               foreach (Vala.Comment c in vns.get_comments()) {
-                                       if (c.source_reference.file == file.data ||
-                                               (c.source_reference.file.file_type == Vala.SourceFileType.SOURCE
-                                                && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
-                                       ) {
-                                               Vala.SourceReference pos = c.source_reference;
-                                               if (c is Vala.GirComment) {
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.begin.line,
-                                                                                                                       pos.begin.column,
-                                                                                                                       pos.end.line,
-                                                                                                                       pos.end.column);
-                                               } else {
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.begin.line,
-                                                                                                                pos.begin.column,
-                                                                                                                pos.end.line,
-                                                                                                                pos.end.column);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // find parent if existing
-                       var parent_vns = vns.parent_symbol;
-
-                       if (parent_vns == null) {
-                               ns = new Namespace (package, file, vns.name, comment, vns);
-                               package.add_child (ns);
-                       } else {
-                               Namespace parent_ns = get_namespace ((Vala.Namespace) parent_vns, file);
-                               ns = new Namespace (parent_ns, file, vns.name, comment, vns);
-                               parent_ns.add_child (ns);
-                       }
-
-                       namespaces.set (vns, ns);
-                       return ns;
-               }
-
-               public void register_source_file (Vala.SourceFile file) {
-                       files.add (file);
-               }
-
-               public bool is_package_for_file (Vala.SourceFile source_file) {
-                       if (source_file.file_type == Vala.SourceFileType.SOURCE && !package.is_package) {
-                               return true;
-                       }
-
-                       return files.contains (source_file);
-               }
-       }
-
-
-       //
-       // Type constructor translation helpers:
-       //
-
-       private Pointer create_pointer (Vala.PointerType vtyperef, Item parent, Api.Node caller) {
-               Pointer ptr = new Pointer (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.base_type;
-               if (vntype is Vala.PointerType) {
-                       ptr.data_type = create_pointer ((Vala.PointerType) vntype, ptr, caller);
-               } else if (vntype is Vala.ArrayType) {
-                       ptr.data_type = create_array ((Vala.ArrayType) vntype, ptr, caller);
-               } else {
-                       ptr.data_type = create_type_reference (vntype, ptr, caller);
-               }
-
-               return ptr;
-       }
-
-       private Api.Array create_array (Vala.ArrayType vtyperef, Item parent, Api.Node caller) {
-               Api.Array arr = new Api.Array (parent, vtyperef);
-
-               Vala.DataType vntype = vtyperef.element_type;
-               if (vntype is Vala.ArrayType) {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               } else {
-                       arr.data_type = create_type_reference (vntype, arr, caller);
-               }
-
-               return arr;
-       }
-
-       private TypeReference create_type_reference (Vala.DataType? vtyperef, Item parent, Api.Node caller) {
-               bool is_nullable = vtyperef != null
-                       && vtyperef.nullable
-                       && !(vtyperef is Vala.GenericType)
-                       && !(vtyperef is Vala.PointerType);
-               string? signature = (vtyperef != null
-                       && vtyperef.data_type != null)? Vala.GVariantModule.get_dbus_signature (vtyperef.data_type) : null;
-               bool pass_ownership = type_reference_pass_ownership (vtyperef);
-               Ownership ownership = get_type_reference_ownership (vtyperef);
-               bool is_dynamic = vtyperef != null && vtyperef.is_dynamic;
-
-               TypeReference type_ref = new TypeReference (parent,
-                                                                                                       ownership,
-                                                                                                       pass_ownership,
-                                                                                                       is_dynamic,
-                                                                                                       is_nullable,
-                                                                                                       signature,
-                                                                                                       vtyperef);
-
-               if (vtyperef is Vala.PointerType) {
-                       type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.ArrayType) {
-                       type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               //} else if (vtyperef is Vala.GenericType) {
-               //      type_ref.data_type = new TypeParameter (caller,
-               //                                                                                      caller.get_source_file (),
-               //                                                                                      ((Vala.GenericType) vtyperef).type_parameter.name,
-               //                                                                                      vtyperef);
-               }
-
-               // type parameters:
-               if (vtyperef != null) {
-                       foreach (Vala.DataType vdtype in vtyperef.get_type_arguments ()) {
-                               var type_param = create_type_reference (vdtype, type_ref, caller);
-                               type_ref.add_type_argument (type_param);
-                       }
-               }
-
-               return type_ref;
-       }
-
-
-
-       //
-       // Translation helpers:
-       //
-
-       private void process_attributes (Api.Symbol parent, GLib.List<Vala.Attribute> lst) {
-               // attributes without arguments:
-               string[] attributes = {
-                               "ReturnsModifiedPointer",
-                               "DestroysInstance",
-                               "GenericAccessors",
-                               "NoAccessorMethod",
-                               "NoArrayLength",
-                               "Experimental",
-                               "Diagnostics",
-                               "PrintfFormat",
-                               "PointerType",
-                               "ScanfFormat",
-                               "ThreadLocal",
-                               "SimpleType",
-                               "HasEmitter",
-                               "ModuleInit",
-                               "NoWrapper",
-                               "Immutable",
-                               "ErrorBase",
-                               "NoReturn",
-                               "NoThrow",
-                               "Compact",
-                               "Assert",
-                               "Flags"
-                       };
-
-               string? tmp = "";
-
-               foreach (Vala.Attribute att in lst) {
-                       if (att.name == "CCode" && (tmp = att.args.get ("has_target")) != null && tmp == "false") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               new_attribute.add_boolean ("has_target", false, att);
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Version") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               if ((tmp = att.args.get ("deprecated")) != null) {
-                                       new_attribute.add_boolean ("deprecated", bool.parse (tmp), att);
-                               }
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-                               if ((tmp = att.args.get ("deprecated_since")) != null) {
-                                       new_attribute.add_string ("deprecated_since", tmp, att);
-                                       if (att.args.get ("deprecated") == null) {
-                                               new_attribute.add_boolean ("deprecated", true, att);
-                                       }
-                               }
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name == "Deprecated") {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               if ((tmp = att.args.get ("since")) != null) {
-                                       new_attribute.add_string ("since", tmp, att);
-                               }
-                               if ((tmp = att.args.get ("replacement")) != null) {
-                                       new_attribute.add_string ("replacement", tmp, att);
-                               }
-                               parent.add_attribute (new_attribute);
-                       } else if (att.name in attributes) {
-                               Attribute new_attribute = new Attribute (parent, parent.get_source_file (), att.name, att);
-                               parent.add_attribute (new_attribute);
-                       }
-               }
-       }
-
-       private string? get_ccode_type_id (Vala.CodeNode node) {
-               return Vala.CCodeBaseModule.get_ccode_type_id (node);
-       }
-
-       private bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.is_reference_counting (sym);
-       }
-
-       private string? get_ref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
-       }
-
-       private string? get_unref_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
-       }
-
-       private string? get_finalize_function_name (Vala.Class element) {
-               if (!element.is_fundamental ()) {
-                       return null;
-               }
-
-               return "%s_finalize".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_free_function_name (Vala.Class element) {
-               if (!element.is_compact) {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_free_function (element);
-       }
-
-       private string? get_finish_name (Vala.Method m) {
-               return Vala.CCodeBaseModule.get_ccode_finish_name (m);
-       }
-
-       private string? get_take_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
-       }
-
-       private string? get_get_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
-       }
-
-       private string? get_set_value_function (Vala.Class sym) {
-               return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
-       }
-
-
-       private string? get_param_spec_function (Vala.CodeNode sym) {
-               return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
-       }
-
-       private string? get_dup_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
-       }
-
-       private string? get_copy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_copy_function (sym);
-       }
-
-       private string? get_destroy_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_destroy_function (sym);
-       }
-
-       private string? get_free_function (Vala.TypeSymbol sym) {
-               return Vala.CCodeBaseModule.get_ccode_free_function (sym);
-       }
-
-       private string? get_nick (Vala.Property prop) {
-               return Vala.CCodeBaseModule.get_ccode_nick (prop);
-       }
-
-       private string? get_cname (Vala.Symbol symbol) {
-               return Vala.CCodeBaseModule.get_ccode_name (symbol);
-       }
-
-       private SourceComment? create_comment (Vala.Comment? comment) {
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       if (comment is Vala.GirComment) {
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.begin.line,
-                                                                                               pos.begin.column,
-                                                                                               pos.end.line,
-                                                                                               pos.end.column);
-                               if (((Vala.GirComment) comment).return_content != null) {
-                                       Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.begin.line,
-                                                                                                                       return_pos.begin.column,
-                                                                                                                       return_pos.end.line,
-                                                                                                                       return_pos.end.column);
-                               }
-
-                               Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
-                               while (it.next ()) {
-                                       Vala.Comment vala_param = it.get_value ();
-                                       Vala.SourceReference param_pos = vala_param.source_reference;
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.begin.line,
-                                                                                                                  param_pos.begin.column,
-                                                                                                                  param_pos.end.line,
-                                                                                                                  param_pos.end.column);
-                                       tmp.add_parameter_content (it.get_key (), param_comment);
-                               }
-                               return tmp;
-                       } else {
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.begin.line,
-                                                                                 pos.begin.column,
-                                                                                 pos.end.line,
-                                                                                 pos.end.column);
-                       }
-               }
-
-               return null;
-       }
-
-       private string get_method_name (Vala.Method element) {
-               if (element is Vala.CreationMethod) {
-                       if (element.name == ".new") {
-                               return element.parent_symbol.name;
-                       } else {
-                               return element.parent_symbol.name + "." + element.name;
-                       }
-               }
-
-               return element.name;
-       }
-
-       private string? get_quark_macro_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-       }
-
-       private string? get_private_cname (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               string? cname = get_cname (element);
-               return (cname != null)? cname + "Private" : null;
-       }
-
-       private string? get_class_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_GET_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_class_type_macro_name (Vala.Class element) {
-               if (element.is_compact) {
-                       return null;
-               }
-
-               return "%s_CLASS".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string? get_is_type_macro_name (Vala.TypeSymbol element) {
-               string? name = Vala.CCodeBaseModule.get_ccode_type_check_function (element);
-               return (name != null && name != "")? name : null;
-       }
-
-       private string? get_is_class_type_macro_name (Vala.TypeSymbol element) {
-               string? name = get_is_type_macro_name (element);
-               return (name != null)? name + "_CLASS" : null;
-       }
-
-       private string? get_type_function_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return "%s_get_type".printf (Vala.CCodeBaseModule.get_ccode_lower_case_name (element, null));
-       }
-
-       private string? get_type_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && ((Vala.Class) element).is_compact)
-                       || element is Vala.ErrorDomain
-                       || element is Vala.Delegate)
-               {
-                       return null;
-               }
-
-               return Vala.CCodeBaseModule.get_ccode_type_id (element);
-       }
-
-       private string? get_type_cast_macro_name (Vala.TypeSymbol element) {
-               if ((element is Vala.Class
-                       && !((Vala.Class) element).is_compact)
-                       || element is Vala.Interface)
-               {
-                       return Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null);
-               } else {
-                       return null;
-               }
-       }
-
-       private string? get_interface_macro_name (Vala.Interface element) {
-               return "%s_GET_INTERFACE".printf (Vala.CCodeBaseModule.get_ccode_upper_case_name (element, null));
-       }
-
-       private string get_quark_function_name (Vala.ErrorDomain element) {
-               return Vala.CCodeBaseModule.get_ccode_lower_case_prefix (element) + "quark";
-       }
-
-       private PackageMetaData? get_package_meta_data (Package pkg) {
-               foreach (PackageMetaData data in packages) {
-                       if (data.package == pkg) {
-                               return data;
-                       }
-               }
-
-               return null;
-       }
-
-       private PackageMetaData register_package (Package package) {
-               PackageMetaData meta_data = new PackageMetaData (package);
-               tree.add_package (package);
-               packages.add (meta_data);
-               return meta_data;
-       }
-
-       private SourceFile register_source_file (PackageMetaData meta_data, Vala.SourceFile source_file) {
-               SourceFile file = new SourceFile (meta_data.package,
-                                                                                 source_file.get_relative_filename (),
-                                                                                 source_file.get_csource_filename (),
-                                                                                 source_file);
-               files.set (source_file, file);
-
-               meta_data.register_source_file (source_file);
-               return file;
-       }
-
-       private SourceFile? get_source_file (Vala.Symbol symbol) {
-               Vala.SourceReference source_ref = symbol.source_reference;
-               if (source_ref == null) {
-                       return null;
-               }
-
-               SourceFile? file = files.get (source_ref.file);
-               assert (file != null);
-               return file;
-       }
-
-       private Package? find_package_for_file (Vala.SourceFile source_file) {
-               foreach (PackageMetaData pkg in this.packages) {
-                       if (pkg.is_package_for_file (source_file)) {
-                               return pkg.package;
-                       }
-               }
-
-               return null;
-       }
-
-
-       private Namespace get_namespace (Package pkg, Vala.Symbol symbol, SourceFile? file) {
-               // Find the closest namespace in our vala-tree
-               Vala.Symbol namespace_symbol = symbol;
-               while (!(namespace_symbol is Vala.Namespace)) {
-                       namespace_symbol = namespace_symbol.parent_symbol;
-               }
-
-               PackageMetaData? meta_data = get_package_meta_data (pkg);
-               assert (meta_data != null);
-
-               return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
-       }
-
-       private MethodBindingType get_method_binding_type (Vala.Method element) {
-               if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.is_abstract) {
-                       return MethodBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return MethodBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return MethodBindingType.OVERRIDE;
-               } else if (element.is_inline) {
-                       return MethodBindingType.INLINE;
-               } else if (element.binding != Vala.MemberBinding.INSTANCE) {
-                       return MethodBindingType.STATIC;
-               }
-               return MethodBindingType.UNMODIFIED;
-       }
-
-
-       private SymbolAccessibility get_access_modifier(Vala.Symbol symbol) {
-               switch (symbol.access) {
-               case Vala.SymbolAccessibility.PROTECTED:
-                       return SymbolAccessibility.PROTECTED;
-
-               case Vala.SymbolAccessibility.INTERNAL:
-                       return SymbolAccessibility.INTERNAL;
-
-               case Vala.SymbolAccessibility.PRIVATE:
-                       return SymbolAccessibility.PRIVATE;
-
-               case Vala.SymbolAccessibility.PUBLIC:
-                       return SymbolAccessibility.PUBLIC;
-
-               default:
-                       error ("Unknown symbol accessibility modifier found");
-               }
-       }
-
-       private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
-               if (element.construction) {
-                       if (element.writable) {
-                               return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
-                       }
-                       return PropertyAccessorType.CONSTRUCT;
-               } else if (element.writable) {
-                       return PropertyAccessorType.SET;
-               } else if (element.readable) {
-                       return PropertyAccessorType.GET;
-               }
-
-               error ("Unknown symbol accessibility type");
-       }
-
-       private bool type_reference_pass_ownership (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode? node = element.parent_node;
-               if (node == null) {
-                       return false;
-               }
-               if (node is Vala.Parameter) {
-                       return (((Vala.Parameter)node).direction == Vala.ParameterDirection.IN &&
-                               ((Vala.Parameter)node).variable_type.value_owned);
-               }
-               if (node is Vala.Property) {
-                       return ((Vala.Property)node).property_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       private bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       private bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
-       private Ownership get_type_reference_ownership (Vala.DataType? element) {
-               if (is_type_reference_owned (element)) {
-                       return Ownership.OWNED;
-               } else if (is_type_reference_weak (element)) {
-                       return Ownership.WEAK;
-               } else if (is_type_reference_unowned (element)) {
-                       return Ownership.UNOWNED;
-               }
-
-               return Ownership.DEFAULT;
-       }
-
-       private Ownership get_property_ownership (Vala.PropertyAccessor element) {
-               if (element.value_type.value_owned) {
-                       return Ownership.OWNED;
-               }
-
-               // the exact type (weak, unowned) does not matter
-               return Ownership.UNOWNED;
-       }
-
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
-       private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
-               if (element.direction == Vala.ParameterDirection.OUT) {
-                       return FormalParameterType.OUT;
-               } else if (element.direction == Vala.ParameterDirection.REF) {
-                       return FormalParameterType.REF;
-               } else if (element.direction == Vala.ParameterDirection.IN) {
-                       return FormalParameterType.IN;
-               }
-
-               error ("Unknown formal parameter type");
-       }
-
-
-       //
-       // Vala tree creation:
-       //
-
-       private string get_package_name (string path) {
-               string file_name = Path.get_basename (path);
-               return file_name.substring (0, file_name.last_index_of_char ('.'));
-       }
-
-       private bool add_package (Vala.CodeContext context, string pkg) {
-               // ignore multiple occurences of the same package
-               if (context.has_package (pkg)) {
-                       return true;
-               }
-
-               string vapi_name = pkg + ".vapi";
-               string gir_name = pkg + ".gir";
-               foreach (string source_file in settings.source_files) {
-                       string basename = Path.get_basename (source_file);
-                       if (basename == vapi_name || basename == gir_name) {
-                               return true;
-                       }
-               }
-
-
-               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
-               if (package_path == null) {
-                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
-                       return false;
-               }
-
-               context.add_package (pkg);
-
-               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
-               context.add_source_file (vfile);
-               Package vdpkg = new Package (pkg, true, null);
-               register_source_file (register_package (vdpkg), vfile);
-
-               add_deps (context, Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg)), pkg);
-               return true;
-       }
-
-       private void add_deps (Vala.CodeContext context, string file_path, string pkg_name) {
-               if (FileUtils.test (file_path, FileTest.EXISTS)) {
-                       try {
-                               string deps_content;
-                               ulong deps_len;
-                               FileUtils.get_contents (file_path, out deps_content, out deps_len);
-                               foreach (string dep in deps_content.split ("\n")) {
-                                       dep = dep.strip ();
-                                       if (dep != "") {
-                                               if (!add_package (context, dep)) {
-                                                       Vala.Report.error (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg_name));
-                                               }
-                                       }
-                               }
-                       } catch (FileError e) {
-                               Vala.Report.error (null, "Unable to read dependency file: %s".printf (e.message));
-                       }
-               }
-       }
-
-       /**
-        * Adds the specified packages to the list of used packages.
-        *
-        * @param context The code context
-        * @param packages a list of package names
-        */
-       private void add_depencies (Vala.CodeContext context, string[] packages) {
-               foreach (string package in packages) {
-                       if (!add_package (context, package)) {
-                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
-                       }
-               }
-       }
-
-       /**
-        * Add the specified source file to the context. Only .vala, .vapi, .gs,
-        * and .c files are supported.
-        */
-       private void add_documented_files (Vala.CodeContext context, string[] sources) {
-               if (sources == null) {
-                       return;
-               }
-
-               foreach (string source in sources) {
-                       if (FileUtils.test (source, FileTest.EXISTS)) {
-                               var rpath = realpath (source);
-                               if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, source_file);
-
-                                       if (context.profile == Vala.Profile.GOBJECT) {
-                                               // import the GLib namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       }
-
-                                       context.add_source_file (source_file);
-                               } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
-                                       string file_name = get_package_name (source);
-
-                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
-                                       context.add_source_file (vfile);
-
-                                       if (source_package == null) {
-                                               source_package = register_package (new Package (settings.pkg_name, false, null));
-                                       }
-
-                                       register_source_file (source_package, vfile);
-
-                                       add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
-                               } else if (source.has_suffix (".c")) {
-                                       context.add_c_source_file (rpath);
-                                       tree.add_external_c_files (rpath);
-                               } else {
-                                       Vala.Report.error (null, "%s is not a supported source file type. Only .vala, .vapi, .gs, and .c files are supported.".printf (source));
-                               }
-                       } else {
-                               Vala.Report.error (null, "%s not found".printf (source));
-                       }
-               }
-       }
-
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
-               // settings:
-               context.experimental = settings.experimental;
-               context.experimental_non_null = settings.experimental || settings.experimental_non_null;
-               context.vapi_directories = settings.vapi_directories;
-               context.report.enable_warnings = settings.verbose;
-               context.metadata_directories = settings.metadata_directories;
-               context.gir_directories = settings.gir_directories;
-
-               if (settings.basedir == null) {
-                       context.basedir = realpath (".");
-               } else {
-                       context.basedir = realpath (settings.basedir);
-               }
-
-               if (settings.directory != null) {
-                       context.directory = realpath (settings.directory);
-               } else {
-                       context.directory = context.basedir;
-               }
-
-
-               // add default packages:
-               if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
-                       context.profile = Vala.Profile.GOBJECT;
-                       context.add_define ("GOBJECT");
-               }
-
-
-               if (settings.defines != null) {
-                       foreach (string define in settings.defines) {
-                               context.add_define (define);
-                       }
-               }
-
-               for (int i = 2; i <= 34; i += 2) {
-                       context.add_define ("VALA_0_%d".printf (i));
-               }
-
-               if (context.profile == Vala.Profile.GOBJECT) {
-                       int glib_major = 2;
-                       int glib_minor = 24;
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       if (settings.target_glib != null && settings.target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
-                               Vala.Report.error (null, "Invalid format for --target-glib");
-                       }
-
-                       context.target_glib_major = glib_major;
-                       context.target_glib_minor = glib_minor;
-                       if (context.target_glib_major != 2) {
-                               Vala.Report.error (null, "This version of valac only supports GLib 2");
-                       }
-
-                       for (int i = 16; i <= glib_minor; i += 2) {
-                               context.add_define ("GLIB_2_%d".printf (i));
-                       }
-
-                       // default packages
-                       if (!this.add_package (context, "glib-2.0")) { //
-                               Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories");
-                       }
-
-                       if (!this.add_package (context, "gobject-2.0")) { //
-                               Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
-                       }
-               }
-
-               // add user defined files:
-               add_depencies (context, settings.packages);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-               add_documented_files (context, settings.source_files);
-               if (reporter.errors > 0) {
-                       return context;
-               }
-
-
-               // parse vala-code:
-               Vala.Parser parser = new Vala.Parser ();
-
-               parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               // parse gir:
-               Vala.GirParser gir_parser = new Vala.GirParser ();
-
-               gir_parser.parse (context);
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-
-
-               // check context:
-               context.check ();
-               if (context.report.get_errors () > 0) {
-                       return context;
-               }
-
-               return context;
-       }
-
-
-
-       //
-       // Valadoc tree creation:
-       //
-
-       private void process_children (Api.Node node, Vala.CodeNode element) {
-               Api.Node old_node = current_node;
-               current_node = node;
-               element.accept_children (this);
-               current_node = old_node;
-       }
-
-       private Api.Node get_parent_node_for (Vala.Symbol element) {
-               if (current_node != null) {
-                       return current_node;
-               }
-
-               Vala.SourceFile vala_source_file = element.source_reference.file;
-               Package package = find_package_for_file (vala_source_file);
-               SourceFile? source_file = get_source_file (element);
-
-               return get_namespace (package, element, source_file);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Vala.Namespace element) {
-               element.accept_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_class == null && element.name == "string";
-
-               Class node = new Class (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_private_cname (element),
-                                                               get_class_macro_name (element),
-                                                               get_type_macro_name (element),
-                                                               get_is_type_macro_name (element),
-                                                               get_type_cast_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               get_class_type_macro_name (element),
-                                                               get_is_class_type_macro_name (element),
-                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                               get_ccode_type_id (element),
-                                                               get_param_spec_function (element),
-                                                               get_ref_function (element),
-                                                               get_unref_function (element),
-                                                               get_free_function_name (element),
-                                                               get_finalize_function_name (element),
-                                                               get_take_value_function (element),
-                                                               get_get_value_function (element),
-                                                               get_set_value_function (element),
-                                                               element.is_fundamental (),
-                                                               element.is_abstract,
-                                                               is_basic_type,
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // relations
-               foreach (Vala.DataType vala_type_ref in element.get_base_types ()) {
-                       var type_ref = create_type_reference (vala_type_ref, node, node);
-
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else if (vala_type_ref.data_type is Vala.Class) {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-
-               // save GLib.Error
-               if (glib_error == null && node.get_full_name () == "GLib.Error") {
-                       glib_error = node;
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Interface node = new Interface (parent,
-                                                                               file,
-                                                                               element.name,
-                                                                               get_access_modifier (element),
-                                                                               comment,
-                                                                               get_cname (element),
-                                                                               get_type_macro_name (element),
-                                                                               get_is_type_macro_name (element),
-                                                                               get_type_cast_macro_name (element),
-                                                                               get_type_function_name (element),
-                                                                               get_interface_macro_name (element),
-                                                                               Vala.GDBusModule.get_dbus_name (element),
-                                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // prerequisites:
-               foreach (Vala.DataType vala_type_ref in element.get_prerequisites ()) {
-                       TypeReference type_ref = create_type_reference (vala_type_ref, node, node);
-                       if (vala_type_ref.data_type is Vala.Interface) {
-                               node.add_interface (type_ref);
-                       } else {
-                               node.base_type = type_ref;
-                       }
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               bool is_basic_type = element.base_type == null
-                       && (element.is_boolean_type ()
-                       || element.is_floating_type ()
-                       || element.is_integer_type ());
-
-               Struct node = new Struct (parent,
-                                                                 file,
-                                                                 element.name,
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 get_type_macro_name (element),
-                                                                 get_type_function_name (element),
-                                                                 get_ccode_type_id (element),
-                                                                 get_dup_function (element),
-                                                                 get_copy_function (element),
-                                                                 get_destroy_function (element),
-                                                                 get_free_function (element),
-                                                                 is_basic_type,
-                                                                 element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // parent type:
-               Vala.ValueType? basetype = element.base_type as Vala.ValueType;
-               if (basetype != null) {
-                       node.base_type = create_type_reference (basetype, node, node);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Field node = new Field (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
-                                                               element);
-               node.field_type = create_type_reference (element.variable_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Property node = new Property (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_nick (element),
-                                                                         Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                         Vala.GDBusModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
-                                                                         element);
-               node.property_type = create_type_reference (element.property_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               // Process property type
-               if (element.get_accessor != null) {
-                       var accessor = element.get_accessor;
-                       node.getter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               if (element.set_accessor != null) {
-                       var accessor = element.set_accessor;
-                       node.setter = new PropertyAccessor (node,
-                                                                                               file,
-                                                                                               element.name,
-                                                                                               get_access_modifier (accessor),
-                                                                                               get_cname (accessor),
-                                                                                               get_property_accessor_type (accessor),
-                                                                                               get_property_ownership (accessor),
-                                                                                               accessor);
-               }
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Method node = new Method (parent,
-                                                                 file,
-                                                                 get_method_name (element),
-                                                                 get_access_modifier (element),
-                                                                 comment,
-                                                                 get_cname (element),
-                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                 Vala.GDBusModule.dbus_result_name (element),
-                                                                 (element.coroutine)? get_finish_name (element) : null,
-                                                                 get_method_binding_type (element),
-                                                                 element.coroutine,
-                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                 element is Vala.CreationMethod,
-                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Api.Signal node = new Api.Signal (parent,
-                                                                                 file,
-                                                                                 element.name,
-                                                                                 get_access_modifier (element),
-                                                                                 comment,
-                                                                                 get_cname (element),
-                                                                                 (element.default_handler != null)? get_cname (element.default_handler) : null,
-                                                                                 Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                 Vala.GDBusModule.is_dbus_visible (element),
-                                                                                 element.is_virtual,
-                                                                                 element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Delegate node = new Delegate (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         !element.has_target,
-                                                                         element);
-               node.return_type = create_type_reference (element.return_type, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Enum (parent,
-                                                               file,
-                                                               element.name,
-                                                               get_access_modifier (element),
-                                                               comment,
-                                                               get_cname (element),
-                                                               get_type_macro_name (element),
-                                                               get_type_function_name (element),
-                                                               element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue element) {
-               Api.Enum parent = (Enum) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.EnumValue (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Constant node = new Constant (parent,
-                                                                         file,
-                                                                         element.name,
-                                                                         get_access_modifier (element),
-                                                                         comment,
-                                                                         get_cname (element),
-                                                                         element);
-               node.constant_type = create_type_reference (element.type_reference, node, node);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new ErrorDomain (parent,
-                                                                          file,
-                                                                          element.name,
-                                                                          get_access_modifier (element),
-                                                                          comment,
-                                                                          get_cname (element),
-                                                                          get_quark_macro_name (element),
-                                                                          get_quark_function_name (element),
-                                                                          Vala.GDBusModule.get_dbus_name (element),
-                                                                         element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode element) {
-               Api.ErrorDomain parent = (ErrorDomain) get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-               if (file == null) {
-                       file = parent.get_source_file ();
-               }
-
-               SourceComment? comment = create_comment (element.comment);
-
-               Symbol node = new Api.ErrorCode (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                comment,
-                                                                                get_cname (element),
-                                                                                Vala.GDBusModule.get_dbus_name_for_member (element),
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_attributes (node, element.attributes);
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (Vala.TypeParameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               Symbol node = new TypeParameter (parent,
-                                                                                file,
-                                                                                element.name,
-                                                                                element);
-               symbol_map.set (element, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (Vala.Parameter element) {
-               Api.Node parent = get_parent_node_for (element);
-               SourceFile? file = get_source_file (element);
-
-               FormalParameter node = new FormalParameter (parent,
-                                                                                                       file,
-                                                                                                       element.name,
-                                                                                                       get_access_modifier(element),
-                                                                                                       get_formal_parameter_type (element),
-                                                                                                       element.ellipsis,
-                                                                                                       element);
-               node.parameter_type = create_type_reference (element.variable_type, node, node);
-               parent.add_child (node);
-
-               process_children (node, element);
-       }       
-
-
-       //
-       // startpoint:
-       //
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               this.settings = settings;
-               this.reporter = reporter;
-
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
-
-               reporter.warnings_offset = context.report.get_warnings ();
-               reporter.errors_offset = context.report.get_errors ();
-
-               if (context == null) {
-                       return null;
-               }
-
-               // TODO: Register all packages here
-               // register packages included by gir-files
-               foreach (Vala.SourceFile vfile in context.get_source_files ()) {
-                       if (vfile.file_type == Vala.SourceFileType.PACKAGE
-                               && vfile.get_nodes ().size > 0
-                               && files.has_key (vfile) == false)
-                       {
-                               Package vdpkg = new Package (get_package_name (vfile.filename), true, null);
-                               register_source_file (register_package (vdpkg), vfile);
-                       }
-               }
-
-               context.accept(this);
-
-               return (reporter.errors == 0)? tree : null;
-       }
-}
-
-
diff --git a/src/driver/0.36.x/Makefile.am b/src/driver/0.36.x/Makefile.am
deleted file mode 100644 (file)
index 4119ee0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NULL =
-
-VERSIONED_VAPI_DIR = $(shell pkg-config libvala-0.36 --variable vapidir)
-
-AM_CFLAGS = \
-       -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I $(top_builddir)/src/libvaladoc/ \
-       $(GLIB_CFLAGS) \
-       $(LIBGEE_CFLAGS) \
-       $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_36_X_CFLAGS) \
-       -g \
-       -w \
-       $(NULL)
-
-AM_VALAFLAGS = \
-       $(VALAFLAGS) \
-       --vapidir $(VERSIONED_VAPI_DIR) \
-       --vapidir $(top_srcdir)/src/vapi \
-       --vapidir $(top_srcdir)/src/libvaladoc \
-       --basedir $(srcdir) \
-       --directory $(builddir) \
-       -C \
-       -g \
-       $(NULL)
-
-BUILT_SOURCES = libdriver.vala.stamp
-
-driver_LTLIBRARIES = libdriver.la
-
-driverdir = $(libdir)/valadoc/drivers/0.36.x
-
-libdriver_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libdriver_la_VALASOURCES = \
-       initializerbuilder.vala \
-       symbolresolver.vala \
-       treebuilder.vala \
-       girwriter.vala \
-       driver.vala \
-       $(NULL)
-
-nodist_libdriver_la_SOURCES = \
-       $(libdriver_la_VALASOURCES:.vala=.c) \
-       $(NULL)
-
-libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
-       $(VALAC) \
-               $(AM_VALAFLAGS) \
-               --pkg libvala-0.36 \
-               --pkg gee-0.8 \
-               --pkg valadoc-1.0 \
-               $(filter %.vala %.c,$^)
-       touch $@
-
-libdriver_la_LIBADD = \
-       $(top_builddir)/src/libvaladoc/libvaladoc.la \
-       $(GLIB_LIBS) \
-       $(LIBVALA_0_36_X_LIBS) \
-       $(LIBGEE_LIBS) \
-       $(LIBGVC_LIBS) \
-       $(NULL)
-
-EXTRA_DIST = \
-       $(libdriver_la_VALASOURCES) \
-       $(NULL)
-
-CLEANFILES = \
-       $(BUILT_SOURCES) \
-       $(nodist_libdriver_la_SOURCES) \
-       $(NULL)
-
diff --git a/src/driver/0.36.x/driver.vala b/src/driver/0.36.x/driver.vala
deleted file mode 100644 (file)
index 902d28d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* driver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-
-/**
- * Creates an simpler, minimized, more abstract AST for valacs AST.
- */
-public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
-       private SymbolResolver resolver;
-       private Api.Tree? tree;
-
-       public void write_gir (Settings settings, ErrorReporter reporter) {
-               var gir_writer = new Drivers.GirWriter (resolver);
-
-               // put .gir file in current directory unless -d has been explicitly specified
-               string gir_directory = ".";
-               if (settings.gir_directory != null) {
-                       gir_directory = settings.gir_directory;
-               }
-
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
-                                                          gir_directory,
-                                                          "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
-                                                          settings.gir_namespace,
-                                                          settings.gir_version,
-                                                          settings.pkg_name);
-       }
-
-       public Api.Tree? build (Settings settings, ErrorReporter reporter) {
-               TreeBuilder builder = new TreeBuilder ();
-               tree = builder.build (settings, reporter);
-               if (reporter.errors > 0) {
-                       return null;
-               }
-
-               resolver = new SymbolResolver (builder);
-               tree.accept (resolver);
-
-               return tree;
-       }
-}
-
-
-public Type register_plugin (Valadoc.ModuleLoader module_loader) {
-       return typeof (Valadoc.Drivers.Driver);
-}
-
diff --git a/src/driver/0.36.x/girwriter.vala b/src/driver/0.36.x/girwriter.vala
deleted file mode 100644 (file)
index c250854..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/* girwriter.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Api;
-
-
-/**
- * Code visitor generating .gir file for the public interface.
- */
-public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
-       private GtkdocRenderer renderer;
-       private SymbolResolver resolver;
-
-       public GirWriter (SymbolResolver resolver) {
-               this.renderer = new GtkdocRenderer ();
-               this.resolver = resolver;
-       }
-
-       private string? translate (Content.Comment? documentation) {
-               if (documentation == null) {
-                       return null;
-               }
-
-               renderer.render_symbol (documentation);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       private string? translate_taglet (Content.Taglet? taglet) {
-               if (taglet == null) {
-                       return null;
-               }
-
-               renderer.render_children (taglet);
-
-               return MarkupWriter.escape (renderer.content);
-       }
-
-       protected override string? get_interface_comment (Vala.Interface viface) {
-               Interface iface = resolver.resolve (viface) as Interface;
-               return translate (iface.documentation);
-       }
-
-       protected override string? get_struct_comment (Vala.Struct vst) {
-               Struct st = resolver.resolve (vst) as Struct;
-               return translate (st.documentation);
-       }
-
-       protected override string? get_enum_comment (Vala.Enum ven) {
-               Enum en = resolver.resolve (ven) as Enum;
-               return translate (en.documentation);
-       }
-
-       protected override string? get_class_comment (Vala.Class vc) {
-               Class c = resolver.resolve (vc) as Class;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_code_comment (Vala.ErrorCode vecode) {
-               ErrorCode ecode = resolver.resolve (vecode) as ErrorCode;
-               return translate (ecode.documentation);
-       }
-
-       protected override string? get_enum_value_comment (Vala.EnumValue vev) {
-               Api.EnumValue ev = resolver.resolve (vev) as Api.EnumValue;
-               return translate (ev.documentation);
-       }
-
-       protected override string? get_constant_comment (Vala.Constant vc) {
-               Constant c = resolver.resolve (vc) as Constant;
-               return translate (c.documentation);
-       }
-
-       protected override string? get_error_domain_comment (Vala.ErrorDomain vedomain) {
-               ErrorDomain edomain = resolver.resolve (vedomain) as ErrorDomain;
-               return translate (edomain.documentation);
-       }
-
-       protected override string? get_field_comment (Vala.Field vf) {
-               Field f = resolver.resolve (vf) as Field;
-               return translate (f.documentation);
-       }
-
-       protected override string? get_delegate_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               return translate (cb.documentation);
-       }
-
-       protected override string? get_method_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               return translate (m.documentation);
-       }
-
-       protected override string? get_property_comment (Vala.Property vprop) {
-               Property prop = resolver.resolve (vprop) as Property;
-               return translate (prop.documentation);
-       }
-
-       protected override string? get_delegate_return_comment (Vala.Delegate vcb) {
-               Delegate cb = resolver.resolve (vcb) as Delegate;
-               if (cb.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = cb.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (cb, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_return_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               if (sig.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = sig.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (sig, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_method_return_comment (Vala.Method vm) {
-               Method m = resolver.resolve (vm) as Method;
-               if (m.documentation == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = m.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (m, typeof(Taglets.Return));
-               foreach (Content.Taglet taglet in taglets) {
-                       return translate_taglet (taglet);
-               }
-
-               return null;
-       }
-
-       protected override string? get_signal_comment (Vala.Signal vsig) {
-               Api.Signal sig = resolver.resolve (vsig) as Api.Signal;
-               return translate (sig.documentation);
-       }
-
-       protected override string? get_parameter_comment (Vala.Parameter param) {
-               Api.Symbol symbol = resolver.resolve (((Vala.Symbol) param.parent_symbol));
-               if (symbol == null) {
-                       return null;
-               }
-
-               Content.Comment? documentation = symbol.documentation;
-               if (documentation == null) {
-                       return null;
-               }
-
-               Gee.List<Content.Taglet> taglets = documentation.find_taglets (symbol, typeof(Taglets.Param));
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Param taglet = (Taglets.Param) _taglet;
-                       if (taglet.parameter_name == param.name) {
-                               return translate_taglet (taglet);
-                       }
-               }
-
-               return null;
-       }
-}
-
-
diff --git a/src/driver/0.36.x/initializerbuilder.vala b/src/driver/0.36.x/initializerbuilder.vala
deleted file mode 100644 (file)
index 7b26ab5..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/* initializerbuilder.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-using Valadoc.Content;
-using Gee;
-
-
-private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private SignatureBuilder signature;
-
-       private Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void write_node (Vala.Symbol vsymbol) {
-               signature.append_symbol (resolve (vsymbol));
-       }
-
-       private void write_type (Vala.DataType vsymbol) {
-               if (vsymbol.data_type != null) {
-                       write_node (vsymbol.data_type);
-               } else {
-                       signature.append_literal ("null");
-               }
-
-               var type_args = vsymbol.get_type_arguments ();
-               if (type_args.size > 0) {
-                       signature.append ("<");
-                       bool first = true;
-                       foreach (Vala.DataType type_arg in type_args) {
-                               if (!first) {
-                                       signature.append (",");
-                               } else {
-                                       first = false;
-                               }
-                               if (!type_arg.value_owned) {
-                                       signature.append_keyword ("weak");
-                               }
-                               signature.append (type_arg.to_qualified_string (null));
-                       }
-                       signature.append (">");
-               }
-
-               if (vsymbol.nullable) {
-                       signature.append ("?");
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_array_creation_expression (Vala.ArrayCreationExpression expr) {
-               signature.append_keyword ("new");
-               write_type (expr.element_type);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression size in expr.get_sizes ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       size.accept (this);
-                       first = false;
-               }
-
-               signature.append ("]", false);
-
-               if (expr.initializer_list != null) {
-                       signature.append (" ", false);
-                       expr.initializer_list.accept (this);
-               }
-       }
-
-       public InitializerBuilder (SignatureBuilder signature, HashMap<Vala.Symbol, Symbol> symbol_map) {
-               this.symbol_map = symbol_map;
-               this.signature = signature;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_binary_expression (Vala.BinaryExpression expr) {
-               expr.left.accept (this);
-
-               switch (expr.operator) {
-               case Vala.BinaryOperator.PLUS:
-                       signature.append ("+ ");
-                       break;
-
-               case Vala.BinaryOperator.MINUS:
-                       signature.append ("- ");
-                       break;
-
-               case Vala.BinaryOperator.MUL:
-                       signature.append ("* ");
-                       break;
-
-               case Vala.BinaryOperator.DIV:
-                       signature.append ("/ ");
-                       break;
-
-               case Vala.BinaryOperator.MOD:
-                       signature.append ("% ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_LEFT:
-                       signature.append ("<< ");
-                       break;
-
-               case Vala.BinaryOperator.SHIFT_RIGHT:
-                       signature.append (">> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN:
-                       signature.append ("< ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN:
-                       signature.append ("> ");
-                       break;
-
-               case Vala.BinaryOperator.LESS_THAN_OR_EQUAL:
-                       signature.append ("<= ");
-                       break;
-
-               case Vala.BinaryOperator.GREATER_THAN_OR_EQUAL:
-                       signature.append (">= ");
-                       break;
-
-               case Vala.BinaryOperator.EQUALITY:
-                       signature.append ("== ");
-                       break;
-
-               case Vala.BinaryOperator.INEQUALITY:
-                       signature.append ("!= ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_AND:
-                       signature.append ("& ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_OR:
-                       signature.append ("| ");
-                       break;
-
-               case Vala.BinaryOperator.BITWISE_XOR:
-                       signature.append ("^ ");
-                       break;
-
-               case Vala.BinaryOperator.AND:
-                       signature.append ("&& ");
-                       break;
-
-               case Vala.BinaryOperator.OR:
-                       signature.append ("|| ");
-                       break;
-
-               case Vala.BinaryOperator.IN:
-                       signature.append_keyword ("in");
-                       signature.append (" ");
-                       break;
-
-               case Vala.BinaryOperator.COALESCE:
-                       signature.append ("?? ");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               expr.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_unary_expression (Vala.UnaryExpression expr) {
-               switch (expr.operator) {
-               case Vala.UnaryOperator.PLUS:
-                       signature.append ("+");
-                       break;
-
-               case Vala.UnaryOperator.MINUS:
-                       signature.append ("-");
-                       break;
-
-               case Vala.UnaryOperator.LOGICAL_NEGATION:
-                       signature.append ("!");
-                       break;
-
-               case Vala.UnaryOperator.BITWISE_COMPLEMENT:
-                       signature.append ("~");
-                       break;
-
-               case Vala.UnaryOperator.INCREMENT:
-                       signature.append ("++");
-                       break;
-
-               case Vala.UnaryOperator.DECREMENT:
-                       signature.append ("--");
-                       break;
-
-               case Vala.UnaryOperator.REF:
-                       signature.append_keyword ("ref");
-                       break;
-
-               case Vala.UnaryOperator.OUT:
-                       signature.append_keyword ("out");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_assignment (Vala.Assignment a) {
-               a.left.accept (this);
-
-               switch (a.operator) {
-               case Vala.AssignmentOperator.SIMPLE:
-                       signature.append ("=");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_OR:
-                       signature.append ("|");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_AND:
-                       signature.append ("&");
-                       break;
-
-               case Vala.AssignmentOperator.BITWISE_XOR:
-                       signature.append ("^");
-                       break;
-
-               case Vala.AssignmentOperator.ADD:
-                       signature.append ("+");
-                       break;
-
-               case Vala.AssignmentOperator.SUB:
-                       signature.append ("-");
-                       break;
-
-               case Vala.AssignmentOperator.MUL:
-                       signature.append ("*");
-                       break;
-
-               case Vala.AssignmentOperator.DIV:
-                       signature.append ("/");
-                       break;
-
-               case Vala.AssignmentOperator.PERCENT:
-                       signature.append ("%");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_LEFT:
-                       signature.append ("<<");
-                       break;
-
-               case Vala.AssignmentOperator.SHIFT_RIGHT:
-                       signature.append (">>");
-                       break;
-
-               default:
-                       assert_not_reached ();
-               }
-
-               a.right.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_cast_expression (Vala.CastExpression expr) {
-               if (expr.is_non_null_cast) {
-                       signature.append ("(!)");
-                       expr.inner.accept (this);
-                       return;
-               }
-
-               if (!expr.is_silent_cast) {
-                       signature.append ("(", false);
-                       write_type (expr.type_reference);
-                       signature.append (")", false);
-               }
-
-               expr.inner.accept (this);
-
-               if (expr.is_silent_cast) {
-                       signature.append_keyword ("as");
-                       write_type (expr.type_reference);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_initializer_list (Vala.InitializerList list) {
-               signature.append ("{", false);
-
-               bool first = true;
-               foreach (Vala.Expression initializer in list.get_initializers ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-                       initializer.accept (this);
-               }
-
-               signature.append ("}", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_member_access (Vala.MemberAccess expr) {
-               if (expr.symbol_reference != null) {
-                       expr.symbol_reference.accept (this);
-               } else {
-                       signature.append (expr.member_name);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_element_access (Vala.ElementAccess expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-
-               bool first = true;
-               foreach (Vala.Expression index in expr.get_indices ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       first = false;
-
-                       index.accept (this);
-               }
-
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_pointer_indirection (Vala.PointerIndirection expr) {
-               signature.append ("*", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_addressof_expression (Vala.AddressofExpression expr) {
-               signature.append ("&", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_reference_transfer_expression (Vala.ReferenceTransferExpression expr) {
-               signature.append ("(", false).append_keyword ("owned", false).append (")", false);
-               expr.inner.accept (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_check (Vala.TypeCheck expr) {
-               expr.expression.accept (this);
-               signature.append_keyword ("is");
-               write_type (expr.type_reference);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method_call (Vala.MethodCall expr) {
-               // symbol-name:
-               expr.call.symbol_reference.accept (this);
-
-               // parameters:
-               signature.append (" (", false);
-               bool first = true;
-               foreach (Vala.Expression literal in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-
-                       literal.accept (this);
-                       first = false;
-               }
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_slice_expression (Vala.SliceExpression expr) {
-               expr.container.accept (this);
-               signature.append ("[", false);
-               expr.start.accept (this);
-               signature.append (":", false);
-               expr.stop.accept (this);
-               signature.append ("]", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_base_access (Vala.BaseAccess expr) {
-               signature.append_keyword ("base", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_postfix_expression (Vala.PostfixExpression expr) {
-               expr.inner.accept (this);
-               if (expr.increment) {
-                       signature.append ("++", false);
-               } else {
-                       signature.append ("--", false);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_object_creation_expression (Vala.ObjectCreationExpression expr) {
-               if (!expr.struct_creation) {
-                       signature.append_keyword ("new");
-               }
-
-               signature.append_symbol (resolve (expr.symbol_reference));
-
-               signature.append (" (", false);
-
-               //TODO: rm conditional space
-               bool first = true;
-               foreach (Vala.Expression arg in expr.get_argument_list ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       arg.accept (this);
-                       first = false;
-               }
-
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_sizeof_expression (Vala.SizeofExpression expr) {
-               signature.append_keyword ("sizeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_typeof_expression (Vala.TypeofExpression expr) {
-               signature.append_keyword ("typeof", false).append (" (", false);
-               write_type (expr.type_reference);
-               signature.append (")", false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_lambda_expression (Vala.LambdaExpression expr) {
-               signature.append ("(", false);
-
-               bool first = true;
-               foreach (Vala.Parameter param in expr.get_parameters ()) {
-                       if (!first) {
-                               signature.append (", ", false);
-                       }
-                       signature.append (param.name, false);
-                       first = false;
-               }
-
-
-               signature.append (") => {", false);
-               signature.append_highlighted (" [...] ", false);
-               signature.append ("}", false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_boolean_literal (Vala.BooleanLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_character_literal (Vala.CharacterLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_integer_literal (Vala.IntegerLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_real_literal (Vala.RealLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_regex_literal (Vala.RegexLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_string_literal (Vala.StringLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_null_literal (Vala.NullLiteral lit) {
-               signature.append_literal (lit.to_string (), false);
-       }
-
-
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Vala.Field field) {
-               write_node (field);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Vala.Constant constant) {
-               write_node (constant);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Vala.EnumValue ev) {
-               write_node (ev);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (Vala.ErrorCode ec) {
-               write_node (ec);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Vala.Delegate d) {
-               write_node (d);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Vala.Method m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_creation_method (Vala.CreationMethod m) {
-               write_node (m);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Vala.Signal sig) {
-               write_node (sig);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Vala.Class c) {
-               write_node (c);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Vala.Struct s) {
-               write_node (s);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Vala.Interface i) {
-               write_node (i);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Vala.Enum en) {
-               write_node (en);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (Vala.ErrorDomain ed) {
-               write_node (ed);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Vala.Property prop) {
-               write_node (prop);
-       }
-}
-
diff --git a/src/driver/0.36.x/symbolresolver.vala b/src/driver/0.36.x/symbolresolver.vala
deleted file mode 100644 (file)
index 4adc06b..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/* symbolresolver.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.SymbolResolver : Visitor {
-       private HashMap<Vala.Symbol, Symbol> symbol_map;
-       private Valadoc.Api.Class glib_error;
-       private Api.Tree root;
-
-       public SymbolResolver (TreeBuilder builder) {
-               this.symbol_map = builder.get_symbol_map ();
-               this.glib_error = builder.get_glib_error ();
-       }
-
-       public Symbol? resolve (Vala.Symbol symbol) {
-               return symbol_map.get (symbol);
-       }
-
-       private void resolve_thrown_list (Symbol symbol, Vala.List<Vala.DataType> types) {
-               foreach (Vala.DataType type in types) {
-                       Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.data_type;
-                       Symbol? edom = symbol_map.get (vala_edom);
-                       symbol.add_child (edom ?? glib_error);
-               }
-       }
-
-       private void resolve_array_type_references (Api.Array ptr) {
-               Api.Item data_type = ptr.data_type;
-               if (data_type == null) {
-                       // void
-               } else if (data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) data_type);
-               } else if (data_type is Pointer) {
-                       resolve_pointer_type_references ((Api.Pointer) data_type);
-               } else {
-                       resolve_type_reference ((TypeReference) data_type);
-               }
-       }
-
-       private void resolve_pointer_type_references (Pointer ptr) {
-               Api.Item type = ptr.data_type;
-               if (type == null) {
-                       // void
-               } else if (type is Api.Array) {
-                       resolve_array_type_references ((Api.Array) type);
-               } else if (type is Pointer) {
-                       resolve_pointer_type_references ((Pointer) type);
-               } else {
-                       resolve_type_reference ((TypeReference) type);
-               }
-       }
-
-       private void resolve_type_reference (TypeReference reference) {
-               Vala.DataType vtyperef = (Vala.DataType) reference.data;
-               if (vtyperef is Vala.ErrorType) {
-                       Vala.ErrorDomain verrdom = ((Vala.ErrorType) vtyperef).error_domain;
-                       if (verrdom != null) {
-                               reference.data_type = resolve (verrdom);
-                       } else {
-                               reference.data_type = glib_error;
-                       }
-               } else if (vtyperef is Vala.DelegateType) {
-                       reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
-               } else if (vtyperef is Vala.GenericType) {
-                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
-               } else if (vtyperef.data_type != null) {
-                       reference.data_type = resolve (vtyperef.data_type);
-               }
-
-               // Type parameters:
-               foreach (TypeReference type_param_ref in reference.get_type_arguments ()) {
-                       resolve_type_reference (type_param_ref);
-               }
-
-               if (reference.data_type is Pointer) {
-                       resolve_pointer_type_references ((Pointer)reference.data_type);
-               } else if (reference.data_type is Api.Array) {
-                       resolve_array_type_references ((Api.Array)reference.data_type);
-               }
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               this.root = item;
-               item.accept_children (this);
-               this.root = null;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       resolve_type_reference (type_ref);
-               }
-
-               if (item.base_type != null)     {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               if (item.base_type != null) {
-                       resolve_type_reference (item.base_type);
-               }
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               Vala.Property vala_property = item.data as Vala.Property;
-               Vala.Property? base_vala_property = null;
-
-               if (vala_property.base_property != null) {
-                       base_vala_property = vala_property.base_property;
-               } else if (vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property == vala_property && vala_property.base_interface_property != null) {
-                       base_vala_property = vala_property.base_interface_property;
-               }
-               if (base_vala_property != null) {
-                       item.base_property = (Property?) resolve (base_vala_property);
-               }
-
-               resolve_type_reference (item.property_type);
-               
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_field (Field item) {
-               resolve_type_reference (item.field_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_constant (Constant item) {
-               resolve_type_reference (item.constant_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_delegate (Delegate item) {
-               Vala.Delegate vala_delegate = item.data as Vala.Delegate;
-
-               resolve_type_reference (item.return_type);
-
-               resolve_thrown_list (item, vala_delegate.get_error_types ());
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_signal (Api.Signal item) {
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_method (Method item) {
-               Vala.Method vala_method = item.data as Vala.Method;
-               Vala.Method? base_vala_method = null;
-               if (vala_method.base_method != null) {
-                       base_vala_method = vala_method.base_method;
-               } else if (vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method == vala_method && vala_method.base_interface_method != null) {
-                       base_vala_method = vala_method.base_interface_method;
-               }
-               if (base_vala_method != null) {
-                       item.base_method = (Method?) resolve (base_vala_method);
-               }
-
-               resolve_thrown_list (item, vala_method.get_error_types ());
-
-               resolve_type_reference (item.return_type);
-
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_type_parameter (TypeParameter item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_formal_parameter (FormalParameter item) {
-               if (item.ellipsis) {
-                       return;
-               }
-
-               if (((Vala.Parameter) item.data).initializer != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.Parameter) item.data).initializer.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               resolve_type_reference (item.parameter_type);
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_domain (ErrorDomain item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_error_code (ErrorCode item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum (Enum item) {
-               item.accept_all_children (this, false);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_enum_value (Api.EnumValue item) {
-
-               if (((Vala.EnumValue) item.data).value != null) {
-                       SignatureBuilder signature = new SignatureBuilder ();
-                       InitializerBuilder ibuilder = new InitializerBuilder (signature, symbol_map);
-                       ((Vala.EnumValue) item.data).value.accept (ibuilder);
-                       item.default_value = signature.get ();
-               }
-
-               item.accept_all_children (this, false);
-       }
-}
-
-
-
diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am
deleted file mode 100644 (file)
index 87d89a6..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-NULL =
-
-if HAVE_LIBVALA_0_20_X
-DRIVER_0_20_X_DIR = 0.20.x
-endif
-
-if HAVE_LIBVALA_0_22_X
-DRIVER_0_22_X_DIR = 0.22.x
-endif
-
-if HAVE_LIBVALA_0_24_X
-DRIVER_0_24_X_DIR = 0.24.x
-endif
-
-if HAVE_LIBVALA_0_26_X
-DRIVER_0_26_X_DIR = 0.26.x
-endif
-
-if HAVE_LIBVALA_0_28_X
-DRIVER_0_28_X_DIR = 0.28.x
-endif
-
-if HAVE_LIBVALA_0_30_X
-DRIVER_0_30_X_DIR = 0.30.x
-endif
-
-if HAVE_LIBVALA_0_32_X
-DRIVER_0_32_X_DIR = 0.32.x
-endif
-
-if HAVE_LIBVALA_0_34_X
-DRIVER_0_34_X_DIR = 0.34.x
-endif
-
-if HAVE_LIBVALA_0_36_X
-DRIVER_0_36_X_DIR = 0.36.x
-endif
-
-
-SUBDIRS = \
-       $(DRIVER_0_20_X_DIR) \
-       $(DRIVER_0_22_X_DIR) \
-       $(DRIVER_0_24_X_DIR) \
-       $(DRIVER_0_26_X_DIR) \
-       $(DRIVER_0_28_X_DIR) \
-       $(DRIVER_0_30_X_DIR) \
-       $(DRIVER_0_32_X_DIR) \
-       $(DRIVER_0_34_X_DIR) \
-       $(DRIVER_0_36_X_DIR) \
-       $(NULL)
-
diff --git a/src/vapi/config.vapi b/src/vapi/config.vapi
deleted file mode 100644 (file)
index 55fed86..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* config.vapi
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
-namespace Config {
-       [CCode (cname = "PACKAGE_VERSION")]
-       public const string version;
-
-       [CCode (cname = "PACKAGE_DATADIR")]
-       public const string plugin_dir;
-
-       [CCode (cname = "PACKAGE_VAPIDIR")]
-       public const string vapi_dir;
-
-       [CCode (cname = "DEFAULT_DRIVER")]
-       public const string default_driver;
-}
-
diff --git a/src/vapi/libgvc.vapi b/src/vapi/libgvc.vapi
deleted file mode 100644 (file)
index 58219c8..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * libgvc.vapi
- *
- * Copyright (C) 2009  Martin Olsson
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *      Martin Olsson <martin@minimum.se>
- */
-
-[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "graphviz/gvc.h")]
-namespace Gvc {
-
-       [CCode (cname = "aginitlib", cheader_filename="gvc.h")]
-       public void initlib ( size_t graphinfo, size_t nodeinfo, size_t  edgeinfo);
-
-       [CCode (cname = "aginit")]
-#if WITH_CGRAPH
-       public void init (Graph g, int kind, string rec_name, bool move_to_front);
-#else
-       public void init ();
-#endif
-
-
-#if WITH_CGRAPH
-       [SimpleType]
-       [CCode (cname = "Agdesc_t")]
-       public struct Desc {
-       }
-
-       public Desc Agdirected; // Desc.DIRECTED | Desc.MAINGRAPH;
-       public Desc Agstrictdirected; //  Desc.DIRECTED | Desc.STRICT | Desc.MAINGRAPH;
-       public Desc Agundirected; // Desc.MAINGRAPH;
-       public Desc Agstrictundirected; // Desc.STRICT | Desc.MAINGRAPH;
-#else
-       [CCode (cprefix = "")]
-       public enum GraphKind {
-               AGRAPH,
-               AGRAPHSTRICT,
-               AGDIGRAPH,
-               AGDIGRAPHSTRICT,
-               AGMETAGRAPH,
-       }
-#endif
-
-       [CCode (cname = "agerrlevel_t", cheader_filename = "gvc.h", cprefix = "")]
-       public enum ErrorLevel {
-               AGWARN,
-               AGERR,
-               AGMAX,
-               AGPREV
-       }
-
-       [Compact]
-       [CCode (cname = "GVC_t", free_function = "gvFreeContext")]
-       public class Context {
-               [CCode (cname = "gvContext")]
-               public Context ();
-
-               [CCode (cname = "gvParseArgs")]
-               public int parse_args ( [CCode (array_length_pos = 0.9)] string[] argv );
-
-               [CCode (cname = "gvLayout")]
-               public int layout (Graph graph, [CCode (type = "char*")] string layout_engine);
-
-               [CCode (cname = "gvFreeLayout")]
-               public int free_layout (Graph graph);
-
-               [CCode (cname = "gvRender")]
-               public int render (Graph graph, [CCode (type = "char*")] string file_type, GLib.FileStream? file);
-
-               [CCode (cname = "gvRenderFilename")]
-               public int render_filename (Graph graph, [CCode (type = "char*")] string file_type, [CCode (type = "char*")] string filename);
-
-               [CCode (cname = "gvLayoutJobs")]
-               public int layout_jobs (Graph graph);
-
-               [CCode (cname = "gvRenderJobs")]
-               public int render_jobs (Graph graph);
-
-               [CCode (cname = "gvRenderData")]
-               public int render_data (Graph graph, [CCode (type = "char*")] string file_type, [CCode (type = "char**")] out uint8[] output_data);
-       }
-
-       [Compact]
-       [CCode (cname = "Agnode_t", ref_function = "", unref_function = "", free_function = "")]
-       public class Node {
-               [CCode (cname = "name")]
-               public string name;
-
-               [CCode (cname = "agget")]
-               public unowned string? get ([CCode (type = "char*")] string attribute_name);
-
-               [CCode (cname = "agset")]
-               public void set ([CCode (type = "char*")] string attribute_name, [CCode (type = "char*")] string attribute_value);
-
-               [CCode (cname = "agsafeset")]
-               public void safe_set ([CCode (type = "char*")] string attribute_name, [CCode (type = "char*")] string attribute_value, [CCode (type = "char*")] string? default_value);
-       }
-
-       [Compact]
-       [CCode (cname = "Agedge_t", ref_function = "", unref_function = "", free_function = "")]
-       public class Edge {
-               [CCode (cname = "agget")]
-               public unowned string? get ([CCode (type = "char*")] string attribute_name);
-
-               [CCode (cname = "agset")]
-               public int set ([CCode (type = "char*")] string attribute_name, [CCode (type = "char*")] string attribute_value);
-
-               [CCode (cname = "agsafeset")]
-               public int safe_set ([CCode (type = "char*")] string attribute_name, [CCode (type = "char*")] string attribute_value, [CCode (type = "char*")] string? default_value);
-       }
-
-       [Compact]
-       [CCode (cname = "Agraph_t", free_function = "agclose")]
-       public class Graph {
-               [CCode (cname = "agopen")]
-#if WITH_CGRAPH
-               public Graph ([CCode (type = "char*")] string graph_name, Desc desc, int disc = 0);
-#else
-               public Graph ([CCode (type = "char*")] string graph_name, GraphKind kind);
-#endif
-
-               [CCode (cname = "agread")]
-               public static Graph read (GLib.FileStream file);
-
-               [CCode (cname = "agmemread")]
-               public static Graph read_string (string str);
-
-               [CCode (cname = "agnode")]
-#if WITH_CGRAPH
-               public Node create_node ([CCode (type = "char*")] string node_name, int createflag = 1);
-#else
-               public Node create_node ([CCode (type = "char*")] string node_name);
-#endif
-
-               [CCode (cname = "agedge")]
-#if WITH_CGRAPH
-               public Edge create_edge (Node from, Node to, string? name = null, int createflag = 1);
-#else
-               public Edge create_edge (Node from, Node to);
-#endif
-
-               [CCode (cname = "agsubg")]
-               public unowned Graph create_subgraph ([CCode (type = "char*")] string? name);
-
-               [CCode (cname = "agfindsubg")]
-               public Graph find_subgraph ([CCode (type = "char*")] string name);
-
-               [CCode (cname = "agidsubg")]
-               public Graph create_subgraph_id (ulong id);
-
-               [CCode (cname = "agfstsubg")]
-               public Graph get_first_subgraph ();
-
-               [CCode (cname = "agnxtsubg")]
-               public Graph get_next_subgraph ();
-
-               [CCode (cname = "agparent")]
-               public Graph get_parent_graph ();
-
-               [CCode (cname = "agdelsubg")]
-               public int delete_subgraph (Graph subgraph);
-
-               [CCode (cname = "agfindnode")]
-               public Node? find_node ([CCode (type = "char*")] string node_name);
-
-               [CCode (cname = "agfstnode")]
-               public Node? get_first_node ();
-
-               [CCode (cname = "agnxtnode")]
-               public Node? get_next_node (Node node);
-
-               [CCode (cname = "agget")]
-               public unowned string? get ([CCode (type = "char*")] string attribute_name);
-
-               [CCode (cname = "agset")]
-               public int set ([CCode (type = "char*")] string attribute_name, [CCode (type = "char*")] string attribute_value);
-
-               [CCode (cname = "agsafeset")]
-               public int safe_set ([CCode (type = "char*")] string attribute_name, [CCode (type = "char*")] string attribute_value, [CCode (type = "char*")] string? default_value);
-
-               [CCode (cname = "AG_IS_DIRECTED")]
-               public bool is_directed ();
-
-               [CCode (cname = "AG_IS_STRICT")]
-               public bool is_strict ();
-
-       }
-
-       [CCode (cname = "char", copy_function = "agdupstr_html", free_function = "agstrfree")]
-       public class HtmlString : string {
-               [CCode (cname = "agstrdup_html")]
-               public HtmlString (string markup);
-       }
-
-       [CCode(cprefix = "ag")]
-       namespace Error {
-               [CCode (cname = "agerrno")]
-               public static ErrorLevel errno;
-
-               [CCode (cname = "agerr")]
-               [PrintfFormat]
-               public static int error (ErrorLevel level, string fmt, ...);
-
-               [CCode (cname = "agerrors")]
-               public static int errors ();
-
-               [CCode (cname = "agseterr")]
-               public static void set_error (ErrorLevel err);
-
-               [CCode (cname = "aglasterr")]
-               public static string? last_error ();
-
-               [CCode (cname = "agerrorf")]
-               [PrintfFormat]
-               public static void errorf (string format, ...);
-
-               [CCode (cname = "agwarningf")]
-               [PrintfFormat]
-               void warningf (string fmt, ...);
-       }
-
-}
diff --git a/valadoc.doap b/valadoc.doap
deleted file mode 100644 (file)
index 088c94b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/"
-         xmlns:gnome="http://api.gnome.org/doap-extensions#"
-         xmlns="http://usefulinc.com/ns/doap#">
-
-  <name xml:lang="en">valadoc</name>
-  <shortdesc xml:lang="en">A documentation tool for vala</shortdesc>
-  <description>Valadoc is a documentation generator for generating API documentation
-from Vala source code based on libvala.</description>
-
-  <homepage rdf:resource="https://wiki.gnome.org/Projects/Valadoc" />
-  <download-page rdf:resource="https://wiki.gnome.org/Projects/Valadoc" />
-  <bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=valadoc" />
-
-  <category rdf:resource="http://api.gnome.org/doap-extensions#core" />
-  <programming-language>Vala</programming-language>
-
-  <maintainer>
-    <foaf:Person>
-      <foaf:name>Florian Brosch</foaf:name>
-      <foaf:mbox rdf:resource="mailto:flo.brosch@gmail.com" />
-      <gnome:userid>flobrosch</gnome:userid>
-    </foaf:Person>
-  </maintainer>
-  <maintainer>
-    <foaf:Person>
-      <foaf:name>Rico Tzschichholz</foaf:name>
-      <foaf:mbox rdf:resource="mailto:ricotz@ubuntu.com" />
-      <gnome:userid>ricotz</gnome:userid>
-    </foaf:Person>
-  </maintainer>
-
-</Project>
-
similarity index 100%
rename from src/valadoc/Makefile.am
rename to valadoc/Makefile.am
similarity index 100%
rename from THANKS
rename to valadoc/THANKS
similarity index 100%
rename from icons/Makefile.am
rename to valadoc/icons/Makefile.am
similarity index 100%
rename from icons/class.png
rename to valadoc/icons/class.png
similarity index 100%
rename from icons/enum.png
rename to valadoc/icons/enum.png
similarity index 100%
rename from icons/field.png
rename to valadoc/icons/field.png
similarity index 100%
rename from icons/method.png
rename to valadoc/icons/method.png
similarity index 100%
rename from icons/package.png
rename to valadoc/icons/package.png
similarity index 100%
rename from icons/scripts.js
rename to valadoc/icons/scripts.js
similarity index 100%
rename from icons/signal.png
rename to valadoc/icons/signal.png
similarity index 100%
rename from icons/struct.png
rename to valadoc/icons/struct.png
similarity index 100%
rename from icons/style.css
rename to valadoc/icons/style.css
similarity index 100%
rename from icons/tip.png
rename to valadoc/icons/tip.png
similarity index 100%
rename from icons/warning.png
rename to valadoc/icons/warning.png
similarity index 100%
rename from tests/Makefile.am
rename to valadoc/tests/Makefile.am