Example #1
0
 /// <summary>
 /// Visits the specified incomplete trigger node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 /// <returns>A node which should replace the visited node, or a reference to the visited node
 /// itself if no changes were made.</returns>
 public virtual SyntaxNode VisitIncompleteTrigger(UvssIncompleteTriggerSyntax node)
 {
     return VisitSyntaxNode(node);
 }
Example #2
0
        /// <summary>
        /// Adds a diagnostic indicating that a trigger is incomplete
        /// to the specified collection of diagnostics.
        /// </summary>
        /// <param name="collection">The collection to which to add the diagnostic.</param>
        /// <param name="node">The syntax node which is associated with the diagnostic.</param>
        internal static void ReportIncompleteTrigger(ref ICollection<DiagnosticInfo> collection,
            UvssIncompleteTriggerSyntax node)
        {
            Contract.Require(node, nameof(node));

            var span = new TextSpan(node.TriggerKeyword.Width, 0);
            var diagnostic = new DiagnosticInfo(node.TriggerKeyword, DiagnosticID.IncompleteTrigger,
                DiagnosticSeverity.Error, span, "Trigger type expected ('property' or 'event')");

            Report(ref collection, diagnostic);
        }