1 using System;
2
3
4
5 namespace ProjectFileKeywords
6 {
7 internal class Keywords
8 {
9 static Keywords() :
10 instance(new Keywords())
11 {
12 }
13 public static Keywords& Instance()
14 {
15 return *instance;
16 }
17 public System.Lex.KeywordMap* GetKeywordMap()
18 {
19 return keywordMap.Get();
20 }
21 private Keywords()
22 {
23 System.Lex.Keyword keyword0(u"project", ProjectFileTokens.PROJECT);
24 keywordList.Add(keyword0);
25 System.Lex.Keyword keyword1(u"source", ProjectFileTokens.SOURCE);
26 keywordList.Add(keyword1);
27 System.Lex.Keyword keyword2(u"rules", ProjectFileTokens.RULES);
28 keywordList.Add(keyword2);
29 System.Lex.Keyword nullKeyword(null, -1);
30 keywordList.Add(nullKeyword);
31 keywordMap.Reset(new System.Lex.KeywordMap(keywordList.CBegin().Ptr()));
32 }
33 private static System.UniquePtr<Keywords> instance;
34 private System.Collections.List<System.Lex.Keyword> keywordList;
35 private System.UniquePtr<System.Lex.KeywordMap> keywordMap;
36 }
37
38 public System.Lex.KeywordMap* GetKeywordMap()
39 {
40 return Keywords.Instance().GetKeywordMap();
41 }
42 }