/// <summary> /// Parse a value. /// </summary> /// /// <param name="parser">The parser to use.</param> /// <returns>The newly parsed value.</returns> private static String ParseValue(SimpleParser parser) { bool quoted = false; var str = new StringBuilder(); parser.EatWhiteSpace(); if (parser.Peek() == '\"') { quoted = true; parser.Advance(); } while (!parser.EOL()) { if (parser.Peek() == '\"') { if (quoted) { parser.Advance(); if (parser.Peek() == '\"') { str.Append(parser.ReadChar()); } else { break; } } else { str.Append(parser.ReadChar()); } } else if (!quoted && (parser.IsWhiteSpace() || (parser.Peek() == ','))) { break; } else { str.Append(parser.ReadChar()); } } return str.ToString(); }
private static string x0738845e2abbf3d2(SimpleParser xbce90b56ab411c23) { bool flag = false; StringBuilder builder = new StringBuilder(); xbce90b56ab411c23.EatWhiteSpace(); if (0 == 0) { goto Label_001E; } goto Label_0160; Label_000F: builder.Append(xbce90b56ab411c23.ReadChar()); goto Label_002B; Label_001E: if (xbce90b56ab411c23.Peek() == '"') { goto Label_0160; } Label_002B: if (!xbce90b56ab411c23.EOL()) { goto Label_00AE; } goto Label_01A9; Label_0061: if (((uint) flag) >= 0) { goto Label_000F; } Label_008C: if (!flag) { if (xbce90b56ab411c23.IsWhiteSpace()) { goto Label_01A9; } if (xbce90b56ab411c23.Peek() != ',') { goto Label_0061; } if (0 != 0) { goto Label_008C; } if ((((uint) flag) - ((uint) flag)) <= uint.MaxValue) { goto Label_01A9; } goto Label_000F; } if (-2 != 0) { goto Label_000F; } Label_00AE: if (xbce90b56ab411c23.Peek() == '"') { goto Label_0109; } if ((((uint) flag) - ((uint) flag)) <= uint.MaxValue) { goto Label_008C; } goto Label_000F; Label_00D2: if ((((uint) flag) + ((uint) flag)) < 0) { goto Label_001E; } goto Label_002B; Label_0109: if (!flag) { builder.Append(xbce90b56ab411c23.ReadChar()); goto Label_002B; } xbce90b56ab411c23.Advance(); if (xbce90b56ab411c23.Peek() != '"') { goto Label_01A9; } builder.Append(xbce90b56ab411c23.ReadChar()); goto Label_00D2; Label_0160: flag = true; if ((((uint) flag) + ((uint) flag)) <= uint.MaxValue) { if ((((uint) flag) | 15) == 0) { if (((uint) flag) >= 0) { goto Label_0061; } goto Label_008C; } xbce90b56ab411c23.Advance(); goto Label_002B; } if ((((uint) flag) - ((uint) flag)) >= 0) { goto Label_0109; } goto Label_00D2; Label_01A9: return builder.ToString(); }