~snowball-yiddish-dev/snowball-yiddish/trunk

« back to all changes in this revision

Viewing changes to snowball/compiler/analyser.c

  • Committer: richard
  • Date: 2011-06-29 12:13:11 UTC
  • Revision ID: svn-v4:633ccae0-01f4-0310-8c99-d3591da6f01f:trunk:546
Backport patch from Xapian's fork of snowball (thanks to Olly Betts):
Report "FILE:LINE:" before each error so tools like vim's quickfix mode can
parse this and bring up the line with the error automatically.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
static void error2(struct analyser * a, int n, int x) {
80
80
    struct tokeniser * t = a->tokeniser;
81
81
    count_error(a);
82
 
    fprintf(stderr, "Line %d", t->line_number);
83
 
    if (t->get_depth > 0) fprintf(stderr, " (of included file)");
84
 
    fprintf(stderr, ": ");
 
82
    fprintf(stderr, "%s:%d: ", t->file, t->line_number);
85
83
    if (n >= 30) report_b(stderr, t->b);
86
84
    switch (n) {
87
85
        case 0: