public override bool Visit(AstAndExpression node)
 {
     ErrorIfIsNull(node.Left);
     ErrorIfIsNull(node.Right);
     return true;
 }
 public override bool Visit(AstAndExpression node)
 {
     return true;
 }
示例#3
0
 // #AND_TEST #NOT_TEST AND #AND_TEST
 private void ConstructAndCompoundTest()
 {
     var right = nodes.Pop() as AstExpression;
     var left = nodes.Pop() as AstExpression;
     var andExpr = new AstAndExpression(left, right);
     PushNode(andExpr);
 }
 public override bool Visit(AstAndExpression node)
 {
     node.Left.Accept(this);
     string addLine = " = and i1 " + GetCurrUnnamedVariable() + ", ";
     node.Right.Accept(this);
     addLine += GetCurrUnnamedVariable();
     codeStream.WriteLine(CreateUnnamedVariable() + addLine);
     SaveArg("i1 " + GetCurrUnnamedVariable());
     return false;
 }
示例#5
0
 public override bool Visit(AstAndExpression node)
 {
     var leftType = resolver.Resolve(node.Left);
     var rightType = resolver.Resolve(node.Right);
     if (leftType != BuiltInTypes.BOOL || rightType != BuiltInTypes.BOOL)
     {
         DispatchError(node.TextPosition, "Boolean operations available only for bool types.");
         return false;
     }
     return true;
 }
 public abstract bool Visit(AstAndExpression node);