pattern.cs

来自「Fireball.CodeEditor is an source code ed」· CS 代码 · 共 40 行

CS
40
字号
using System.Text.RegularExpressions;

namespace Fireball.Syntax
{
	/// <summary>
	/// PatternScanResult struct is redurned by the Pattern class when an .IndexIn call has been performed.
	/// </summary>
	public struct PatternScanResult
	{
		/// <summary>
		/// The index on which the pattern was found in the source string
		/// </summary>
		public int Index;

		/// <summary>
		/// The string that was found , this is always the same as the pattern StringPattern property if the pattern is a simple pattern.
		/// if the pattern is complex this field will contain the string that was found by the scan.
		/// </summary>
		public string Token;
	}

	public enum BracketType
	{
		None,
		StartBracket,
		EndBracket,
	}

	/// <summary>
	/// A Pattern is a specific string or a RegEx pattern that is used by the parser.
	/// There are two types of patterns , Simple and Complex.
	/// 
	/// Simple Patterns are patterns that consists of a simple fixed string eg. "void" or "for".
	/// Complex Patterns are patterns that consists of RegEx patterns , eg hex numbers or urls can be described as regex patterns.
	/// </summary>
	public sealed class Pattern
	{
		#region PUBLIC PROPERTY SEPARATORS

		private string _Separators = ".,+-*^\\/()[]{}@:;'?

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?