.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

59 lines
1.4 KiB

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
namespace ICSharpCode.NRefactory.VB
{
public class Comment : AbstractSpecial
{
CommentType commentType;
string comment;
public CommentType CommentType {
get {
return commentType;
}
set {
commentType = value;
}
}
public string CommentText {
get {
return comment;
}
set {
comment = value;
}
}
/// <value>
/// Is true, when the comment is at line start or only whitespaces
/// between line and comment start.
/// </value>
public bool CommentStartsLine {
get;
set;
}
public Comment(CommentType commentType, string comment, bool commentStartsLine, Location startPosition, Location endPosition)
: base(startPosition, endPosition)
{
this.commentType = commentType;
this.comment = comment;
this.CommentStartsLine = commentStartsLine;
}
public override string ToString()
{
return String.Format("[{0}: Type = {1}, Text = {2}, Start = {3}, End = {4}]",
GetType().Name, CommentType, CommentText, StartPosition, EndPosition);
}
public override object AcceptVisitor(ISpecialVisitor visitor, object data)
{
return visitor.Visit(this, data);
}
}
}