Exemplo n.º 1
0
 public virtual void Visit(TypedExpression<int> node)
 {
 }
Exemplo n.º 2
0
 public virtual void Visit(TypedExpression<bool> node)
 {
 }
Exemplo n.º 3
0
 public While(TypedExpression<bool> exp, StatementSequence statements)
 {
     AddChild(exp);
     AddChild(statements);
 }
Exemplo n.º 4
0
 public Assign(Variable var, TypedExpression<int> exp)
 {
     AddChild(var);
     AddChild(exp);
 }
Exemplo n.º 5
0
            protected override void WalkTypedExpression(TypedExpression typedExpression)
            {
                base.WalkTypedExpression(typedExpression);

                this.zeroWidth[typedExpression] = this.zeroWidth[typedExpression.Expression];
            }
Exemplo n.º 6
0
 public If(TypedExpression<bool> exp, StatementSequence ifBranch, StatementSequence elseBranch)
 {
     AddChild(exp);
     AddChild(ifBranch);
     AddChild(elseBranch);
 }
Exemplo n.º 7
0
        // public static methods

        /// <summary>
        /// Returns a Q# attribute with the given name and argument that can be attached to a declaration.
        /// The attribute id is set to Null if the given name is null.
        /// The attribute argument is set to an invalid expression if the given argument is null.
        /// </summary>
        public static QsDeclarationAttribute BuildAttribute(QsQualifiedName name, TypedExpression arg) =>
        new QsDeclarationAttribute(BuildId(name), arg ?? SyntaxGenerator.InvalidExpression, null, QsComments.Empty);
Exemplo n.º 8
0
 public static MethodCall <string> Concat(TypedExpression <string> first, TypedExpression <string> second)
 => new MethodCall <string>(Expression.Call(ConcatTwoParamsMethodInfo, first, second));
            protected override void WalkTypedExpression(TypedExpression typedExpression)
            {
                base.WalkTypedExpression(typedExpression);

                this.containsAssertions[typedExpression] = this.containsAssertions[typedExpression.Expression];
            }
Exemplo n.º 10
0
 public override void Walk(TypedExpression ex)
 {
 }
Exemplo n.º 11
0
        public UpdateStatementsBuilder <TModel> SetField <TValue>(Expression <Func <TModel, TValue> > field, TValue value)
        {
            var pi       = NodeVisitor.VisitPath(field, null);
            var npgValue = PgTypesConverter.ConvertToPgValue(pi.Expression.Type, value);

            if (pi.JsonPath.Count > 0)
            {
                AddUpdate(pi.Column, src => ExpressionBuilders.JsonSet(src, pi.JsonPath, TypedExpression.FromPgValue(npgValue)));
            }
            else
            {
                AddUpdate(pi.Column, src => TypedExpression.FromPgValue(npgValue));
            }

            return(this);
        }
Exemplo n.º 12
0
 protected override void WalkTypedExpression(TypedExpression typedExpression)
 {
     base.WalkTypedExpression(typedExpression);
     this.Set(typedExpression, typedExpression.Type);
 }
Exemplo n.º 13
0
 public Assign(Variable var, TypedExpression <int> exp)
 {
     AddChild(var);
     AddChild(exp);
 }
Exemplo n.º 14
0
 public While(TypedExpression <bool> exp, StatementSequence statements)
 {
     AddChild(exp);
     AddChild(statements);
 }
Exemplo n.º 15
0
 public If(TypedExpression <bool> exp, StatementSequence ifBranch, StatementSequence elseBranch)
 {
     AddChild(exp);
     AddChild(ifBranch);
     AddChild(elseBranch);
 }