public static PBXElementDict ParseTreeAST(TreeAST ast, TokenList tokens, string text) { var el = new PBXElementDict(); foreach (var kv in ast.values) { PBXElementString key = ParseIdentifierAST(kv.key, tokens, text); PBXElement value = ParseValueAST(kv.value, tokens, text); el[key.value] = value; } return(el); }
public override void UpdateVars() { projectReferences = new List <ProjectReference>(); if (m_Properties.Contains("projectReferences")) { var el = m_Properties["projectReferences"].AsArray(); foreach (var value in el.values) { PBXElementDict dict = value.AsDict(); if (dict.Contains("ProductGroup") && dict.Contains("ProjectRef")) { string group = dict["ProductGroup"].AsString(); string projectRef = dict["ProjectRef"].AsString(); projectReferences.Add(ProjectReference.Create(group, projectRef)); } } } buildConfigList = GetPropertyString("buildConfigurationList"); }
internal void SetPropertiesWhenSerializing(PBXElementDict props) { m_Properties = props; }
public PBXElementDict CreateDict( string key ) { var v = new PBXElementDict(); values[key] = v; return v; }
public PBXElementDict AddDict() { var v = new PBXElementDict(); values.Add( v ); return v; }
public static void WriteDict( StringBuilder sb, PBXElementDict el, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments ) { sb.Append( "{" ); if (el.Contains( "isa" )) WriteDictKeyValue( sb, "isa", el["isa"], indent + 1, compact, checker, comments ); var keys = new List<string>( el.values.Keys ); keys.Sort( StringComparer.Ordinal ); foreach (var key in keys) { if (key != "isa") WriteDictKeyValue( sb, key, el[key], indent + 1, compact, checker, comments ); } if (!compact) { sb.Append( "\n" ); sb.Append( GetIndent( indent ) ); } sb.Append( "}" ); }
public static PBXElementDict ParseTreeAST( TreeAST ast, TokenList tokens, string text ) { var el = new PBXElementDict(); foreach (var kv in ast.values) { PBXElementString key = ParseIdentifierAST( kv.key, tokens, text ); PBXElement value = ParseValueAST( kv.value, tokens, text ); el[key.value] = value; } return el; }
public abstract void AddObject(string key, PBXElementDict value);