public override bool Visit(AstLtComparison node)
 {
     ErrorIfIsNull(node.Left);
     ErrorIfIsNull(node.Right);
     return true;
 }
 public override bool Visit(AstLtComparison node)
 {
     return true;
 }
Пример #3
0
 // #COMPARISON #SIMPLE_TERM LT #SIMPLE_TERM
 private void ConstructLtComparison()
 {
     var right = nodes.Pop() as AstSimpleTermExpr;
     var left = nodes.Pop() as AstSimpleTermExpr;
     var node = new AstLtComparison(left, right);
     PushNode(node);
 }
Пример #4
0
 public override bool Visit(AstLtComparison node)
 {
     node.Left.Accept(this);
     string addLine = " = icmp slt i32 " + GetCurrUnnamedVariable() + ", ";
     node.Right.Accept(this);
     addLine += GetCurrUnnamedVariable();
     codeStream.WriteLine(CreateUnnamedVariable() + addLine);
     SaveArg("i1 " + GetCurrUnnamedVariable());
     return false;
 }
Пример #5
0
 public override bool Visit(AstLtComparison node)
 {
     var leftType = resolver.Resolve(node.Left);
     var rightType = resolver.Resolve(node.Right);
     if (leftType != BuiltInTypes.INT || rightType != BuiltInTypes.INT)
     {
         DispatchError(node.TextPosition, "Comparison operations available only for integer types.");
         return false;
     }
     return true;
 }
Пример #6
0
 public abstract bool Visit(AstLtComparison node);