コード例 #1
0
        protected override IElement VisitVariableAssignment(VariableAssignmentElement assignment)
        {
            assignment = (VariableAssignmentElement)base.VisitVariableAssignment(assignment);
            if (!inlineable.Contains(assignment.VariableIndex))
                return assignment;

            values.Add(assignment.VariableIndex, assignment.Value);
            return null;
        }
コード例 #2
0
 protected override IElement VisitVariableAssignment(VariableAssignmentElement assignment)
 {
     if (variableIndexPredicate(assignment.VariableIndex)) {
         var details = GetDetails(assignment.VariableIndex);
         details.AssignmentCount += 1;
         details.Trivial = details.Trivial && IsTrivial(assignment.Value);
     }
     return base.VisitVariableAssignment(assignment);
 }
コード例 #3
0
ファイル: ElementVisitor.cs プロジェクト: ashmind/expressive
 protected virtual IElement VisitVariableAssignment(VariableAssignmentElement assignment)
 {
     assignment.Value = this.Visit(assignment.Value);
     return(assignment);
 }