nitc :: ANode :: accept_literal
private fun accept_literal(v: LiteralVisitor) do end
src/literal.nit:56,2--53
redef fun accept_literal(v) do
value = n_integer.text.to_num
if value == null then
v.toolcontext.error(hot_location, "Error: invalid literal `{n_integer.text}`")
end
end
src/literal.nit:81,2--86,4
redef fun accept_literal(v)
do
if not is_valid_augmentation then
v.toolcontext.error(hot_location, "Syntax Error: invalid prefix/suffix combination {prefix}/{suffix}")
return
end
var txt = content.unescape_nit
if txt.length != 3 then
v.toolcontext.error(self.hot_location, "Syntax Error: invalid character literal `{txt}`.")
return
end
self.value = txt.chars[1]
end
src/literal.nit:144,2--156,4
redef fun accept_literal(v)
do
if is_bytestring then
v.toolcontext.error(hot_location, "Error: cannot produce a ByteString on a Superstring")
return
end
if not is_valid_augmentation then
v.toolcontext.error(hot_location, "Error: invalid prefix/suffix combination {prefix}/{suffix}")
return
end
end
src/literal.nit:304,2--314,4
redef fun accept_literal(v)
do
super
if not is_valid_augmentation then
v.toolcontext.error(hot_location, "Error: invalid prefix/suffix combination {prefix}/{suffix}")
return
end
if prefix != "raw" then
bytes = raw_text.unescape_to_bytes
value = bytes.to_s
end
end
src/literal.nit:265,2--276,4