private DeclarationNameSyntax ParseDeclarationName(bool declarationOnly) { var name = Match(SyntaxKind.IdentifierToken); var result = new IdentifierDeclarationNameSyntax(name) as DeclarationNameSyntax; if (!declarationOnly) { while (Current.Kind == SyntaxKind.ColonColonToken) { var colonColon = Match(SyntaxKind.ColonColonToken); var right = new IdentifierDeclarationNameSyntax(Match(SyntaxKind.IdentifierToken)); result = new QualifiedDeclarationNameSyntax(result, colonColon, right); } } return(result); }
private DeclarationNameSyntax ParseDeclarationName(bool declarationOnly) { var name = Match(SyntaxKind.IdentifierToken); var result = new IdentifierDeclarationNameSyntax(name) as DeclarationNameSyntax; if (!declarationOnly) { while (Current.Kind == SyntaxKind.ColonColonToken) { var colonColon = Match(SyntaxKind.ColonColonToken); var right = new IdentifierDeclarationNameSyntax(Match(SyntaxKind.IdentifierToken)); result = new QualifiedDeclarationNameSyntax(result, colonColon, right); } } return result; }
public static void ReportAmbiguousNamespaceOrType(this ICollection<Diagnostic> diagnostics, QualifiedDeclarationNameSyntax syntax, IReadOnlyList<Symbol> candidates) { var symbol1 = candidates[0]; var symbol2 = candidates[1]; diagnostics.Report(syntax.GetTextSpanSafe(), DiagnosticId.AmbiguousNamespaceOrType, syntax.ToStringIgnoringMacroReferences(), symbol1.Name, symbol2.Name); }
public static void ReportUndeclaredNamespaceOrType(this ICollection<Diagnostic> diagnostics, QualifiedDeclarationNameSyntax node) { var typeName = node.Left.ToStringIgnoringMacroReferences(); diagnostics.Report(node.GetTextSpanSafe(), DiagnosticId.UndeclaredNamespaceOrType, typeName); }
public static void ReportUndeclaredFunctionInNamespaceOrClass(this ICollection<Diagnostic> diagnostics, QualifiedDeclarationNameSyntax name) { var declaringTypeName = name.Left.ToStringIgnoringMacroReferences(); diagnostics.Report(name.GetTextSpanSafe(), DiagnosticId.UndeclaredFunctionInNamespaceOrClass, declaringTypeName, name.GetUnqualifiedName().Name.Text); }
public static void ReportAmbiguousNamespaceOrType(this ICollection <Diagnostic> diagnostics, QualifiedDeclarationNameSyntax syntax, IReadOnlyList <Symbol> candidates) { var symbol1 = candidates[0]; var symbol2 = candidates[1]; diagnostics.Report(syntax.SourceRange, DiagnosticId.AmbiguousNamespaceOrType, syntax.ToStringIgnoringMacroReferences(), symbol1.Name, symbol2.Name); }
public static void ReportUndeclaredNamespaceOrType(this ICollection <Diagnostic> diagnostics, QualifiedDeclarationNameSyntax node) { var typeName = node.Left.ToStringIgnoringMacroReferences(); diagnostics.Report(node.SourceRange, DiagnosticId.UndeclaredNamespaceOrType, typeName); }
public static void ReportUndeclaredFunctionInNamespaceOrClass(this ICollection <Diagnostic> diagnostics, QualifiedDeclarationNameSyntax name) { var declaringTypeName = name.Left.ToStringIgnoringMacroReferences(); diagnostics.Report(name.SourceRange, DiagnosticId.UndeclaredFunctionInNamespaceOrClass, declaringTypeName, name.GetUnqualifiedName().Name.Text); }
public virtual void VisitQualifiedDeclarationName(QualifiedDeclarationNameSyntax node) { DefaultVisit(node); }