ExprCommon in VCC's AST transformer

Dec 11, 2012 at 2:44 PM

Hi, 

I'd like to understand the AST transformer part of VCC's code. In particular, can someone explain the purpose of ExprCommon?

[type] ExprCommon = 
{
  Token:Token;
Type:Type;
}

In particular, I don't understand why it is used when defining, for example, a Ref expression (Ref of ExprCommon * Variable), where Variable definition already includes a type. I'm guessing that in Ref expression the type in ExprCommon and the type in Variable definition must be the same. (I am guessing that ExprCommon is being used to define the type to a Macro expression and the final type in a Cast expression.)

Thanks,
Edgar