public override bool Visit(AstOrExpression node)
 {
     ErrorIfIsNull(node.Left);
     ErrorIfIsNull(node.Right);
     return true;
 }
 public override bool Visit(AstOrExpression node)
 {
     return true;
 }
Пример #3
0
 // #OR_TEST #AND_TEST OR #OR_TEST
 private void ConstructOrCompoundTest()
 {
     var right = nodes.Pop() as AstExpression;
     var left = nodes.Pop() as AstExpression;
     var orExpr = new AstOrExpression(left, right);
     PushNode(orExpr);
 }
Пример #4
0
 public override bool Visit(AstOrExpression node)
 {
     node.Left.Accept(this);
     string addLine = " = or i1 " + GetCurrUnnamedVariable() + ", ";
     node.Right.Accept(this);
     addLine += GetCurrUnnamedVariable();
     codeStream.WriteLine(CreateUnnamedVariable() + addLine);
     SaveArg("i1 " + GetCurrUnnamedVariable());
     return false;
 }
Пример #5
0
        public override bool Visit(AstOrExpression 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;
        }
Пример #6
0
 public abstract bool Visit(AstOrExpression node);