Open
Description
The native thrift allows underscore in variable name, but scrooge scala generator does not seem to handle it properly.
This thrift definition
struct StringTuple {
1: string _1,
2: string _2
}
generates
trait StringTuple
extends ThriftStruct
with scala.Product2[String, String]
with java.io.Serializable
{
import StringTuple._
def _1: String
def _2: String
def _passthroughFields: immutable$Map[Short, TFieldBlob] = immutable$Map.empty
def _1 = _1
def _2 = _2
//...
, which is wrong obviously.
The identifiers need to be escaped as long as it uses scala.Product.