コード例 #1
0
 public BoundUnaryExpression(BoundUnaryOperator op, BoundExpression operand)
 {
     Op      = op;
     Operand = operand;
 }
コード例 #2
0
 public static BoundBinaryExpression LessOrEqual(BoundExpression left, BoundExpression right)
 => Binary(left, SyntaxKind.LessOrEqualsToken, right);
コード例 #3
0
 public static BoundWhileStatement While(BoundExpression condition, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel)
 {
     return(new BoundWhileStatement(condition, body, breakLabel, continueLabel));
 }
コード例 #4
0
        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));
        }
コード例 #5
0
 public static BoundBinaryExpression Add(BoundExpression left, BoundExpression right)
 => Binary(left, SyntaxKind.PlusToken, right);
コード例 #6
0
 public static BoundVariableDeclaration ConstantDeclaration(string name, BoundExpression initializer)
 => VariableDeclarationInternal(name, initializer, isReadOnly: true);
コード例 #7
0
        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));
        }
コード例 #8
0
 public static BoundConditionalGotoStatement GotoFalse(BoundLabelStatement label, BoundExpression condition)
 => GotoIf(label, condition, jumpIfTrue: false);
コード例 #9
0
 public static BoundVariableDeclaration VariableDeclaration(VariableSymbol symbol, BoundExpression initializer)
 {
     return(new BoundVariableDeclaration(symbol, initializer));
 }
コード例 #10
0
 public static BoundConditionalGotoStatement GotoIf(BoundLabelStatement label, BoundExpression condition, bool jumpIfTrue)
 {
     return(new BoundConditionalGotoStatement(label.Label, condition, jumpIfTrue));
 }
コード例 #11
0
 public BoundBinaryExpression(BoundExpression left, BoundBinaryOperator op, BoundExpression right)
 {
     Left  = left;
     Op    = op;
     Right = right;
 }
コード例 #12
0
 public BoundExpressionStatement(SyntaxNode syntax, BoundExpression expression)
     : base(syntax)
 {
     Expression = expression;
 }
コード例 #13
0
 public Branch(AtomicBlock from, AtomicBlock to, BoundExpression condition)
 {
     From      = from;
     To        = to;
     Condition = condition;
 }
コード例 #14
0
 public BoundAssignmentExpression(VariableSymbol variable, BoundExpression expression)
 {
     Variable   = variable;
     Expression = expression;
 }