Exemple #1
0
 bool IPatternVisitor <bool> .Visit(IntPattern expr)
 {
     if (mType != Decl.Int)
     {
         throw new CompileException(expr.Position,
                                    String.Format("An int pattern cannot be used to match against a value of type {0}.", mType));
     }
     return(true);
 }
 IUnboundExpr IPatternVisitor <IUnboundExpr> .Visit(IntPattern expr)
 {
     return(VisitLiteral(expr));
 }
Exemple #3
0
 bool IPatternVisitor <bool> .Visit(IntPattern expr)
 {
     return(CoverName(expr.Value.ToString()));
 }