summaryrefslogtreecommitdiffstats
path: root/dimension/directives.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/directives.rules
parent6437ab96674accfb5d5d85066e58d20887c926d7 (diff)
downloaddimension-85c5f17dcd09540e31dc879166502984e483609d.tar.xz
Have dmnsn_diagnostic() take a dmnsn_parse_location.
Diffstat (limited to 'dimension/directives.rules')
-rw-r--r--dimension/directives.rules20
1 files changed, 6 insertions, 14 deletions
diff --git a/dimension/directives.rules b/dimension/directives.rules
index 82bdd8f..e199fe3 100644
--- a/dimension/directives.rules
+++ b/dimension/directives.rules
@@ -47,10 +47,8 @@ LANGUAGE_DIRECTIVE: "#include" STRING {
dmnsn_delete_astnode($3);
}
| "#version" FLOAT ";" {
- dmnsn_diagnostic(@$.first_filename, @$.first_line,
- @$.first_column,
- "WARNING: POV-Ray #version"
- " backwards-compatibility not supported");
+ dmnsn_diagnostic(@$, "WARNING: POV-Ray #version backwards-"
+ "compatibility not supported");
dmnsn_delete_astnode($2);
}
| "#debug" STRING {
@@ -58,15 +56,11 @@ LANGUAGE_DIRECTIVE: "#include" STRING {
dmnsn_delete_astnode($2);
}
| "#warning" STRING {
- dmnsn_diagnostic(@$.first_filename, @$.first_line,
- @$.first_column,
- "WARNING: %s", (const char *)$2.ptr);
+ dmnsn_diagnostic(@$, "WARNING: %s", (const char *)$2.ptr);
dmnsn_delete_astnode($2);
}
| "#error" STRING {
- dmnsn_diagnostic(@$.first_filename, @$.first_line,
- @$.first_column,
- "%s", (const char *)$2.ptr);
+ dmnsn_diagnostic(@$, "%s", (const char *)$2.ptr);
dmnsn_delete_astnode($2);
YYERROR;
}
@@ -87,10 +81,8 @@ LANGUAGE_DIRECTIVE: "#include" STRING {
unsigned int nparams_given = dmnsn_array_size($3.children);
if (nparams_given != nparams) {
- dmnsn_diagnostic(@$.first_filename, @$.first_line,
- @$.first_column,
- "wrong number of macro arguments"
- " (%u; should be %u)",
+ dmnsn_diagnostic(@$, "wrong number of macro arguments"
+ " (%u; should be %u)",
nparams_given, nparams);
dmnsn_delete_astnode($3);
YYERROR;