예제 #1
0
 public override void CaseAStructLvalue(AStructLvalue node)
 {
     //a->b => (*a).b
     if (node.GetDotType() is AArrowDotType)
     {
         TArrow arrow = ((AArrowDotType)node.GetDotType()).GetToken();
         node.SetReceiver(new ALvalueExp(new APointerLvalue(new TStar("*", arrow.Line, arrow.Pos), node.GetReceiver())));
         node.SetDotType(new ADotDotType(new TDot(".", arrow.Line, arrow.Pos)));
     }
     base.CaseAStructLvalue(node);
 }
예제 #2
0
 public override void CaseAStructLvalue(AStructLvalue node)
 {
     //Only do namespace
     node.GetReceiver().Apply(this);
     node.GetDotType().Apply(this);
     Value += node.GetName().Text;
 }