THRIFT-5317 netstd compiler does not escape keywords

Client: netstd
Patch: Jens Geyer
This commit is contained in:
Jens Geyer 2020-12-01 22:36:31 +01:00
parent b72b674efc
commit c981cf8891

View File

@ -1066,7 +1066,7 @@ void t_netstd_generator::generate_netstd_struct_definition(ostream& out, t_struc
{
out << ", ";
}
out << type_name((*m_iter)->get_type()) << " " << (*m_iter)->get_name();
out << type_name((*m_iter)->get_type()) << " " << normalize_name((*m_iter)->get_name());
}
}
out << ") : this()" << endl
@ -1077,7 +1077,7 @@ void t_netstd_generator::generate_netstd_struct_definition(ostream& out, t_struc
{
if (field_is_required(*m_iter))
{
out << indent() << "this." << prop_name(*m_iter) << " = " << (*m_iter)->get_name() << ";" << endl;
out << indent() << "this." << prop_name(*m_iter) << " = " << normalize_name((*m_iter)->get_name()) << ";" << endl;
}
}