public BoundUnaryExpression(BoundUnaryOperator op, BoundExpression operand) { Op = op; Operand = operand; }
public static BoundBinaryExpression LessOrEqual(BoundExpression left, BoundExpression right) => Binary(left, SyntaxKind.LessOrEqualsToken, right);
public static BoundWhileStatement While(BoundExpression condition, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel) { return(new BoundWhileStatement(condition, body, breakLabel, continueLabel)); }
public static BoundBinaryExpression Binary(BoundExpression left, SyntaxKind kind, BoundExpression right) { var op = BoundBinaryOperator.Bind(kind, left.Type, right.Type) !; return(new BoundBinaryExpression(left, op, right)); }
public static BoundBinaryExpression Add(BoundExpression left, BoundExpression right) => Binary(left, SyntaxKind.PlusToken, right);
public static BoundVariableDeclaration ConstantDeclaration(string name, BoundExpression initializer) => VariableDeclarationInternal(name, initializer, isReadOnly: true);
private static BoundVariableDeclaration VariableDeclarationInternal(string name, BoundExpression initializer, bool isReadOnly) { var local = new LocalVariableSymbol(name, isReadOnly, initializer.Type, initializer.ConstantValue); return(new BoundVariableDeclaration(local, initializer)); }
public static BoundConditionalGotoStatement GotoFalse(BoundLabelStatement label, BoundExpression condition) => GotoIf(label, condition, jumpIfTrue: false);
public static BoundVariableDeclaration VariableDeclaration(VariableSymbol symbol, BoundExpression initializer) { return(new BoundVariableDeclaration(symbol, initializer)); }
public static BoundConditionalGotoStatement GotoIf(BoundLabelStatement label, BoundExpression condition, bool jumpIfTrue) { return(new BoundConditionalGotoStatement(label.Label, condition, jumpIfTrue)); }
public BoundBinaryExpression(BoundExpression left, BoundBinaryOperator op, BoundExpression right) { Left = left; Op = op; Right = right; }
public BoundExpressionStatement(SyntaxNode syntax, BoundExpression expression) : base(syntax) { Expression = expression; }
public Branch(AtomicBlock from, AtomicBlock to, BoundExpression condition) { From = from; To = to; Condition = condition; }
public BoundAssignmentExpression(VariableSymbol variable, BoundExpression expression) { Variable = variable; Expression = expression; }