public override void VisitConcatEx(ConcatEx x) { var expressions = new List <ValuePoint>(); foreach (var expression in x.Expressions) { expressions.Add(CreateRValue(expression)); } Result(new ConcatExPoint(x, expressions)); }
private static Expression ToBinaryExpression(ConcatEx e) { if (e.Expressions.Length == 0) { return(new EmptyExpression()); } else if (e.Expressions.Length == 1) { return(Parse(e.Expressions [0])); } else { Expression result_ex = ToBinaryExpression(e.Expressions [0], e.Expressions [1], BinaryOp.CONCAT); foreach (var additional_ex in e.Expressions.Skip(2)) { result_ex = ToBinaryExpression(result_ex, Parse(additional_ex), BinaryOp.CONCAT); } return(result_ex); } }
public override void VisitConcatEx(ConcatEx x) { VisitElementList(x.Expressions, Tokens.T_DOT, "."); }
/// <summary> /// Visit expressions in PHP concat. /// </summary> /// <param name="x"></param> virtual public void VisitConcatEx(ConcatEx x) { VisitList(x.Expressions); }
override public void VisitConcatEx(ConcatEx x) { _serializer.StartSerialize(typeof(ConcatEx).Name, SerializeSpan(x.Span)); base.VisitConcatEx(x); _serializer.EndSerialize(); }
/// <inheritdoc /> public override void VisitConcatEx(ConcatEx x) { RValueResult(x); }
/// <summary> /// Initializes a new instance of the <see cref="ConcatExPoint" /> class. /// </summary> /// <param name="concat">Concatenation expression of multiple expressions</param> /// <param name="parts">Program points with expressions to concatenate</param> internal ConcatExPoint(ConcatEx concat, IEnumerable <ValuePoint> parts) { Parts = parts; Concat = concat; }
/// <inheritdoc /> override public void VisitConcatEx(ConcatEx x) { var expressions = visitExpressionList(x.Expressions); result = new ConcatEx(x.Position, expressions); }