public VisualCodeVisitor(string operatorId, IOperatorCodeVisitor visitor, IModule module) : base(visitor) { visitor.Parent = this; _processor = new AstProcessor(module); _operatorId = operatorId; _mutationTargets = new List <MutationTarget>(); _sharedTargets = new List <MutationTarget>(); _formatter = new AstFormatter(); }
public VisualCodeRewriter(IMetadataHost host, List <AstNode> capturedAstObjects, List <AstNode> sharedAstObjects, MutationFilter filter, IOperatorCodeRewriter rewriter, VisualCodeTraverser traverser) : base(host, rewriter) { _capturedASTObjects = capturedAstObjects; _sharedASTObjects = sharedAstObjects; _filter = filter; _rewriter = rewriter; _traverser = traverser; // _rewriter.Parent = this; _formatter = new AstFormatter(); }
public OperatorUtils() { _formatter = new AstFormatter(); }
public OperatorUtils( AstFormatter formatter) { _formatter = formatter; }
public string ObjToString() { var boundExpression = _obj as BoundExpression; if(boundExpression != null) { return "BoundExpression {Instance=" + boundExpression.Instance + ", Definition=" + boundExpression.Definition + ", Type=" + boundExpression.Type + "}"; } else { var astFormatter = new AstFormatter(); //var objToString = astFormatter.Format(_obj); string objToString = _obj.ToString(); if (objToString != _obj.GetType().FullName) { return objToString; } else { return _obj.GetType().Name; } } }