summaryrefslogtreecommitdiffstats
path: root/dimension/common.prologue
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-04-18 21:43:24 -0400
committerTavian Barnes <tavianator@gmail.com>2010-04-18 22:29:41 -0400
commit85c5f17dcd09540e31dc879166502984e483609d (patch)
tree6bc4c9ea1f265756e8b563885dabcdc0af09b0cf /dimension/common.prologue
parent6437ab96674accfb5d5d85066e58d20887c926d7 (diff)
downloaddimension-85c5f17dcd09540e31dc879166502984e483609d.tar.xz
Have dmnsn_diagnostic() take a dmnsn_parse_location.
Diffstat (limited to 'dimension/common.prologue')
-rw-r--r--dimension/common.prologue11
1 files changed, 2 insertions, 9 deletions
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;