-
Notifications
You must be signed in to change notification settings - Fork 1
/
ISyntaxHighlighter.cs
35 lines (32 loc) · 1009 Bytes
/
ISyntaxHighlighter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PowerSyntax
{
[DebuggerDisplay("({Begin}..{Begin + Length}) {Text} : {Color}")]
public class StyleRange
{
public string Text { get; set; }
public StyleRange() { }
public int Begin { get; set; }
public int Length { get; set; }
public Color? Color { get; set; }
public Color? BackGroundColor { get; set; }
public bool? Bold { get; set; }
public bool? Italic { get; set; }
public IEnumerable<StyleRange> Children { get; set; }
}
public interface IResourceProvider
{
IEnumerable<string> GetFiles(string path, string type);
string ReadAllText(string path);
}
public interface ISyntaxHighlighter
{
StyleRange Parse(string code, string language, string theme);
}
}