public virtual void Visit(TypedExpression<int> node) { }
public virtual void Visit(TypedExpression<bool> node) { }
public While(TypedExpression<bool> exp, StatementSequence statements) { AddChild(exp); AddChild(statements); }
public Assign(Variable var, TypedExpression<int> exp) { AddChild(var); AddChild(exp); }
protected override void WalkTypedExpression(TypedExpression typedExpression) { base.WalkTypedExpression(typedExpression); this.zeroWidth[typedExpression] = this.zeroWidth[typedExpression.Expression]; }
public If(TypedExpression<bool> exp, StatementSequence ifBranch, StatementSequence elseBranch) { AddChild(exp); AddChild(ifBranch); AddChild(elseBranch); }
// 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);
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]; }
public override void Walk(TypedExpression ex) { }
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); }
protected override void WalkTypedExpression(TypedExpression typedExpression) { base.WalkTypedExpression(typedExpression); this.Set(typedExpression, typedExpression.Type); }
public Assign(Variable var, TypedExpression <int> exp) { AddChild(var); AddChild(exp); }
public While(TypedExpression <bool> exp, StatementSequence statements) { AddChild(exp); AddChild(statements); }
public If(TypedExpression <bool> exp, StatementSequence ifBranch, StatementSequence elseBranch) { AddChild(exp); AddChild(ifBranch); AddChild(elseBranch); }