示例#1
0
 internal static SCode Make(PrimitiveIsComplexA0 predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsComplexA0SQ (predicate, consequent, alternative);
 }
示例#2
0
 internal static SCode Make(PrimitiveIsComplexA0 predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsComplexA0SL (predicate, consequent, alternative);
 }
示例#3
0
 protected PCondIsComplexA0SQ(PrimitiveIsComplexA0 predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
示例#4
0
 internal static SCode Make(PrimitiveIsComplexA0 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 PCondIsComplexA0QQ (predicate, consequent, alternative);
 }
示例#5
0
 protected PCondIsComplexA0SL(PrimitiveIsComplexA0 predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeName = alternative.Name;
     this.alternativeDepth = alternative.Depth;
     this.alternativeOffset = alternative.Offset;
 }
示例#6
0
 protected PCondIsComplexA0QL(PrimitiveIsComplexA0 predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
示例#7
0
 protected PCondIsComplexA0QQ(PrimitiveIsComplexA0 predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
示例#8
0
 internal static SCode Make(PrimitiveIsComplexA0 predicate, Quotation consequent, SCode alternative)
 {
     return
     (alternative is LexicalVariable) ? PCondIsComplexA0QL.Make (predicate, consequent, (LexicalVariable) alternative)
     : (alternative is Quotation) ? PCondIsComplexA0QQ.Make (predicate, consequent, (Quotation) alternative)
     : new PCondIsComplexA0Q (predicate, consequent, alternative);
 }
示例#9
0
 protected PCondIsComplexA0Q(PrimitiveIsComplexA0 predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
示例#10
0
 protected PCondIsComplexA0LQ(PrimitiveIsComplexA0 predicate, LexicalVariable consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
示例#11
0
 protected PCondIsComplexA0L(PrimitiveIsComplexA0 predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }
示例#12
0
 protected PCondIsComplexA0(PrimitiveIsComplexA0 predicate, SCode consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }