Example #1
0
 public TokenGrammarElement ToElement(CSharpAstTokenCode code)
 {
     TokenGrammarElement definition;
     if (!TokenMapping.TryGetValue((int)code, out definition))
     {
         TokenMapping.Add((int)code, definition = new TokenGrammarElement(code.ToString()));
     }
     return definition;
 }
Example #2
0
 public CSharpAstToken(CSharpAstTokenCode code, string value, TextRange range)
     : base(value, range)
 {
     Code = code;
 }
Example #3
0
 public CSharpAstToken(CSharpAstTokenCode code, string value)
     : this(code, value, TextRange.Empty)
 {
 }