summaryrefslogtreecommitdiff
path: root/giscanner
Commit message (Collapse)AuthorAgeFilesLines
* mallardwriter: Fix fundamental false alarms for the C formatterJasper St. Pierre2012-08-291-13/+13
| | | | | Just use a constant translation dictionary. If somebody needs something more fancy they can use a custom match.
* mallardwriter: Fix formatting the function nameJasper St. Pierre2012-08-292-3/+3
| | | | This is not what format_type is for.
* girparser: Track methods/constructors by symbolJasper St. Pierre2012-08-292-13/+22
| | | | | | | In order to be able to linkify a constructor/method, we need to first track it by symbol. https://bugzilla.gnome.org/show_bug.cgi?id=682969
* ast: Remove what looks to be a copy/paste errorJasper St. Pierre2012-08-291-2/+0
| | | | | | | | A symbol isn't a ctype. None of the tests failed when I removed this, git blame wasn't very enlightening, and we don't remove this in the remove method, so I'm thinking it's an error. https://bugzilla.gnome.org/show_bug.cgi?id=682969
* mallardwriter: Remove some silly codeJasper St. Pierre2012-08-291-2/+1
| | | | This silly code was part of a debugging harness.
* mallardwriter: Fix whitespaceJasper St. Pierre2012-08-291-1/+1
| | | | | The whitespace should come included with the surrounding 'other' tokens. We shouldn't need to add any.
* mallardwriter: Fix property and signal outputJasper St. Pierre2012-08-291-4/+10
|
* giscanner: Fix make check issuesJasper St. Pierre2012-08-292-12/+14
| | | | Whoops.
* mallardwriter: Hack a lot more on document block processingJasper St. Pierre2012-08-291-82/+214
| | | | | Use a new regex scanner to parse the contents of document blocks and emit the proper XML document for it.
* mallardwriter: Remove a silly try/exceptJasper St. Pierre2012-08-291-4/+1
| | | | This isn't necessary as far as I can tell
* mallardwriter: Use a more generic system for language formattingJasper St. Pierre2012-08-291-7/+16
|
* mallardwriter: Remove some unused stuffJasper St. Pierre2012-08-281-6/+0
|
* docmain: Fix error messageJasper St. Pierre2012-08-281-1/+1
|
* scanner: methods cannot have an out-arg as their first argTorsten Schönfeld2012-08-211-0/+6
| | | | | | | | | | | | This ensures that if the first argument of a function like gboolean gdk_rgba_parse (GdkRGBA *rgba, const gchar *spec); is annotated as being an out-arg, the result is a class function with two arguments, not a method with one argument. Previously, the (out) annotation was simply ignored. https://bugzilla.gnome.org/show_bug.cgi?id=682124
* Revert "Implement "rename to" annotation for records"Colin Walters2012-08-131-15/+5
| | | | | | | | | | | | | This reverts commit 764366f7e4ef5a765a24ffac8c60b811f38b9ad9. It can't work right now because to really use the structures, you need to register them as a boxed, and that means we also need to rename the boxed type. A future version of this patch will need to handle both the structure name and the GType name. https://bugzilla.gnome.org/show_bug.cgi?id=675985
* scanner: handle unsigned properly for type of defined sizeAlban Browaeys2012-08-031-1/+17
|
* giscanner: special case G_GINT64_CONSTANT and G_GUINT64_CONSTANT + miscAlban Browaeys2012-08-033-4/+28
| | | | | | | | | This let the macro expands to its value as gint64/guint64. Also - fix lexer identifier/typdef detection for macro and misc - do not discard cast
* Implement "rename to" annotation for recordsJon Nordby2012-07-271-5/+15
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=675985 Moving the early annotation pass is needed to avoid the first type resolve pass to resolve to the not-renamed type.
* scanner: support stability tagEvan Nemerson2012-07-103-1/+14
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=679160
* scanner: Ensure "complete_ctype" patch doesn't throw an exception for ↵Colin Walters2012-07-081-0/+2
| | | | | | | | anonymous unions The previous patch introduced a regression where we would crash on encountering an anonymous union. Work around this by just writing out 'gpointer' in this case, and add a regression test.
* giscanner: Write detailed information in "type" tag's "c:type" attribute.Krzesimir Nowak2012-07-073-17/+75
| | | | | | | | That is - write also type qualifiers (const and volatile here). Update existing tests and add a new struct to regress.h having members with type qualifiers. https://bugzilla.gnome.org/show_bug.cgi?id=656445
* scanner: Turn dead code into assertionColin Walters2012-07-061-2/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=656445
* giscanner: Fix pointer parsing.Krzesimir Nowak2012-07-061-3/+15
| | | | | | | | | | | | They were parsed in wrong order resulting in having wrong pointer being const. For example - g_settings_list_schemas return type is normally 'const gchar *const *', but parsing result was 'const gchar ** const'. This was unnoticed, because pointer constness information is rather not used by gobject-introspection now. https://bugzilla.gnome.org/show_bug.cgi?id=656445
* Maintransfomer: fix again paring error domains with unregistered enumsGiovanni Campagna2012-07-021-13/+3
| | | | | | | | | Previous fix was wrong, as it called to_underscores_noprefix on a prefixed type name. The actual fix is to call the transformer to do the prefix / type_name split, and turn the latter to underscores. Test case included. https://bugzilla.gnome.org/show_bug.cgi?id=634202
* scanner: Remove propertiesJasper St. Pierre2012-06-281-40/+24
| | | | We don't need a basic getter for a private field - this isn't Java.
* scanner: Don't use an O(N) lookup when we already have a hashmapJasper St. Pierre2012-06-282-7/+5
| | | | This is a general code cleanup.
* Revert scanner fix in 64f3832Jasper St. Pierre2012-06-271-1/+1
| | | | | | This is incorrect -- the type name that's passed to the function should contain a prefix. This fixes error domains for GLib errors. Don't revert doc changes or test additions.
* scanner: complete the enum-to-error-quark fixGiovanni Campagna2012-06-182-2/+5
| | | | | | | | | | Turns out that the problem was not only in the wrong matching to GType enums, but also that the non-GType heuristics used to_underscores instead of to_underscores_noprefix, turning DBusError into D_Bus_Error instead of DBus_Error. Complete with various tests. https://bugzilla.gnome.org/show_bug.cgi?id=669350
* scanner: fix pairing of error quarks with registered enumsGiovanni Campagna2012-06-161-3/+5
| | | | | | | | | | _uscore_type_names maps from the c_symbol_prefix, which has the global ns prefix removed, so we need to split the function symbol before the lookup. Previously it worked because it used the heuristics for unregistered enums (and failed for GDBusError, which has two uppercase letters in succession) https://bugzilla.gnome.org/show_bug.cgi?id=669350
* scanner: allow for functions that look like constructors but aren'tDan Winship2012-05-261-3/+4
| | | | | | | | | | | | If the scanner found a function with _new in its name, but not prefixed by the name of a known type, it would assume that the function was a constructor, and then complain that it couldn't figure out what it was a constructor for, and mark it introspectable=0. Instead, just assume that the function is not actually a constructor in that case (unless it's explicitly tagged as such). https://bugzilla.gnome.org/show_bug.cgi?id=676815
* Add the fixed width C99 types from stdint.hNeil Roberts2012-05-021-0/+9
| | | | | | | | | | | | | C99 has standard types for fixed width signed and unsigned integers. This adds types to giscanner to map them to the glib equivalent types. stdint.h also has other types to specify specify sizes with at least a certain number of bits, the fastest type with at least some number of bits, a type big enough to store a pointer and a type containing the most number of bits. These don't map well to glib types so I have ignored them. https://bugzilla.gnome.org/show_bug.cgi?id=674796
* annotationparser: cleanup and add tests for the new warnings we now emitDieter Verfaillie2012-04-172-31/+22
| | | | | | | | | Including: - handle things in the logical order encountered (first colon, then annotations) - correctly report column when missing a colon on the identifier part - small type fixes - remove no longer useful "parameter/tag expected" warnings
* Revert "annotationparser: indent _parse_comment_block gtkdoc code"Dieter Verfaillie2012-04-171-95/+95
| | | | | | | | | This reverts commit f41525d54f53edd9b0d665397f7c6c755ee3616b and adds a more complete solution as the original commit only handled empty lines between the GTK-Doc comment block start token "/**" and the identifier. https://bugzilla.gnome.org/show_bug.cgi?id=673806
* annotationparser: indent _parse_comment_block gtkdoc codeAlban Browaeys2012-04-171-89/+90
| | | | | | | | | | | | | | | | | | | | The current logic in _parse_comment_block of the annotationparser check the identifier and use variables that only makes sense if a result was returned (column_offset, original_line). This patch indent the logic so it is only triggered if a result is found. Otherwise it returns None as expected by call chain "parse > parse_comment_block > _parse_comment_block": ie in "parse": comment_block = self.parse_comment_block(comment) if comment_block is not None: This still raises a lot of warnings but does not abort while generating gir for libgnomekbd, mutter or telepathy-glib (those thus have to be tweaked not to call g-ir-scanner with --warn-error at least until the parser mask those false positives or the doc from those projects is fixed to comply with the behaviour expected by giscanner). https://bugzilla.gnome.org/show_bug.cgi?id=673806
* Don't link with gthread-2.0Kalev Lember2012-04-131-1/+1
| | | | | | | Commit 2fff986 removed the use of g_thread_init() and we don't use any other symbols from gthread-2.0. https://bugzilla.gnome.org/show_bug.cgi?id=674065
* Compare filenames using g_file_equal()Johan Dahlin2012-04-092-1/+15
| | | | | | Makes it work on case-sensitive file systems such as HFS+. https://bugzilla.gnome.org/show_bug.cgi?id=667405
* Pass in LDFLAGS to the dumperJohan Dahlin2012-04-091-8/+9
| | | | | | | | We should honor LDFLAGS environment variable set by the user, so options such as -Wl,--enable-new-dtags properly get passed to the linker when creating the dumper binary https://bugzilla.gnome.org/show_bug.cgi?id=670152
* annotationparser: split validate() into sub-methodsWill Thompson2012-04-091-58/+67
| | | | | | | | Most cases in validate() were already simply calls to _validate_option() with particular arguments; this extracts the code from the remaining options to their own methods, making the dispatch table more legible. https://bugzilla.gnome.org/show_bug.cgi?id=670985
* annotationparser: correct "maximium" in error messagesWill Thompson2012-04-091-3/+3
| | | | | | | | "Maximium" is not an English word. Even if corrected to "maximum" (which is), "at maximum" is not conventional usage: "at most" is more idiomatic. https://bugzilla.gnome.org/show_bug.cgi?id=670985
* annotationparser: remove duplication of annotation namesWill Thompson2012-04-091-13/+13
| | | | | | | | | | Previously, the validation code compared each option name to a constant (such as OPT_ALLOW_NONE) which expands to the string used in a source file, and if they matched it would typically pass that same string to _validate_option(). But the annotation name was written out longhand each time, which seemed strange to me. https://bugzilla.gnome.org/show_bug.cgi?id=670985
* giscanner: Don't run pkg-config when there's no packages specifiedJasper St. Pierre2012-04-091-3/+4
| | | | | | | This prevents a simple error from pkg-config, "Must specify package names on command line" https://bugzilla.gnome.org/show_bug.cgi?id=673668
* Split parameter and tag storage in annotationparser parse treeDieter Verfaillie2012-04-053-45/+53
| | | | | | | | | | | This avoids tags overwriting parameters if they happen to share the same name. For example, this was triggered by valid code in libgnome-keyring. tests/scanner/regress.c and tests/scanner/regress.h test written by Colin Walters <walters@verbum.org>. https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Do the filename filtering in scannerlexerJohan Dahlin2012-04-052-8/+18
| | | | | This avoids a bit of python work and reduces the amount of allocations.
* Don't parse doc comments in dependenciesJohan Dahlin2012-04-052-2/+8
| | | | | Only parse doc comments for the files we pass in on the command line to g-ir-scanner, not the included dependencies.
* Replace ''' with """, to avoid confusing syntax highlightning in emacsJohan Dahlin2012-04-051-8/+8
|
* Now make AnnotationParser do what gobject-introspection needs it to do.Dieter Verfaillie2012-04-055-228/+1262
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Make AnnotationParser._parse_comment() do what gtk-doc does.Dieter Verfaillie2012-04-051-169/+226
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Don't munch /* and */ comment start and end markers.Dieter Verfaillie2012-04-051-2/+2
| | | | | | | | | | | In Sandro Sigala's original c-c++-grammars code, this function was known as "static void skip_comment(void)". It was built this way instead of a lex pattern because it didn't need to save the matched comment in the "yytext" buffer. This is still true as we directly assign the matched comment to the scanner object. So simply prepend and append the markers back where they belong. https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Add comment documenting we're ignoring C++ style comments.Dieter Verfaillie2012-04-051-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672254
* g-ir-doc-tool: Fix -o option, use abspath instead of dirnameTomeu Vizoso2012-03-151-1/+1
|