summaryrefslogtreecommitdiffstats
path: root/dimension/directives.rules
diff options
context:
space:
mode:
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;