public static SCode Make(PrimitiveIsChar predicate, SCode consequent, SCode alternative) { return (predicate is PrimitiveIsCharL) ? PCondIsCharL.Make ((PrimitiveIsCharL) predicate, consequent, alternative) : (consequent is LexicalVariable) ? PCondIsCharSL.Make (predicate, (LexicalVariable) consequent, alternative) : (consequent is Quotation) ? PCondIsCharSQ.Make (predicate, (Quotation) consequent, alternative) : (alternative is LexicalVariable) ? PCondIsCharSSL.Make (predicate, consequent, (LexicalVariable) alternative) : (alternative is Quotation) ? PCondIsCharSSQ.Make (predicate, consequent, (Quotation) alternative) : new PCondIsChar (predicate, consequent, alternative); }
public static SCode Make(PrimitiveIsChar predicate, SCode consequent, Quotation alternative) { return new PCondIsCharSSQ (predicate, consequent, alternative); }
public static SCode Make(PrimitiveIsChar predicate, SCode consequent, LexicalVariable alternative) { return new PCondIsCharSSL (predicate, consequent, alternative); }
protected PCondIsCharSSQ(PrimitiveIsChar predicate, SCode consequent, Quotation alternative) : base(predicate, consequent, alternative) { this.alternativeValue = alternative.Quoted; }
public static SCode Make(PrimitiveIsChar predicate, Quotation consequent, Quotation alternative) { if (consequent.Quoted == alternative.Quoted) { Debug.WriteLine ("; Optimize (if <expr> <literal> <literal>) => (begin <expr> <literal>)"); return Sequence2.Make (predicate, consequent); } else if (Configuration.EnableTrueUnspecific && consequent.Quoted == Constant.Unspecific) { Debug.WriteLine ("; Optimize (if <expr> <unspecific> <literal>) => (begin <expr> <literal>)"); return Sequence2.Make (predicate, alternative); } else if (Configuration.EnableTrueUnspecific && alternative.Quoted == Constant.Unspecific) { Debug.WriteLine ("; Optimize (if <expr> <literal> <unspecific>) => (begin <expr> <literal>)"); return Sequence2.Make (predicate, consequent); } return new PCondIsCharSQQ (predicate, consequent, alternative); }
protected PCondIsCharSSL(PrimitiveIsChar predicate, SCode consequent, LexicalVariable alternative) : base(predicate, consequent, alternative) { this.alternativeName = alternative.Name; this.alternativeDepth = alternative.Depth; this.alternativeOffset = alternative.Offset; }
protected PCondIsCharSQL(PrimitiveIsChar predicate, Quotation consequent, LexicalVariable alternative) : base(predicate, consequent, alternative) { }
public static SCode Make(PrimitiveIsChar predicate, Quotation consequent, LexicalVariable alternative) { throw new NotImplementedException (); }
public static SCode Make(PrimitiveIsChar predicate, Quotation consequent, SCode alternative) { return (alternative is LexicalVariable) ? PCondIsCharSQL.Make (predicate, consequent, (LexicalVariable) alternative) : (alternative is Quotation) ? PCondIsCharSQQ.Make (predicate, consequent, (Quotation) alternative) : new PCondIsCharSQ (predicate, consequent, alternative); }
protected PCondIsCharSQ(PrimitiveIsChar predicate, Quotation consequent, SCode alternative) : base(predicate, consequent, alternative) { this.consequentValue = consequent.Quoted; }
protected PCondIsCharSLQ(PrimitiveIsChar predicate, LexicalVariable consequent, Quotation alternative) : base(predicate, consequent, alternative) { this.alternativeValue = alternative.Quoted; }
protected PCondIsCharSL(PrimitiveIsChar predicate, LexicalVariable consequent, SCode alternative) : base(predicate, consequent, alternative) { this.consequentName = consequent.Name; this.consequentDepth = consequent.Depth; this.consequentOffset = consequent.Offset; }
protected PCondIsChar(PrimitiveIsChar predicate, SCode consequent, SCode alternative) : base(predicate, consequent, alternative) { }