TokenType cur = current ();
TokenType pre = tokens[index - 1].type;
- throw new ParseError.SYNTAX (get_error ("expected %s but got %s with previous %s".printf (type.to_string (), cur.to_string (), pre.to_string())));
+ throw new ParseError.SYNTAX (get_error ("expected %s but got %s with previous %s"), type.to_string (), cur.to_string (), pre.to_string());
}
inline bool expect_terminator () throws ParseError {
TokenType cur = current ();
- throw new ParseError.SYNTAX (get_error ("expected line end or semicolon but got %s".printf (cur.to_string())));
+ throw new ParseError.SYNTAX (get_error ("expected line end or semicolon but got %s"), cur.to_string());
}
inline SourceLocation get_location () {
TokenType cur = current ();
TokenType pre = tokens[index-1].type;
- throw new ParseError.SYNTAX (get_error ("expected declaration but got %s with previous %s".printf (cur.to_string (), pre.to_string())));
+ throw new ParseError.SYNTAX (get_error ("expected declaration but got %s with previous %s"), cur.to_string (), pre.to_string());
}
void parse_declarations (Symbol parent, bool root = false) throws ParseError {
return true;
}
- throw new ParseError.SYNTAX (get_error ("expected %s".printf (type.to_string ())));
+ throw new ParseError.SYNTAX (get_error ("expected %s"), type.to_string ());
}
inline SourceLocation get_location () {
if (ModifierFlags.ABSTRACT in flags
|| ModifierFlags.VIRTUAL in flags
|| ModifierFlags.OVERRIDE in flags) {
- throw new ParseError.SYNTAX (get_error ("the modifiers `abstract', `virtual', and `override' are not valid for %s methods".printf ((ModifierFlags.CLASS in flags) ? "class" : "static")));
+ throw new ParseError.SYNTAX (get_error ("the modifiers `abstract', `virtual', and `override' are not valid for %s methods"), (ModifierFlags.CLASS in flags) ? "class" : "static");
}
}