Пример #1
0
 public ErlangBinaryExpression(ErlangExpression left, ErlangExpression right, ErlangOperatorKind op)
 {
     Left     = left;
     Right    = right;
     Operator = op;
     Left.SetParent(this);
     Right.SetParent(this);
 }
Пример #2
0
 public ErlangCaseExpression(ErlangExpression expression, ErlangCaseBranchExpression[] branches)
 {
     Expression = expression;
     Branches   = branches;
     Expression.SetParent(this);
     for (int i = 0; i < Branches.Length; i++)
     {
         Branches[i].SetParent(this);
     }
 }
Пример #3
0
 public ErlangListExpression(ErlangExpression[] elements, ErlangExpression tail)
 {
     Elements = elements;
     Tail     = tail;
     foreach (var elem in Elements)
     {
         elem.SetParent(this);
     }
     if (Tail != null)
     {
         Tail.SetParent(this);
     }
 }
Пример #4
0
 public ErlangCaseBranchExpression(ErlangExpression pattern, ErlangGuardExpression guard, ErlangExpression[] body)
 {
     Pattern = pattern;
     Guard   = guard;
     Body    = body;
     Pattern.SetParent(this);
     if (Guard != null)
     {
         Guard.SetParent(this);
     }
     for (int i = 0; i < Body.Length; i++)
     {
         Body[i].SetParent(this);
     }
 }
Пример #5
0
 public ErlangGuardClauseExpression(ErlangExpression expression, bool isAnd)
 {
     Expression = expression;
     IsAnd      = isAnd;
     Expression.SetParent(this);
 }