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);
        }
示例#2
0
 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);
 }
示例#3
0
 static public ComputationGraphNode Binary(BinaryExpressionSyntax syntax, IXor2ComputationNodeReference leftAntedecent, IXor2ComputationNodeReference rightAntedecent)
 {
     return(new ComputationGraphNode(syntax, leftAntedecent: leftAntedecent, rightAntedecent: rightAntedecent));
 }
示例#4
0
 static public ComputationGraphNode FromReturnStatement(ReturnStatementSyntax syntax, IXor2ComputationNodeReference previous)
 => new ComputationGraphNode(syntax, previous);
示例#5
0
 static public ComputationGraphNode FromCastSyntax(CastExpressionSyntax syntax, IXor2ComputationNodeReference previous)
 => new ComputationGraphNode(syntax, previous);
示例#6
0
 static public ComputationGraphNode FromLocalDeclarationSyntax(LocalDeclarationStatementSyntax syntax, IXor2ComputationNodeReference previous)
 => new ComputationGraphNode(syntax, previous);
示例#7
0
 private ComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference leftAntedecent, IXor2ComputationNodeReference rightAntedecent) : base(syntax, leftAntedecent: leftAntedecent, rightAntedecent: rightAntedecent)
 {
 }
示例#8
0
 private ComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference specialAntedecent, IReadOnlyList <IXor2ComputationNodeReference> varyingAntedecents) : base(syntax, specialAntedecent, varyingAntedecents: varyingAntedecents)
 {
 }
示例#9
0
 private ComputationGraphNode(SyntaxNode syntax, IXor2ComputationNodeReference specialAntedecent) : base(syntax, specialAntedecent)
 {
 }
示例#10
0
 static public ComputationGraphNode FromMemberAccess(MemberAccessExpressionSyntax syntax, IXor2ComputationNodeReference previous)
 => new ComputationGraphNode(syntax, previous, varyingAntedecents: Empty.List <IXor2ComputationNodeReference>());
示例#11
0
 static public ComputationGraphNode FromParenthesizedExprSyntax(ParenthesizedExpressionSyntax syntax, IXor2ComputationNodeReference previous)
 => new ComputationGraphNode(syntax, previous);
示例#12
0
 static public ComputationGraphNode FromInvocation(InvocationExpressionSyntax syntax, IXor2ComputationNodeReference target, IReadOnlyList <IXor2ComputationNodeReference> arguments)
 => new ComputationGraphNode(syntax, target, arguments);