Exemple #1
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);
     }
 }
Exemple #2
0
 public ErlangFunctionOverloadExpression(ErlangExpression[] parameters, ErlangGuardExpression guard, ErlangExpression[] body)
 {
     // TODO: verify parameters are only, atom, variable, constant, list, tuple, or binaryexp of these
     Parameters      = parameters;
     Guard           = guard;
     BodyExpressions = body;
     for (int i = 0; i < Parameters.Length; i++)
     {
         Parameters[i].SetParent(this);
     }
     if (Guard != null)
     {
         Guard.SetParent(this);
     }
     for (int i = 0; i < BodyExpressions.Length; i++)
     {
         BodyExpressions[i].SetParent(this, i == BodyExpressions.Length - 1);
     }
 }