public BoundNode Bind(LanguageSyntaxNode node, BoundTree boundTree) { if (boundTree == null) { boundTree = this.Compilation.GetBoundTree(node); } return(boundTree.GetUpperBoundNode(node)); }
protected virtual BoundNode BindCore(LanguageSyntaxNode node, BoundTree boundTree) { if (boundTree == null) { boundTree = this.Compilation.GetBoundTree(node); } return(boundTree.CreateBoundNode(node, this)); }
protected BoundNode(BoundKind kind, BoundTree boundTree, ImmutableArray <object> childBoundNodes, LanguageSyntaxNode syntax, bool hasErrors) { Debug.Assert(syntax != null); _kind = kind; _boundTree = boundTree; if (childBoundNodes.All(cbn => cbn is BoundNode)) { _childBoundNodes = childBoundNodes.Cast <BoundNode>().ToImmutableArray(); } else { _childBoundNodes = childBoundNodes; } _syntax = syntax; if (hasErrors) { _attributes |= BoundNodeAttributes.HasErrors; } }
public BoundStatement BindStatement(LanguageSyntaxNode node, BoundTree boundTree) { Debug.Assert(Language.SyntaxFacts.IsStatement(node)); return((BoundStatement)this.Bind(node, boundTree)); }
public BoundExpression BindExpression(LanguageSyntaxNode node, BoundTree boundTree) { Debug.Assert(Language.SyntaxFacts.IsExpression(node)); return((BoundExpression)this.Bind(node, boundTree)); }
public IsBindableNodeVisitor(BoundTree boundTree) { _boundTree = boundTree; }
public MemberBoundTree(LanguageCompilation compilation, LanguageSyntaxNode root, Binder rootBinder, DiagnosticBag diagnostics) : base(compilation, (LanguageSyntaxTree)root.SyntaxTree, rootBinder, diagnostics) { _parent = null; _root = root; }
internal protected virtual BoundNode CreateBoundNodeForBoundTree(LanguageSyntaxNode node, BoundTree boundTree) { if (Language.SyntaxFacts.IsExpression(node)) { return(this.BindExpressionCore(node, boundTree)); } else if (Language.SyntaxFacts.IsStatement(node)) { return(this.BindStatementCore(node, boundTree)); } else { return(this.BindCore(node, boundTree)); } }
protected virtual BoundNode CreateBoundSymbolDefCore(BoundTree boundTree, ImmutableArray <object> childBoundNodes, Type type, LanguageSyntaxNode syntax, bool hasErrors) { return(new BoundSymbolDef(BoundKind.SymbolDef, boundTree, childBoundNodes, type, syntax, hasErrors)); }
protected virtual BoundNode CreateBoundSymbolDef(BoundTree boundTree, ImmutableArray <object> childBoundNodes, Type type, string nestingProperty = null, bool merge = false, LanguageSyntaxNode syntax = null, bool hasErrors = false) { return(this.CreateBoundSymbolDefCore(boundTree, childBoundNodes, type, syntax, hasErrors)); }
protected virtual BoundNode CreateBoundScopeCore(BoundTree boundTree, ImmutableArray <object> childBoundNodes, LanguageSyntaxNode syntax, bool hasErrors) { return(new BoundScope(BoundKind.Scope, boundTree, childBoundNodes, syntax, hasErrors)); }
protected virtual BoundNode CreateBoundRoot(BoundTree boundTree, ImmutableArray <object> childBoundNodes, LanguageSyntaxNode syntax, bool hasErrors) { return(this.CreateBoundRootCore(boundTree, childBoundNodes, syntax, hasErrors)); }
public BoundNodeFactoryVisitor(BoundTree boundTree) { _boundTree = boundTree; }
protected virtual BoundNode CreateBoundProperty(BoundTree boundTree, ImmutableArray <object> childBoundNodes, string name, LanguageSyntaxNode syntax = null, bool hasErrors = false) { return(this.CreateBoundPropertyCore(boundTree, childBoundNodes, name, default, SymbolPropertyOwner.CurrentSymbol, null, syntax, hasErrors));
protected virtual BoundExpression BindExpressionCore(LanguageSyntaxNode node, BoundTree boundTree) { Debug.Assert(Language.SyntaxFacts.IsExpression(node)); return((BoundExpression)this.BindCore(node, boundTree)); }
protected virtual BoundStatement BindStatementCore(LanguageSyntaxNode node, BoundTree boundTree) { Debug.Assert(Language.SyntaxFacts.IsStatement(node)); return((BoundStatement)this.BindCore(node, boundTree)); }
protected virtual BoundNode CreateBoundSymbolUseCore(BoundTree boundTree, ImmutableArray <object> childBoundNodes, ImmutableArray <Type> types, ImmutableArray <Type> nestingTypes, LanguageSyntaxNode syntax, bool hasErrors) { return(new BoundSymbolUse(BoundKind.SymbolUse, boundTree, childBoundNodes, types, nestingTypes, syntax, hasErrors)); }
protected virtual BoundNode CreateBoundAttribute(BoundTree boundTree, ImmutableArray <object> childBoundNodes, ImmutableArray <Type> types, LanguageSyntaxNode syntax, bool hasErrors) { return(this.CreateBoundAttributeCore(boundTree, childBoundNodes, types, ImmutableArray <Type> .Empty, syntax, hasErrors)); }
public MemberBoundTree(BoundTree parent, LanguageSyntaxNode root, Binder rootBinder) : base(parent.Compilation, parent.SyntaxTree, rootBinder, parent.DiagnosticBag) { _parent = parent; _root = root; }