summaryrefslogtreecommitdiff
path: root/giscanner/scannerlexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/scannerlexer.l')
-rw-r--r--giscanner/scannerlexer.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 971b3a73..c2fb7234 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -513,7 +513,8 @@ print_error (GISourceScanner *scanner)
{
if (yytext[0]) {
char *filename = g_file_get_parse_name (scanner->current_file);
- fprintf(stderr, "%s:%d: unexpected character `%c'\n", filename, lineno, yytext[0]);
+ gchar *error = g_strdup_printf ("%s:%d: unexpected character `%c'", filename, lineno, yytext[0]);
+ scanner->errors = g_slist_prepend (scanner->errors, error);
g_free (filename);
}
}