specialtracker.cs
来自「全功能c#编译器」· CS 代码 · 共 64 行
CS
64 行
using System;
using System.Text;
using System.CodeDom;
using System.Collections;
using System.Drawing;
namespace ICSharpCode.SharpRefactory.Parser.VB
{
public class SpecialTracker
{
ArrayList currentSpecials = new ArrayList();
CommentType currentCommentType;
StringBuilder sb = new StringBuilder();
Point startPosition;
public ArrayList CurrentSpecials {
get {
return currentSpecials;
}
}
public ArrayList RetrieveSpecials()
{
ArrayList tmp = currentSpecials;
currentSpecials = new ArrayList();
return tmp;
}
public void AddEndOfLine()
{
currentSpecials.Add(new NewLine());
}
// public void AddPreProcessingDirective(string cmd, string arg)
// {
// currentSpecials.Add(new PreProcessingDirective(cmd, arg));
// }
// used for comment tracking
public void StartComment(CommentType commentType, Point startPosition)
{
this.currentCommentType = commentType;
this.startPosition = startPosition;
this.sb.Length = 0;
}
public void AddChar(char c)
{
sb.Append(c);
}
public void AddString(string s)
{
sb.Append(s);
}
public void FinishComment()
{
currentSpecials.Add(new Comment(currentCommentType, sb.ToString(), startPosition));
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?