private IXor2ComputationNodeReference _Assert_MemberAccess(IXor2ComputationNodeReference node, string propName) { var syntax = (MemberAccessExpressionSyntax)node.A.Syntax; Assert.AreEqual(propName, syntax.Name.ToString()); return(node.A.MainAntedecent.Value); }
public AbstractComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference specialAntedecent = null, IXor2ComputationNodeReference leftAntedecent = null, IXor2ComputationNodeReference rightAntedecent = null, IReadOnlyList <IXor2ComputationNodeReference> varyingAntedecents = null) { this.Syntax = syntax; this.LeftAntedecent = Maybe.FromNullableReference(leftAntedecent); this.RightAntedecent = Maybe.FromNullableReference(rightAntedecent); this.MainAntedecent = Maybe.FromNullableReference(specialAntedecent); this.OtherVaryingAntedecents = Maybe.FromNullableReference(varyingAntedecents); }
static public ComputationGraphNode Binary(BinaryExpressionSyntax syntax, IXor2ComputationNodeReference leftAntedecent, IXor2ComputationNodeReference rightAntedecent) { return(new ComputationGraphNode(syntax, leftAntedecent: leftAntedecent, rightAntedecent: rightAntedecent)); }
static public ComputationGraphNode FromReturnStatement(ReturnStatementSyntax syntax, IXor2ComputationNodeReference previous) => new ComputationGraphNode(syntax, previous);
static public ComputationGraphNode FromCastSyntax(CastExpressionSyntax syntax, IXor2ComputationNodeReference previous) => new ComputationGraphNode(syntax, previous);
static public ComputationGraphNode FromLocalDeclarationSyntax(LocalDeclarationStatementSyntax syntax, IXor2ComputationNodeReference previous) => new ComputationGraphNode(syntax, previous);
private ComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference leftAntedecent, IXor2ComputationNodeReference rightAntedecent) : base(syntax, leftAntedecent: leftAntedecent, rightAntedecent: rightAntedecent) { }
private ComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference specialAntedecent, IReadOnlyList <IXor2ComputationNodeReference> varyingAntedecents) : base(syntax, specialAntedecent, varyingAntedecents: varyingAntedecents) { }
private ComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference specialAntedecent) : base(syntax, specialAntedecent) { }
static public ComputationGraphNode FromMemberAccess(MemberAccessExpressionSyntax syntax, IXor2ComputationNodeReference previous) => new ComputationGraphNode(syntax, previous, varyingAntedecents: Empty.List <IXor2ComputationNodeReference>());
static public ComputationGraphNode FromParenthesizedExprSyntax(ParenthesizedExpressionSyntax syntax, IXor2ComputationNodeReference previous) => new ComputationGraphNode(syntax, previous);
static public ComputationGraphNode FromInvocation(InvocationExpressionSyntax syntax, IXor2ComputationNodeReference target, IReadOnlyList <IXor2ComputationNodeReference> arguments) => new ComputationGraphNode(syntax, target, arguments);