aboutsummaryrefslogtreecommitdiff
path: root/expr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'expr.cc')
-rw-r--r--expr.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/expr.cc b/expr.cc
index 5e7afe6..30a25b5 100644
--- a/expr.cc
+++ b/expr.cc
@@ -317,9 +317,9 @@ void ParseFunc(const Loc& loc,
f->AddArg(v);
i += n;
if (i == s.size()) {
- ERROR("%s:%d: *** unterminated call to function '%s': "
- "missing '%c'.",
- LOCF(loc), f->name(), terms[0]);
+ ERROR_LOC(loc, "*** unterminated call to function '%s': "
+ "missing '%c'.",
+ f->name(), terms[0]);
}
nargs++;
if (s[i] == terms[0]) {
@@ -332,8 +332,8 @@ void ParseFunc(const Loc& loc,
}
if (nargs <= f->min_arity()) {
- ERROR("%s:%d: *** insufficient number of arguments (%d) to function `%s'.",
- LOCF(loc), nargs - 1, f->name());
+ ERROR_LOC(loc, "*** insufficient number of arguments (%d) to function `%s'.",
+ nargs - 1, f->name());
}
*index_out = i;
@@ -365,8 +365,8 @@ Value* ParseDollar(const Loc& loc, StringPiece s, size_t* index_out) {
if (g_flags.enable_kati_warnings) {
size_t found = sym.str().find_first_of(" ({");
if (found != string::npos) {
- KATI_WARN("%s:%d: *warning*: variable lookup with '%c': %.*s",
- loc, sym.str()[found], SPF(s));
+ KATI_WARN_LOC(loc, "*warning*: variable lookup with '%c': %.*s",
+ sym.str()[found], SPF(s));
}
}
Value* r = new SymRef(sym);
@@ -386,8 +386,8 @@ Value* ParseDollar(const Loc& loc, StringPiece s, size_t* index_out) {
ParseFunc(loc, func, s, i+1, terms, index_out);
return func;
} else {
- KATI_WARN("%s:%d: *warning*: unknown make function '%.*s': %.*s",
- loc, SPF(lit->val()), SPF(s));
+ KATI_WARN_LOC(loc, "*warning*: unknown make function '%.*s': %.*s",
+ SPF(lit->val()), SPF(s));
}
}
@@ -428,12 +428,12 @@ Value* ParseDollar(const Loc& loc, StringPiece s, size_t* index_out) {
// for detail.
size_t found = s.find(cp);
if (found != string::npos) {
- KATI_WARN("%s:%d: *warning*: unmatched parentheses: %.*s",
- loc, SPF(s));
+ KATI_WARN_LOC(loc, "*warning*: unmatched parentheses: %.*s",
+ SPF(s));
*index_out = s.size();
return new SymRef(Intern(s.substr(2, found-2)));
}
- ERROR("%s:%d: *** unterminated variable reference.", LOCF(loc));
+ ERROR_LOC(loc, "*** unterminated variable reference.");
}
}