-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCompiledLanguage.cs
More file actions
37 lines (32 loc) · 1.06 KB
/
CompiledLanguage.cs
File metadata and controls
37 lines (32 loc) · 1.06 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
// Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections.Generic;
using System.Text.RegularExpressions;
using ColorCode.Common;
namespace ColorCode.Compilation
{
public class CompiledLanguage
{
public CompiledLanguage(string id,
string name,
Regex regex,
IList<string> captures)
{
Guard.ArgNotNullAndNotEmpty(id, "id");
Guard.ArgNotNullAndNotEmpty(name, "name");
Guard.ArgNotNull(regex, "regex");
Guard.ArgNotNullAndNotEmpty(captures, "captures");
Id = id;
Name = name;
Regex = regex;
Captures = captures;
}
public IList<string> Captures { get; set; }
public string Id { get; set; }
public string Name { get; set; }
public Regex Regex { get; set; }
public override string ToString()
{
return Name;
}
}
}