diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-08 18:26:47 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-08 22:45:17 +0100 |
commit | f9a873a0881e189a2d20e4904d40bb0c5cbf0d94 (patch) | |
tree | 71b78f9ddc8cc45198ce560acded84da90b094cb /giscanner/sourcescanner.h | |
parent | 0f4dd5e39a86e9ae749b3b4627488e19d18dd8a5 (diff) | |
download | gobject-introspection-f9a873a0881e189a2d20e4904d40bb0c5cbf0d94.tar.gz |
sourcescanner: collect error messages and expose them
It just printed errors to stderr and always returns success even if parsing
fails. This prevents us to write any tests for it.
As a first step collect all lexing/parsing error messages and print them to stderr after
the scanner is done. This allows us to add some regression tests for !78.
In the future we probably want to raise an exception with those errors if parsing
fails.
Diffstat (limited to 'giscanner/sourcescanner.h')
-rw-r--r-- | giscanner/sourcescanner.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/giscanner/sourcescanner.h b/giscanner/sourcescanner.h index e9fa5421..bcf1afc4 100644 --- a/giscanner/sourcescanner.h +++ b/giscanner/sourcescanner.h @@ -118,6 +118,7 @@ struct _GISourceScanner GHashTable *const_table; gboolean skipping; GQueue conditionals; + GSList *errors; }; struct _GISourceSymbol @@ -162,6 +163,7 @@ void gi_source_scanner_set_macro_scan (GISourceScanner *scanne gboolean macro_scan); GSList * gi_source_scanner_get_symbols (GISourceScanner *scanner); GSList * gi_source_scanner_get_comments (GISourceScanner *scanner); +GSList * gi_source_scanner_get_errors (GISourceScanner *scanner); void gi_source_scanner_free (GISourceScanner *scanner); GISourceSymbol * gi_source_symbol_new (GISourceSymbolType type, GFile *file, int line); |