pchapin / scala

Scalaness: A stagged programming system for embedded systems based on Scala.
0 stars 0 forks source link

Should typedef be supported in nesT? #11

Open pchapin opened 11 years ago

pchapin commented 11 years ago

Currently typedef declarations are not supported in nesT. Although the parser understands them, they are not being handled by the type analysis at the moment. Should they be?

Doing without typedef declarations in a limited language like nesT isn't a problem, but in situations were declarations need to be shared between nesT and nesC it can be awkward. Typical nesC programs make heavy use of typedef so requiring them to not do so for declarations shared with nesT is a bit of an imposition on the nesC programmer.

One potential workaround is to conditionally skip the typedef declaration when compiling a header as nesT (with the help of a suitable predefined macro in the Scalaness compiler). This is, however, a bit strange looking and awkward.