public override void VisitInstanceFunctionCallSyntax(InstanceFunctionCallSyntax syntax) { base.VisitInstanceFunctionCallSyntax(syntax); Symbol foundSymbol; // baseExpression must be bound to a namespaceSymbol otherwise there was an error if (bindings.ContainsKey(syntax.BaseExpression) && bindings[syntax.BaseExpression] is NamespaceSymbol namespaceSymbol) { foundSymbol = this.LookupSymbolByName(syntax.Name.IdentifierName, syntax.Name.Span, namespaceSymbol); } else { foundSymbol = new UnassignableSymbol(DiagnosticBuilder.ForPosition(syntax.Name.Span).SymbolicNameDoesNotExist(syntax.Name.IdentifierName)); } // bind what we got - the type checker will validate if it fits this.bindings.Add(syntax, foundSymbol); }
public virtual void VisitErrorSymbol(UnassignableSymbol symbol) { VisitDescendants(symbol); }
public override void VisitErrorSymbol(UnassignableSymbol symbol) { base.VisitErrorSymbol(symbol); this.CollectDiagnostics(symbol); }