static void WriteStringImpl(StringBuilder sb, string s, bool comment, GUIDToCommentMap comments) { if (comment) { comments.WriteStringBuilder(sb, s); } else { sb.Append(PBXStream.QuoteStringIfNeeded(s)); } }
public static PBXElementString ParseIdentifierAST(IdentifierAST ast, TokenList tokens, string text) { Token tok = tokens[ast.value]; string value; switch (tok.type) { case TokenType.String: value = text.Substring(tok.begin, tok.end - tok.begin); return(new PBXElementString(value)); case TokenType.QuotedString: value = text.Substring(tok.begin, tok.end - tok.begin); value = PBXStream.UnquoteString(value); return(new PBXElementString(value)); default: throw new Exception("Internal parser error"); } }