コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: SymbolVisitor.cs プロジェクト: rwsanders/bicep
 public virtual void VisitErrorSymbol(UnassignableSymbol symbol)
 {
     VisitDescendants(symbol);
 }
コード例 #3
0
 public override void VisitErrorSymbol(UnassignableSymbol symbol)
 {
     base.VisitErrorSymbol(symbol);
     this.CollectDiagnostics(symbol);
 }