Commit be1e3082 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

widl: Allow source location to span over multiple lines.

parent edca5937
......@@ -2195,7 +2195,7 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
*/
if (cur && input_name == cur->where.input_name)
error_loc( "%s: redefinition error; original definition was at %s:%d\n",
cur->name, cur->where.input_name, cur->where.line_number );
cur->name, cur->where.input_name, cur->where.first_line );
name = declare_var(attrs, decl_spec, decl, 0);
cur = type_new_alias(&name->declspec, name->name);
......@@ -3392,8 +3392,9 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
void init_location( struct location *where )
{
where->input_name = input_name ? input_name : "stdin";
where->line_number = line_number;
where->near_text = parser_text;
where->first_line = line_number;
where->last_line = line_number;
}
type_t *find_parameterized_type(type_t *type, typeref_list_t *params)
......
......@@ -32,7 +32,7 @@
#include "utils.h"
#include "parser.h"
#define CURRENT_LOCATION { input_name ? input_name : "stdin", line_number, parser_text }
#define CURRENT_LOCATION { input_name ? input_name : "stdin", parser_text, line_number, 0, line_number, 0 }
static const int want_near_indication = 0;
......@@ -48,7 +48,7 @@ static void make_print(char *str)
static void generic_msg( const struct location *where, const char *s, const char *t, va_list ap )
{
fprintf( stderr, "%s:%d: %s: ", where->input_name, where->line_number, t );
fprintf( stderr, "%s:%d: %s: ", where->input_name, where->first_line, t );
vfprintf( stderr, s, ap );
if (want_near_indication)
......
......@@ -313,8 +313,11 @@ enum type_basic_type
struct location
{
const char *input_name;
int line_number;
const char *near_text;
int first_line;
int last_line;
int first_column;
int last_column;
};
struct str_list_entry_t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment