예제 #1
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(AssignPEffectAstNode astNode)
 {
     if (astNode.AssignOperator == Traits.AssignOperator.ASSIGN && MasterExporter.IsTerm(astNode.Argument2))
     {
         EffectsData.Add(new ObjectAssignEffect((ObjectFunctionTerm)MasterExporter.ToTerm(astNode.Argument1), MasterExporter.ToTerm(astNode.Argument2)));
     }
     else
     {
         EffectsData.Add(new NumericAssignEffect(astNode.AssignOperator, (NumericFunction)MasterExporter.ToNumericExpression(astNode.Argument1), MasterExporter.ToNumericExpression(astNode.Argument2)));
     }
 }