Пример #1
0
 bool IPatternVisitor <bool> .Visit(BoolPattern expr)
 {
     if (mType != Decl.Bool)
     {
         throw new CompileException(expr.Position,
                                    String.Format("A bool pattern cannot be used to match against a value of type {0}.", mType));
     }
     return(true);
 }
Пример #2
0
        bool IPatternVisitor <bool> .Visit(BoolPattern expr)
        {
            var result = CoverName(expr.Value.ToString());

            // if we got true and false, we're fully covered
            if (mCoveredValues.Count == 2)
            {
                FullyCovered = true;
            }

            return(result);
        }
Пример #3
0
 IUnboundExpr IPatternVisitor <IUnboundExpr> .Visit(BoolPattern expr)
 {
     return(VisitLiteral(expr));
 }