aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-05-13 10:09:01 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-05-13 10:09:01 +0200
commit74d1288c9990bb251b7097b225891bafdc6758af (patch)
tree8173afa55887a46e9ef44076498be725c5b33ad1 /Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs
parenta73c8383e6ea636672a3bdb07e084260538fc68a (diff)
removed splitted CrowIDE
Diffstat (limited to 'Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs')
-rw-r--r--Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs71
1 files changed, 0 insertions, 71 deletions
diff --git a/Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs b/Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs
deleted file mode 100644
index 8b4df5e5..00000000
--- a/Samples/CrowIDE/src/Editors/CodeBuffer/Token.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// Token.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2017 jp
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-using System;
-
-namespace Crow.Coding
-{
- public struct Token
- {
- public BufferParser.TokenType Type;
- public string Content;
- public Point Start;
- public Point End;
-
- public string PrintableContent {
- get { return string.IsNullOrEmpty(Content) ? "" : Content.Replace("\t", new String(' ', Interface.TabSize)); }
- }
-
-// public Token (TokenType tokType, string content = ""){
-// Type = tokType;
-// Content = content;
-// }
-
- public bool IsNull { get { return IsEmpty && Type == BufferParser.TokenType.Unknown; }}
- public bool IsEmpty { get { return string.IsNullOrEmpty(Content); }}
-
- public static bool operator == (Token t, System.Enum tt){
- return Convert.ToInt32(t.Type) == Convert.ToInt32(tt);
- }
- public static bool operator != (Token t, System.Enum tt){
- return Convert.ToInt32(t.Type) != Convert.ToInt32(tt);
- }
- public static bool operator == (System.Enum tt, Token t){
- return Convert.ToInt32(t.Type) == Convert.ToInt32(tt);
- }
- public static bool operator != (System.Enum tt, Token t){
- return Convert.ToInt32(t.Type) != Convert.ToInt32(tt);
- }
-
- public static Token operator +(Token t, char c){
- t.Content += c;
- return t;
- }
- public static Token operator +(Token t, string s){
- t.Content += s;
- return t;
- }
- public override string ToString ()
- {
- return string.Format ("[Tok{2}->{3}:{0}: {1}]", Type,Content,Start,End);
- }
- }
-}
-