-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathRuleCaptures.cs
More file actions
58 lines (54 loc) · 2.67 KB
/
RuleCaptures.cs
File metadata and controls
58 lines (54 loc) · 2.67 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections.Generic;
using ColorCode.Common;
namespace ColorCode.Compilation
{
public static class RuleCaptures
{
public static IDictionary<int, string> JavaScript;
public static IDictionary<int, string> CSharpScript;
public static IDictionary<int, string> VbDotNetScript;
static RuleCaptures()
{
JavaScript = BuildCaptures(LanguageId.JavaScript);
CSharpScript = BuildCaptures(LanguageId.CSharp);
VbDotNetScript = BuildCaptures(LanguageId.VbDotNet);
}
private static IDictionary<int, string> BuildCaptures(string languageId)
{
return new Dictionary<int, string>
{
{1, ScopeName.HtmlTagDelimiter},
{2, ScopeName.HtmlElementName},
{3, ScopeName.HtmlAttributeName},
{4, ScopeName.HtmlOperator},
{5, ScopeName.HtmlAttributeValue},
{6, ScopeName.HtmlAttributeName},
{7, ScopeName.HtmlOperator},
{8, ScopeName.HtmlAttributeValue},
{9, ScopeName.HtmlAttributeName},
{10, ScopeName.HtmlOperator},
{11, ScopeName.HtmlAttributeValue},
{12, ScopeName.HtmlAttributeName},
{13, ScopeName.HtmlAttributeName},
{14, ScopeName.HtmlOperator},
{15, ScopeName.HtmlAttributeValue},
{16, ScopeName.HtmlAttributeName},
{17, ScopeName.HtmlOperator},
{18, ScopeName.HtmlAttributeValue},
{19, ScopeName.HtmlAttributeName},
{20, ScopeName.HtmlOperator},
{21, ScopeName.HtmlAttributeValue},
{22, ScopeName.HtmlAttributeName},
{23, ScopeName.HtmlOperator},
{24, ScopeName.HtmlAttributeValue},
{25, ScopeName.HtmlAttributeName},
{26, ScopeName.HtmlTagDelimiter},
{27, string.Format("{0}{1}", ScopeName.LanguagePrefix, languageId)},
{28, ScopeName.HtmlTagDelimiter},
{29, ScopeName.HtmlElementName},
{30, ScopeName.HtmlTagDelimiter}
};
}
}
}