public override bool Visit(AstMulExpression node) { ErrorIfIsNull(node.Left); ErrorIfIsNull(node.Right); return true; }
public override bool Visit(AstMulExpression node) { return true; }
// #MUL_EXPRESSION #UNARY_EXPRESSION MULTIPLICATION #TERM private void ConstructMulExpr() { var right = nodes.Pop() as AstExpression; var left = nodes.Pop() as AstUnaryExpr; var mulExpr = new AstMulExpression(left, right); PushNode(mulExpr); }
public override bool Visit(AstMulExpression node) { node.Left.Accept(this); string addLine = " = mul i32 " + GetCurrUnnamedVariable() + ", "; node.Right.Accept(this); addLine += GetCurrUnnamedVariable(); codeStream.WriteLine(CreateUnnamedVariable() + addLine); SaveArg("i32 " + GetCurrUnnamedVariable()); return false; }
public override bool Visit(AstMulExpression node) { var leftType = resolver.Resolve(node.Left); var rightType = resolver.Resolve(node.Right); if (leftType != BuiltInTypes.INT || rightType != BuiltInTypes.INT) { DispatchError(node.TextPosition, "Multiplication operation available only for integer types."); return false; } return true; }
public abstract bool Visit(AstMulExpression node);