AStringExpr
containing value
Add it to explain_str
if auto_add == true
, the default.
# Build an `AStringExpr` containing `value`
#
# Add it to `explain_str` if `auto_add == true`, the default.
fun explain_string(value: String, auto_add: nullable Bool): AStringExpr
do
auto_add = auto_add or else true
var tk = new TString
tk.text = "\"{value}\""
var op = new AStringExpr
op.n_string = tk
op.mtype = string_mtype
op.value = value
op.location = assert_node.location
if auto_add then explain_str.n_exprs.add op
return op
end
src/frontend/explain_assert.nit:119,2--136,4