import phase
redef class ToolContext
+ # Parses literal values in the whole AST and produces errors if needed
var literal_phase: Phase = new LiteralPhase(self, null)
end
do
var txt = self.n_char.text.unescape_nit
if txt.length != 3 then
- v.toolcontext.error(self.hot_location, "Invalid character literal {txt}")
+ v.toolcontext.error(self.hot_location, "Syntax Error: invalid character literal `{txt}`.")
return
end
self.value = txt.chars[1]