public static void Rule(ListBody lhs, ListItems listItems, OptionalListTail optionalListTail) { CodeTerm tail; if (optionalListTail.CodeTerm != null) { tail = optionalListTail.CodeTerm; } else { tail = new CodeCompoundTerm(CodeFunctor.NilFunctor); } lhs.CodeList = new CodeList(listItems.CodeTerms, tail); }
public static void Rule(OptionalListBody lhs, ListBody listBody) { lhs.CodeList = listBody.CodeList; }
public static void Rule(ListBody lhs, ListItems listItems, OptionalListTail optionalListTail) { var tail = optionalListTail.CodeTerm ?? new CodeCompoundTerm(CodeFunctor.NilFunctor); lhs.CodeList = new CodeList(listItems.CodeTerms, tail); }