Esempio n. 1
0
 public static SCode Make(PrimitiveIsRecordA predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsRecordA0) ? PCondIsRecordA0.Make ((PrimitiveIsRecordA0) predicate, consequent, alternative)
         : (predicate is PrimitiveIsRecordA1) ? PCondIsRecordA1.Make ((PrimitiveIsRecordA1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsRecordAL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsRecordAQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsRecordASL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsRecordASQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsRecordA (predicate, consequent, alternative);
 }
Esempio n. 2
0
 public static SCode Make(PrimitiveIsRecordA predicate, Argument consequent, SCode alternative)
 {
     throw new NotImplementedException ();
 }
Esempio n. 3
0
 internal static PCondIsRecordA Make(PrimitiveIsRecordA predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsRecordASQ (predicate, consequent, alternative);
 }
Esempio n. 4
0
 protected PCondIsRecordAA(PrimitiveIsRecordA predicate, Argument consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 5
0
 internal static PCondIsRecordA Make(PrimitiveIsRecordA predicate, SCode consequent, LexicalVariable lexicalVariable)
 {
     throw new NotImplementedException ();
 }
Esempio n. 6
0
 protected PCondIsRecordASQ(PrimitiveIsRecordA predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Esempio n. 7
0
 protected PCondIsRecordAQQ(PrimitiveIsRecordA predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 8
0
 internal static SCode Make(PrimitiveIsRecordA 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 PCondIsRecordAQQ (predicate, consequent, alternative);
 }
Esempio n. 9
0
 protected PCondIsRecordAQL(PrimitiveIsRecordA predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 10
0
 internal static SCode Make(PrimitiveIsRecordA predicate, Quotation consequent, LexicalVariable alternative)
 {
     return new PCondIsRecordAQL (predicate, consequent, alternative);
 }
Esempio n. 11
0
 internal static SCode Make(PrimitiveIsRecordA predicate, Quotation consequent, SCode alternative)
 {
     return
         (alternative is LexicalVariable) ? PCondIsRecordAQL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsRecordAQQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsRecordAQ (predicate, consequent, alternative);
 }
Esempio n. 12
0
 protected PCondIsRecordAQ(PrimitiveIsRecordA predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
Esempio n. 13
0
 public static SCode Make(PrimitiveIsRecordA predicate, LexicalVariable consequent, Quotation alternative)
 {
     throw new NotImplementedException ();
 }
Esempio n. 14
0
 protected PCondIsRecordAL1(PrimitiveIsRecordA predicate, LexicalVariable1 consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 15
0
 protected PCondIsRecordAL(PrimitiveIsRecordA predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }