Exemple #1
0
 public override void VisitMarkupCommentBlock(MarkupCommentBlockSyntax node)
 {
     Debug.Assert(node.Children.Count == 3, $"There should be 3 nodes but were {node.Children.Count}");
     AddSemanticRange(node.Children[0], RazorSemanticTokensLegend.MarkupCommentPunctuation);
     AddSemanticRange(node.Children[1], SyntaxKind.MarkupCommentBlock);
     AddSemanticRange(node.Children[2], RazorSemanticTokensLegend.MarkupCommentPunctuation);
     base.VisitMarkupCommentBlock(node);
 }
Exemple #2
0
        public override void VisitMarkupCommentBlock(MarkupCommentBlockSyntax node)
        {
            AddSemanticRange(node.Children[0], RazorSemanticTokensLegend.MarkupCommentPunctuation);

            for (var i = 1; i < node.Children.Count - 1; i++)
            {
                var commentNode = node.Children[i];
                switch (commentNode.Kind)
                {
                case SyntaxKind.MarkupTextLiteral:
                    AddSemanticRange(commentNode, RazorSemanticTokensLegend.MarkupComment);
                    break;

                default:
                    Visit(commentNode);
                    break;
                }
            }

            AddSemanticRange(node.Children[node.Children.Count - 1], RazorSemanticTokensLegend.MarkupCommentPunctuation);
        }
Exemple #3
0
 public override void VisitMarkupCommentBlock(MarkupCommentBlockSyntax node)
 {
     WriteBlock(node, FormattingBlockKind.HtmlComment, base.VisitMarkupCommentBlock);
 }
Exemple #4
0
 public override void VisitMarkupCommentBlock(MarkupCommentBlockSyntax node)
 {
     WriteBlock(node, BlockKindInternal.HtmlComment, base.VisitMarkupCommentBlock);
 }