summaryrefslogtreecommitdiffstats
path: root/dimension/common.rules
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.rules
parent6437ab96674accfb5d5d85066e58d20887c926d7 (diff)
downloaddimension-85c5f17dcd09540e31dc879166502984e483609d.tar.xz
Have dmnsn_diagnostic() take a dmnsn_parse_location.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r--dimension/common.rules12
1 files changed, 3 insertions, 9 deletions
diff --git a/dimension/common.rules b/dimension/common.rules
index cba3669..ff208f2 100644
--- a/dimension/common.rules
+++ b/dimension/common.rules
@@ -121,10 +121,7 @@ OBJECT: FINITE_SOLID_OBJECT
{
dmnsn_astnode *object = dmnsn_find_symbol(symtable, $3.ptr);
if (!object) {
- dmnsn_diagnostic(@3.first_filename, @3.first_line,
- @3.first_column,
- "unbound identifier '%s'",
- (const char *)$3.ptr);
+ dmnsn_diagnostic(@3, "unbound identifier '%s'", (const char *)$3.ptr);
dmnsn_delete_astnode($3);
YYERROR;
} else {
@@ -165,8 +162,7 @@ OBJECT: FINITE_SOLID_OBJECT
}
default:
- dmnsn_diagnostic(@3.first_filename, @3.first_line,
- @3.first_column,
+ dmnsn_diagnostic(@3,
"identifier '%s' is a %s; expected an object type",
(const char *)$3.ptr,
dmnsn_astnode_string(object->type));
@@ -844,9 +840,7 @@ COLOR_KEYWORD_GROUP_INIT: /* empty */ {
COLOR_KEYWORD_ITEM: IDENTIFIER {
dmnsn_astnode *symbol = dmnsn_find_symbol(symtable, $1.ptr);
if (!symbol) {
- dmnsn_diagnostic(@1.first_filename, @1.first_line,
- @1.first_column,
- "unbound identifier '%s'",
+ dmnsn_diagnostic(@1, "unbound identifier '%s'",
(const char *)$1.ptr);
dmnsn_delete_astnode($1);
YYERROR;