summaryrefslogtreecommitdiff
path: root/giscanner
Commit message (Collapse)AuthorAgeFilesLines
* Be sure we return the ref'd nodeColin Walters2008-08-061-0/+3
| | | | svn path=/branches/gir-compiler/; revision=301
* Fix typoJürg Billeter2008-07-081-1/+1
| | | | | | | | | | 2008-07-08 Jürg Billeter <j@bitron.ch> * giscanner/glibast.py: Fix typo svn path=/trunk/; revision=295
* Ignore a few more tagsJohan Dahlin2008-06-211-0/+3
| | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * giscanner/girparser.py (GIRParser._parse_api): Ignore a few more tags svn path=/trunk/; revision=292
* Add support for gtk-doc annotations for allow-none. Add test case.Johan Dahlin2008-06-203-0/+5
| | | | | | | | | | | | | | | | 2008-06-20 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/transformer.py: * tests/parser/Foo-expected.gir: * tests/parser/foo-object.h: * tests/parser/foo.c (foo_object_allow_none): Add support for gtk-doc annotations for allow-none. Add test case. svn path=/trunk/; revision=291
* Start using abstract type instead of the raw C types. Register a bunch ofJohan Dahlin2008-06-205-19/+76
| | | | | | | | | | | | | | | | 2008-06-19 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * tests/parser/Foo-expected.gir: Start using abstract type instead of the raw C types. Register a bunch of glib types we care about. svn path=/trunk/; revision=290
* Improve line wrapping when > 79 charatersJohan Dahlin2008-06-071-7/+31
| | | | | | | | | | 2008-06-07 Johan Dahlin <jdahlin@async.com.br> * giscanner/xmlwriter.py: Improve line wrapping when > 79 charaters svn path=/trunk/; revision=286
* Use <type> element for field types Update testcaseJürg Billeter2008-06-053-6/+17
| | | | | | | | | | | | | 2008-06-05 Jürg Billeter <j@bitron.ch> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/transformer.py: Use <type> element for field types * tests/parser/Foo-expected.gir: Update testcase svn path=/trunk/; revision=285
* Fix a bug which prevented GdkEvent from being generatedJohan Dahlin2008-06-041-1/+5
| | | | | | | | | | 2008-06-04 Johan Dahlin <jdahlin@async.com.br> * giscanner/glibtransformer.py: Fix a bug which prevented GdkEvent from being generated svn path=/trunk/; revision=284
* Improve enum member parsing and introspectionJohan Dahlin2008-06-037-36/+75
| | | | | | | | | | | | | | | | | 2008-06-03 Johan Dahlin <jdahlin@async.com.br> * giscanner/Makefile.am: * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * giscanner/utils.py: * tests/parser/Foo-expected.gir: Improve enum member parsing and introspection svn path=/trunk/; revision=283
* Revert this part, it broke atkJohan Dahlin2008-05-311-1/+1
| | | | svn path=/trunk/; revision=282
* Add a new source type enum for member. Use __repr__ for improved debuggingJohan Dahlin2008-05-315-32/+59
| | | | | | | | | | | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * giscanner/scannerparser.y: * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: Add a new source type enum for member. Use __repr__ for improved debugging * giscanner/girparser.py: Ignore some more * giscanner/transformer.py: Improve parsing of struct members. * tests/parser/foo-object.h: Add a new testcase svn path=/trunk/; revision=281
* Improve error reporting when trying to quote None. Do not print warningsJohan Dahlin2008-05-315-23/+57
| | | | | | | | | | | | | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * giscanner/xmlwriter.py: Improve error reporting when trying to quote None. * giscanner/girparser.py: Do not print warnings when including more complete .gir files * giscanner/girwriter.py: Do not require a name for parameters, add a todo for singletons * giscanner/glibtransformer.py: Refactor the way structs are done, add a couple of hacks to allow us to get further. * giscanner/transformer.py: Add enough hacks so cairo, atk and pango.gir can be parsed properly * gobject-introspection-1.0.pc.in: Export girdir, so we can access gobject-2.0.gir from outside svn path=/trunk/; revision=280
* Prevent a crash when symbol->indent is NULL.Johan Dahlin2008-05-311-0/+7
| | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * giscanner/giscannermodule.c (symbol_get_ident): Prevent a crash when symbol->indent is NULL. svn path=/trunk/; revision=276
* Add ctype_name, a function to convert a CTYPE symbol to a stringJohan Dahlin2008-05-311-0/+14
| | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * giscanner/sourcescanner.py (ctype_name): Add ctype_name, a function to convert a CTYPE symbol to a string svn path=/trunk/; revision=275
* Revert back to using temporary files to send in headers. Allow FunctionsJohan Dahlin2008-05-245-33/+65
| | | | | | | | | | | | | | | | | | | 2008-05-24 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/giscannermodule.c (pygi_source_scanner_append_filename), (pygi_source_scanner_parse_file): * giscanner/glibtransformer.py: * giscanner/sourcescanner.py: Revert back to using temporary files to send in headers. Allow Functions to be passed in as callbacks, add a couple of try/excepts missing features. We can now scan pango svn path=/trunk/; revision=274
* Clean up and refactor enum namespacingJohan Dahlin2008-05-095-20/+23
| | | | svn path=/trunk/; revision=273
* Move namespace stripping glibtransformer->transformerJohan Dahlin2008-05-092-11/+11
| | | | | | | | | | | 2008-05-08 Johan Dahlin <johan@gnome.org> * giscanner/glibtransformer.py: * giscanner/transformer.py: Move namespace stripping glibtransformer->transformer svn path=/trunk/; revision=272
* Move part of the namespace prefix parsing from glibtransformer->transformerJohan Dahlin2008-05-093-24/+50
| | | | svn path=/trunk/; revision=271
* Improve repr() for ast nodesJohan Dahlin2008-05-081-6/+6
| | | | svn path=/trunk/; revision=270
* Resurrect GIDLJohan Dahlin2008-05-081-11/+12
| | | | svn path=/trunk/; revision=269
* Introduce a namespace ast nodeJohan Dahlin2008-05-084-25/+32
| | | | | | | | | | | | | | 2008-05-08 Johan Dahlin <johan@gnome.org> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * tools/g-ir-scanner: Introduce a namespace ast node svn path=/trunk/; revision=268
* Add data type constantsJohan Dahlin2008-05-061-1/+55
| | | | svn path=/trunk/; revision=267
* Move sourcescanner symbols to the sourcescanner module, instead of in theJohan Dahlin2008-05-053-72/+74
| | | | | | | | | | | | | 2008-05-05 Johan Dahlin <johan@gnome.org> * giscanner/__init__.py: * giscanner/sourcescanner.py: * giscanner/transformer.py: Move sourcescanner symbols to the sourcescanner module, instead of in the global __init__ namespace. svn path=/trunk/; revision=266
* Handle missing parameters better, allow - and + in .la dlname filenames.Johan Dahlin2008-05-031-1/+3
| | | | | | | | | | | | 2008-05-03 Johan Dahlin <johan@gnome.org> * giscanner/glibtransformer.py: * tools/g-ir-scanner: Handle missing parameters better, allow - and + in .la dlname filenames. svn path=/trunk/; revision=262
* Parse struct fields properly, improve debugging.Johan Dahlin2008-05-035-16/+57
| | | | | | | | | | | | | | 2008-05-03 Johan Dahlin <johan@gnome.org> * giscanner/__init__.py: * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: Parse struct fields properly, improve debugging. svn path=/trunk/; revision=261
* Use transfer-ownership everywhere, to mark ownership/calle/caller etc.Johan Dahlin2008-04-303-9/+19
| | | | | | | | | | | | | | 2008-04-29 Johan Dahlin <johan@gnome.org> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/transformer.py: * tests/parser/Foo-expected.gir: * TODO: Use transfer-ownership everywhere, to mark ownership/calle/caller etc. svn path=/trunk/; revision=260
* Write record/structs to gir file too. Add a couple of tests, fix an off byJohan Dahlin2008-04-294-8/+46
| | | | | | | | | | | | | | | | 2008-04-29 Johan Dahlin <jdahlin@async.com.br> * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * giscanner/xmlwriter.py: * tests/parser/Foo-expected.gir: * tests/parser/foo-object.h: Write record/structs to gir file too. Add a couple of tests, fix an off by one error in xmlwriter.py. svn path=/trunk/; revision=257
* Calculate the line length properly, include the provided extra indentationJohan Dahlin2008-04-281-6/+6
| | | | | | | | | | 2008-04-28 Johan Dahlin <johan@gnome.org> * giscanner/xmlwriter.py: Calculate the line length properly, include the provided extra indentation in the calculation, really. svn path=/trunk/; revision=256
* Add a --strip-prefix and sort out confusion between names and symbols forJohan Dahlin2008-04-284-8/+30
| | | | | | | | | | | | | | | | | 2008-04-28 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * tools/g-ir-scanner: Add a --strip-prefix and sort out confusion between names and symbols for functions and struct + derivaties. Refactor bootstrap of g-ir-scanner, so we can set options on Transformer() before parsing everything. svn path=/trunk/; revision=255
* Avoid recursion when scanning girepository.hJohan Dahlin2008-04-282-0/+5
| | | | | | | | | | | | | 2008-04-28 Johan Dahlin <johan@gnome.org> * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion when scanning girepository.h * giscanner/sourcescanner.py (SourceScanner._preprocess): Define a __GI_SCANNER__ when we run. svn path=/trunk/; revision=254
* Rename most c:identifier to c:type. Add new ones toJohan Dahlin2008-04-284-8/+20
| | | | | | | | | | | | | | | | 2008-04-28 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * tests/parser/Foo-expected.gir: * tests/parser/utility-expected.gir: Rename most c:identifier to c:type. Add new ones to class/interface/enum/boxed. svn path=/trunk/; revision=252
* Move c:identifier from return-value to subchild type, as per JürgsJohan Dahlin2008-04-283-6/+7
| | | | | | | | | | | | | | | 2008-04-28 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * tests/parser/Foo-expected.gidl: * tests/parser/Makefile.am: Move c:identifier from return-value to subchild type, as per Jürgs suggestion svn path=/trunk/; revision=250
* Check explicitly for None, so we can write FalseJohan Dahlin2008-04-281-1/+1
| | | | svn path=/trunk/; revision=248
* Line wrap license headerJohan Dahlin2008-04-2812-12/+24
| | | | svn path=/trunk/; revision=247
* Write property.type as a child node.Johan Dahlin2008-04-281-3/+3
| | | | | | | | | | | 2008-04-28 Johan Dahlin <johan@gnome.org> * giscanner/girwriter.py: * tests/parser/Foo-expected.gir: Write property.type as a child node. svn path=/trunk/; revision=246
* First steps towards passing distcheckJohan Dahlin2008-04-281-1/+1
| | | | svn path=/trunk/; revision=243
* Include indentation in line length calculationJohan Dahlin2008-04-281-3/+5
| | | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * giscanner/xmlwriter.py: * tests/parser/Foo-expected.gir: Include indentation in line length calculation svn path=/trunk/; revision=239
* Prettify NS parsing using elementtree.Johan Dahlin2008-04-281-8/+15
| | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * giscanner/girparser.py: Prettify NS parsing using elementtree. svn path=/trunk/; revision=238
* Switch over to GIR as the default format. Add a simple GIDL parser. UpdateJohan Dahlin2008-04-283-2/+66
| | | | | | | | | | | | | | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * configure.ac: * giscanner/Makefile.am: * giscanner/girparser.py: * giscanner/glibtransformer.py: * tests/parser/Foo-expected.gidl: * tests/parser/Foo-expected.gir: * tests/parser/Makefile.am: * tests/parser/utility-expected.gidl: * tests/parser/utility-expected.gir: * tools/g-ir-scanner: Switch over to GIR as the default format. Add a simple GIDL parser. Update tests and fix simplify makefiles by depending on GNU make extensions. svn path=/trunk/; revision=237
* Refactor pretty attribute indentation to be more generic and always use itJohan Dahlin2008-04-281-39/+30
| | | | svn path=/trunk/; revision=236
* Wrap attributes for lines which are wider than 79 charactersJohan Dahlin2008-04-281-0/+17
| | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * giscanner/xmlwriter.py: Wrap attributes for lines which are wider than 79 characters svn path=/trunk/; revision=235
* Simplify & Remove a bit of unused codeJohan Dahlin2008-04-281-11/+22
| | | | svn path=/trunk/; revision=234
* Allow parenthesis in annotationsJohan Dahlin2008-04-276-47/+95
| | | | | | | | | | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * giscanner/scannerlexer.l: Allow parenthesis in annotations * giscanner/ast.py: * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: Add initial sequence support, including annotation. Refactor type handling a bit. svn path=/trunk/; revision=233
* Cast the getter, avoids a compilation warning.Johan Dahlin2008-04-271-1/+2
| | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * giscanner/giscannermodule.c (]): Cast the getter, avoids a compilation warning. svn path=/trunk/; revision=231
* Split out nodes to ast.py and glibast.pyJohan Dahlin2008-04-268-197/+244
| | | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <johan@gnome.org> * giscanner/Makefile.am: * giscanner/ast.py: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: Split out nodes to ast.py and glibast.py svn path=/trunk/; revision=229
* Rename treebuilder to transformer and gobjectreebuilder toJohan Dahlin2008-04-266-12/+12
| | | | | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <jdahlin@async.com.br> * giscanner/Makefile.am: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/gobjecttreebuilder.py: * giscanner/transformer.py: * giscanner/treebuilder.py: * tools/g-ir-scanner: Rename treebuilder to transformer and gobjectreebuilder to glibtransformer. svn path=/trunk/; revision=228
* Add LGPLv2 license header and install all python filesJohan Dahlin2008-04-2611-6/+205
| | | | | | | | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <jdahlin@async.com.br> * giscanner/Makefile.am: * giscanner/__init__.py: * giscanner/cgobject.py: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/gobjecttreebuilder.py: * giscanner/odict.py: * giscanner/sourcescanner.py: * giscanner/treebuilder.py: * giscanner/xmlwriter.py: * tools/Makefile.am: * tools/g-ir-scanner: Add LGPLv2 license header and install all python files svn path=/trunk/; revision=227
* Add support for virtual methods. Pair struct FooClass with struct Foo.Johan Dahlin2008-04-255-50/+167
| | | | | | | | | | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <jdahlin@async.com.br> * TODO: * giscanner/gidlwriter.py: * giscanner/giscannermodule.c (pygi_source_directive_new), (directive_get_options), (pygi_source_symbol_new), (symbol_get_base_type), (pygi_source_type_new), (type_get_base_type), (type_get_child_list), (pygi_source_scanner_get_symbols), (pygi_source_scanner_get_directives): * giscanner/gobjecttreebuilder.py: * giscanner/sourcescanner.py: * giscanner/treebuilder.py: * tests/parser/foo-object.h: Add support for virtual methods. Pair struct FooClass with struct Foo. Clean up the SourceScanner bindings a bit. Add a testcase for virtual methods. svn path=/trunk/; revision=226
* Add support for signalsJohan Dahlin2008-04-253-2/+56
| | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <jdahlin@async.com.br> * giscanner/cgobject.py: * giscanner/gidlwriter.py: * giscanner/gobjecttreebuilder.py: Add support for signals * tests/parser/foo.c (foo_object_class_init): * Foo-expected.gidl: Add a signal and update the expected output. svn path=/trunk/; revision=225
* Add support for source/header annotations.Johan Dahlin2008-04-257-37/+252
| | | | | | | | | | | | | | | | | | | | | | 2008-04-24 Johan Dahlin <jdahlin@async.com.br> * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/giscannermodule.c (directive_get_name), (directive_get_value), (directive_get_options), (symbol_get_directives), (symbol_set_directives), (pygi_source_scanner_parse_file), (pygi_source_scanner_lex_filename), (pygi_source_scanner_get_directives), (init_giscanner): * giscanner/sourcescanner.c (gi_source_scanner_get_directives): * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: * giscanner/treebuilder.py: * tools/g-ir-scanner: Add support for source/header annotations. svn path=/trunk/; revision=224