Add() публичный Метод

public Add ( Attribute a ) : Attribute
a Attribute
Результат Attribute
Пример #1
0
 static Rule()
 {
     predefinedRulePropertiesDict.Add(new Attribute("parser"));
     predefinedRulePropertiesDict.Add(new Attribute("text"));
     predefinedRulePropertiesDict.Add(new Attribute("start"));
     predefinedRulePropertiesDict.Add(new Attribute("stop"));
     predefinedRulePropertiesDict.Add(new Attribute("ctx"));
 }
Пример #2
0
 static AttributeDict()
 {
     predefinedTokenDict.Add(new Attribute("text"));
     predefinedTokenDict.Add(new Attribute("type"));
     predefinedTokenDict.Add(new Attribute("line"));
     predefinedTokenDict.Add(new Attribute("index"));
     predefinedTokenDict.Add(new Attribute("pos"));
     predefinedTokenDict.Add(new Attribute("channel"));
     predefinedTokenDict.Add(new Attribute("int"));
 }
Пример #3
0
 public static AttributeDict Parse([Nullable] ActionAST action, string s, char separator, Grammar g)
 {
     AttributeDict dict = new AttributeDict();
     IList<System.Tuple<string, int>> decls = SplitDecls(s, separator);
     foreach (System.Tuple<string, int> decl in decls)
     {
         if (decl.Item1.Trim().Length > 0)
         {
             Attribute a = ParseAttributeDef(action, decl, g);
             dict.Add(a);
         }
     }
     return dict;
 }