Exemple #1
0
 public TokenParser(string validType, ASTLeafFactory factory)
 {
     ValidType   = validType;
     Factory     = factory;
     ValidValues = null;
 }
Exemple #2
0
 public TokenParser(string validType, ASTLeafFactory factory, IEnumerable <object> validValues)
 {
     ValidType   = validType;
     Factory     = factory;
     ValidValues = new HashSet <object>(validValues);
 }
Exemple #3
0
 public TokenParserBuilder(ASTLeafFactory factory, string validType, string[] validValues)
 {
     Factory     = factory;
     ValidType   = validType;
     ValidValues = new HashSet <string>(validValues);
 }
Exemple #4
0
 public TokenParser(string validType, ASTLeafFactory factory, params string[] validValues)
 {
     ValidType   = validType;
     Factory     = factory;
     ValidValues = validValues.Length != 0 ? new HashSet <object>(validValues) : null;
 }
Exemple #5
0
 public static TokenParserBuilder Token(ASTLeafFactory factory, string type, params string[] values) => new TokenParserBuilder(factory, type, values);