1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
5
using System.Collections;
6
using System.Collections.Generic;
7
using System.Diagnostics;
9
using System.Threading;
10
using ICSharpCode.NRefactory.PatternMatching;
11
using ICSharpCode.NRefactory.VB.Ast;
13
namespace ICSharpCode.NRefactory.VB
15
public class Comment : AstNode
17
public bool IsDocumentationComment { get; set; }
19
public bool StartsLine {
24
public string Content {
29
TextLocation startLocation;
30
public override TextLocation StartLocation {
36
TextLocation endLocation;
37
public override TextLocation EndLocation {
43
public Comment (string content, bool isDocumentation = false)
45
this.IsDocumentationComment = isDocumentation;
46
this.Content = content;
49
public Comment (bool isDocumentation, TextLocation startLocation, TextLocation endLocation)
51
this.IsDocumentationComment = isDocumentation;
52
this.startLocation = startLocation;
53
this.endLocation = endLocation;
56
public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)
58
return visitor.VisitComment(this, data);
61
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
63
Comment o = other as Comment;
64
return o != null && this.IsDocumentationComment == o.IsDocumentationComment && MatchString(this.Content, o.Content);