コード例 #1
0
 protected PCondIsComplexA(PrimitiveIsComplexA predicate, SCode consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }
コード例 #2
0
 public static SCode Make(PrimitiveIsComplexA predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsComplexA0) ? PCondIsComplexA0.Make ((PrimitiveIsComplexA0) predicate, consequent, alternative)
         : (predicate is PrimitiveIsComplexA1) ? PCondIsComplexA1.Make ((PrimitiveIsComplexA1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsComplexAL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsComplexAQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsComplexASL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsComplexASQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsComplexA (predicate, consequent, alternative);
 }
コード例 #3
0
 protected PCondIsComplexASQ(PrimitiveIsComplexA predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
コード例 #4
0
 internal static PCondIsComplexA Make(PrimitiveIsComplexA predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsComplexASQ (predicate, consequent, alternative);
 }
コード例 #5
0
 internal static SCode Make(PrimitiveIsComplexA 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 PCondIsComplexAQQ (predicate, consequent, alternative);
 }
コード例 #6
0
 internal static PCondIsComplexA Make(PrimitiveIsComplexA predicate, SCode consequent, LexicalVariable lexicalVariable)
 {
     throw new NotImplementedException ();
 }
コード例 #7
0
 internal static SCode Make(PrimitiveIsComplexA predicate, Quotation consequent, LexicalVariable alternative)
 {
     return new PCondIsComplexAQL (predicate, consequent, alternative);
 }
コード例 #8
0
 protected PCondIsComplexAQQ(PrimitiveIsComplexA predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
コード例 #9
0
 internal static SCode Make(PrimitiveIsComplexA predicate, Quotation consequent, SCode alternative)
 {
     return
         (alternative is LexicalVariable) ? PCondIsComplexAQL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsComplexAQQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsComplexAQ (predicate, consequent, alternative);
 }
コード例 #10
0
 protected PCondIsComplexAQL(PrimitiveIsComplexA predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
コード例 #11
0
 protected PCondIsComplexAQ(PrimitiveIsComplexA predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
コード例 #12
0
 public static SCode Make(PrimitiveIsComplexA predicate, LexicalVariable consequent, Quotation alternative)
 {
     throw new NotImplementedException ();
 }
コード例 #13
0
 protected PCondIsComplexAL1(PrimitiveIsComplexA predicate, LexicalVariable1 consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }
コード例 #14
0
 protected PCondIsComplexAL(PrimitiveIsComplexA predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }
コード例 #15
0
 public static SCode Make(PrimitiveIsComplexA predicate, Argument consequent, SCode alternative)
 {
     throw new NotImplementedException ();
 }