예제 #1
0
 internal static SCode Make(PrimitiveIsNegativeA0 predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsNegativeA0SQ (predicate, consequent, alternative);
 }
예제 #2
0
 internal static SCode Make(PrimitiveIsNegativeA0 predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsNegativeA0SL (predicate, consequent, alternative);
 }
예제 #3
0
 protected PCondIsNegativeA0SQ(PrimitiveIsNegativeA0 predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
예제 #4
0
 internal static SCode Make(PrimitiveIsNegativeA0 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 PCondIsNegativeA0QQ (predicate, consequent, alternative);
 }
예제 #5
0
 protected PCondIsNegativeA0SL(PrimitiveIsNegativeA0 predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeName = alternative.Name;
     this.alternativeDepth = alternative.Depth;
     this.alternativeOffset = alternative.Offset;
 }
예제 #6
0
 protected PCondIsNegativeA0QL(PrimitiveIsNegativeA0 predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
예제 #7
0
 protected PCondIsNegativeA0QQ(PrimitiveIsNegativeA0 predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
예제 #8
0
 internal static SCode Make(PrimitiveIsNegativeA0 predicate, Quotation consequent, SCode alternative)
 {
     return
     (alternative is LexicalVariable) ? PCondIsNegativeA0QL.Make (predicate, consequent, (LexicalVariable) alternative)
     : (alternative is Quotation) ? PCondIsNegativeA0QQ.Make (predicate, consequent, (Quotation) alternative)
     : new PCondIsNegativeA0Q (predicate, consequent, alternative);
 }
예제 #9
0
 protected PCondIsNegativeA0Q(PrimitiveIsNegativeA0 predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
예제 #10
0
 protected PCondIsNegativeA0LQ(PrimitiveIsNegativeA0 predicate, LexicalVariable consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
예제 #11
0
 protected PCondIsNegativeA0L(PrimitiveIsNegativeA0 predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }
예제 #12
0
 protected PCondIsNegativeA0(PrimitiveIsNegativeA0 predicate, SCode consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }