From 85c5f17dcd09540e31dc879166502984e483609d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 18 Apr 2010 21:43:24 -0400 Subject: Have dmnsn_diagnostic() take a dmnsn_parse_location. --- dimension/common.prologue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'dimension/common.prologue') diff --git a/dimension/common.prologue b/dimension/common.prologue index 06ccdb3..d82b110 100644 --- a/dimension/common.prologue +++ b/dimension/common.prologue @@ -38,12 +38,7 @@ (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ } else { \ - (Current).first_filename = (Current).last_filename = \ - YYRHSLOC(Rhs, 0).last_filename; \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC(Rhs, 0).last_column; \ + (Current) = YYRHSLOC(Rhs, 0); \ } \ } while (0) @@ -58,9 +53,7 @@ dmnsn_new_astnode(dmnsn_astnode_type type, YYLTYPE lloc) .ptr = NULL, .free_fn = NULL, .refcount = dmnsn_malloc(sizeof(unsigned int)), - .filename = lloc.first_filename, - .line = lloc.first_line, - .col = lloc.first_column + .location = lloc }; *astnode.refcount = 1; -- cgit v1.2.3